Skip to content

Commit

Permalink
removed unused constants/warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
bitmold committed Nov 12, 2020
1 parent 317923b commit 5ef1da7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
2 changes: 0 additions & 2 deletions app/src/main/java/org/torproject/android/MainConstants.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,4 @@ public interface MainConstants {

String EMAIL_TOR_BRIDGES = "bridges@torproject.org";

int RESULT_CLOSE_ALL = 0;

}
11 changes: 3 additions & 8 deletions app/src/main/java/org/torproject/android/OrbotMainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@

import static androidx.core.content.FileProvider.getUriForFile;
import static org.torproject.android.MainConstants.COUNTRY_CODES;
import static org.torproject.android.MainConstants.RESULT_CLOSE_ALL;
import static org.torproject.android.MainConstants.URL_TOR_CHECK;
import static org.torproject.android.service.TorServiceConstants.ACTION_START;
import static org.torproject.android.service.TorServiceConstants.ACTION_START_VPN;
Expand All @@ -108,7 +107,6 @@ public class OrbotMainActivity extends AppCompatActivity implements OrbotConstan
private final static int REQUEST_VPN = 8888;
private final static int REQUEST_SETTINGS = 0x9874;
private final static int REQUEST_VPN_APPS_SELECT = 8889;
private final static int LOG_DRAWER_GRAVITY = GravityCompat.END;
// message types for mStatusUpdateHandler
private final static int STATUS_UPDATE = 1;
private static final int MESSAGE_TRAFFIC_COUNT = 2;
Expand Down Expand Up @@ -143,7 +141,7 @@ public class OrbotMainActivity extends AppCompatActivity implements OrbotConstan
* so local ones are used here so other apps cannot interfere with Orbot's
* operation.
*/
private BroadcastReceiver mLocalBroadcastReceiver = new BroadcastReceiver() {
private final BroadcastReceiver mLocalBroadcastReceiver = new BroadcastReceiver() {

@Override
public void onReceive(Context context, Intent intent) {
Expand Down Expand Up @@ -296,7 +294,7 @@ private void doLayout() {
mTxtOrbotLog = findViewById(R.id.orbotLog);

lblStatus = findViewById(R.id.lblStatus);
lblStatus.setOnClickListener(v -> mDrawer.openDrawer(LOG_DRAWER_GRAVITY));
lblStatus.setOnClickListener(v -> mDrawer.openDrawer(GravityCompat.END));

lblPorts = findViewById(R.id.lblPorts);

Expand Down Expand Up @@ -481,9 +479,6 @@ public boolean onOptionsItemSelected(MenuItem item) {
**/
private void doExit() {
stopTor();

// Kill all the wizard activities
setResult(RESULT_CLOSE_ALL);
finish();
}

Expand All @@ -501,7 +496,7 @@ protected void onPause() {
@Override
public void onBackPressed() {
// check to see if the log is open, if so close it
if (mDrawer.isDrawerOpen(LOG_DRAWER_GRAVITY)) {
if (mDrawer.isDrawerOpen(GravityCompat.END)) {
mDrawer.closeDrawers();
} else {
super.onBackPressed();
Expand Down

0 comments on commit 5ef1da7

Please sign in to comment.