Skip to content

Commit

Permalink
Use contants defined in TorService, shows where it comes from...
Browse files Browse the repository at this point in the history
  • Loading branch information
bitmold committed Jan 20, 2024
1 parent c373cc5 commit 69353bf
Showing 1 changed file with 10 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@

import android.content.Intent;

import org.torproject.jni.TorService;

import java.util.Arrays;
import java.util.List;

Expand Down Expand Up @@ -62,7 +64,7 @@ public interface OrbotConstants {
/**
* A request to Orbot to transparently start Tor services
*/
String ACTION_START = "org.torproject.android.intent.action.START";
String ACTION_START = TorService.ACTION_START;
String ACTION_STOP = "org.torproject.android.intent.action.STOP";

// needed when Orbot exits and tor is not running, but the notification is still active
Expand All @@ -79,18 +81,18 @@ public interface OrbotConstants {
/**
* {@link Intent} send by Orbot with {@code ON/OFF/STARTING/STOPPING} status
*/
String ACTION_STATUS = "org.torproject.android.intent.action.STATUS";
String ACTION_STATUS = TorService.ACTION_STATUS;
/**
* {@code String} that contains a status constant: {@link #STATUS_ON},
* {@link #STATUS_OFF}, {@link #STATUS_STARTING}, or
* {@link #STATUS_STOPPING}
*/
String EXTRA_STATUS = "org.torproject.android.intent.extra.STATUS";
String EXTRA_STATUS = TorService.EXTRA_STATUS;
/**
* A {@link String} {@code packageName} for Orbot to direct its status reply
* to, used in {@link #ACTION_START} {@link Intent}s sent to Orbot
*/
String EXTRA_PACKAGE_NAME = "org.torproject.android.intent.extra.PACKAGE_NAME";
String EXTRA_PACKAGE_NAME = TorService.EXTRA_PACKAGE_NAME;
/**
* The SOCKS proxy settings in URL form.
*/
Expand Down Expand Up @@ -136,14 +138,14 @@ public interface OrbotConstants {
/**
* All tor-related services and daemons are stopped
*/
String STATUS_OFF = "OFF";
String STATUS_OFF = TorService.STATUS_OFF;

/**
* All tor-related services and daemons have completed starting
*/
String STATUS_ON = "ON";
String STATUS_STARTING = "STARTING";
String STATUS_STOPPING = "STOPPING";
String STATUS_ON = TorService.STATUS_ON;
String STATUS_STARTING = TorService.STATUS_STARTING;
String STATUS_STOPPING = TorService.STATUS_STOPPING;

/**
* The user has disabled the ability for background starts triggered by
Expand Down

0 comments on commit 69353bf

Please sign in to comment.