Loading build.gradle +0 −4 Original line number Diff line number Diff line Loading @@ -32,10 +32,6 @@ allprojects { url repository } } // These are needed for Orbot's dependencies maven { url "https://raw.githubusercontent.com/guardianproject/gpmaven/master" } maven { url 'https://jitpack.io' } jcenter() } } Loading mobile/android/app/000-tor-browser-android.js +3 −0 Original line number Diff line number Diff line Loading @@ -54,6 +54,9 @@ pref("media.realtime_decoder.enabled", false); pref("general.useragent.updates.enabled", false); pref("general.useragent.updates.url", ""); // Override this because Orbot uses 9050 as the default pref("network.proxy.socks_port", 9050); // Do not allow the user to install extensions from web pref("xpinstall.enabled", false); pref("extensions.enabledScopes", 1); Loading mobile/android/app/build.gradle +0 −11 Original line number Diff line number Diff line Loading @@ -225,9 +225,6 @@ dependencies { implementation "com.android.support:design:${mozconfig.substs.ANDROID_SUPPORT_LIBRARY_VERSION}" implementation "com.android.support:customtabs:${mozconfig.substs.ANDROID_SUPPORT_LIBRARY_VERSION}" implementation "com.android.support:palette-v7:${mozconfig.substs.ANDROID_SUPPORT_LIBRARY_VERSION}" implementation files('Orbot-16.0.5-RC-1-tor-0.3.4.9-fullperm-release.aar') implementation files('orbotservice-release.aar') implementation files('jsocksAndroid-release.aar') if (mozconfig.substs.MOZ_NATIVE_DEVICES) { implementation "com.android.support:mediarouter-v7:${mozconfig.substs.ANDROID_SUPPORT_LIBRARY_VERSION}" Loading Loading @@ -265,14 +262,6 @@ dependencies { // Including the Robotium JAR directly can cause issues with dexing. androidTestImplementation 'com.jayway.android.robotium:robotium-solo:5.5.4' // Orbot implementation 'com.github.delight-im:Android-Languages:v1.0.1' implementation 'pl.bclogic:pulsator4droid:1.0.3' // Orbotservice implementation 'org.torproject:tor-android-binary:0.3.4.9' implementation 'com.jrummyapps:android-shell:1.0.1' } // TODO: (bug 1261486): This impl is not robust - Loading mobile/android/base/AndroidManifest.xml.in +0 −1 Original line number Diff line number Diff line Loading @@ -24,7 +24,6 @@ #include FennecManifest_permissions.xml.in <application android:label="@string/moz_app_displayname" tools:replace="android:label" android:icon="@drawable/icon" android:logo="@drawable/logo" android:name="@MOZ_ANDROID_APPLICATION_CLASS@" Loading mobile/android/base/java/org/mozilla/gecko/BrowserApp.java +29 −24 Original line number Diff line number Diff line Loading @@ -181,8 +181,7 @@ import org.mozilla.gecko.widget.GeckoActionProvider; import org.mozilla.gecko.widget.SplashScreen; import org.mozilla.geckoview.GeckoSession; import org.torproject.android.OrbotMainActivity; import org.torproject.android.service.TorServiceConstants; import info.guardianproject.netcipher.proxy.OrbotHelper; import java.io.File; import java.io.FileNotFoundException; Loading Loading @@ -240,9 +239,6 @@ public class BrowserApp extends GeckoApp public static final int ACTIVITY_REQUEST_TRIPLE_READERVIEW = 4001; public static final int ACTIVITY_RESULT_TRIPLE_READERVIEW_ADD_BOOKMARK = 4002; public static final int ACTIVITY_RESULT_TRIPLE_READERVIEW_IGNORE = 4003; public static final int ACTIVITY_RESULT_ORBOT_LAUNCH = 5001; private static boolean mOrbotRun = false; public static final String ACTION_VIEW_MULTIPLE = AppConstants.ANDROID_PACKAGE_NAME + ".action.VIEW_MULTIPLE"; Loading Loading @@ -1286,26 +1282,41 @@ public class BrowserApp extends GeckoApp @Override public void onReceive(Context context, Intent intent) { if (TextUtils.equals(intent.getAction(), TorServiceConstants.ACTION_STATUS)) { if (TextUtils.equals(intent.getAction(), OrbotHelper.ACTION_STATUS)) { GeckoAppShell.setTorStatus(intent); } } }; public void checkStartOrbot() { if (!OrbotHelper.isOrbotInstalled(this)) { final Intent installOrbotIntent = OrbotHelper.getOrbotInstallIntent(this); AlertDialog.Builder builder = new AlertDialog.Builder(this); builder.setTitle(R.string.install_orbot); builder.setMessage(R.string.you_must_have_orbot); builder.setPositiveButton(R.string.yes, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialogInterface, int i) { startActivity(installOrbotIntent); } }); builder.setNegativeButton(R.string.no, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialogInterface, int i) { } }); builder.show(); } else { /* run in thread so Tor status updates will be received while the * Gecko event sync is blocking the main thread */ HandlerThread handlerThread = new HandlerThread("torStatusReceiver"); handlerThread.start(); Looper looper = handlerThread.getLooper(); Handler handler = new Handler(looper); registerReceiver(torStatusReceiver, new IntentFilter(TorServiceConstants.ACTION_STATUS), registerReceiver(torStatusReceiver, new IntentFilter(OrbotHelper.ACTION_STATUS), null, handler); if (!mOrbotRun) { final String orbotStartAction = "android.intent.action.MAIN"; final Intent launchOrbot = new Intent(orbotStartAction, null, this, OrbotMainActivity.class); startActivityForResult(launchOrbot, ACTIVITY_RESULT_ORBOT_LAUNCH, null); OrbotHelper.requestStartTor(this); } } Loading Loading @@ -3007,12 +3018,6 @@ public class BrowserApp extends GeckoApp TabQueueHelper.processTabQueuePromptResponse(resultCode, this); break; case ACTIVITY_RESULT_ORBOT_LAUNCH: final SafeIntent intent = new SafeIntent(getIntent()); Log.d(LOGTAG, "onActivityResult: ACTIVITY_RESULT_ORBOT_LAUNCH"); mOrbotRun = true; break; default: for (final BrowserAppDelegate delegate : delegates) { delegate.onActivityResult(this, requestCode, resultCode, data); Loading Loading
build.gradle +0 −4 Original line number Diff line number Diff line Loading @@ -32,10 +32,6 @@ allprojects { url repository } } // These are needed for Orbot's dependencies maven { url "https://raw.githubusercontent.com/guardianproject/gpmaven/master" } maven { url 'https://jitpack.io' } jcenter() } } Loading
mobile/android/app/000-tor-browser-android.js +3 −0 Original line number Diff line number Diff line Loading @@ -54,6 +54,9 @@ pref("media.realtime_decoder.enabled", false); pref("general.useragent.updates.enabled", false); pref("general.useragent.updates.url", ""); // Override this because Orbot uses 9050 as the default pref("network.proxy.socks_port", 9050); // Do not allow the user to install extensions from web pref("xpinstall.enabled", false); pref("extensions.enabledScopes", 1); Loading
mobile/android/app/build.gradle +0 −11 Original line number Diff line number Diff line Loading @@ -225,9 +225,6 @@ dependencies { implementation "com.android.support:design:${mozconfig.substs.ANDROID_SUPPORT_LIBRARY_VERSION}" implementation "com.android.support:customtabs:${mozconfig.substs.ANDROID_SUPPORT_LIBRARY_VERSION}" implementation "com.android.support:palette-v7:${mozconfig.substs.ANDROID_SUPPORT_LIBRARY_VERSION}" implementation files('Orbot-16.0.5-RC-1-tor-0.3.4.9-fullperm-release.aar') implementation files('orbotservice-release.aar') implementation files('jsocksAndroid-release.aar') if (mozconfig.substs.MOZ_NATIVE_DEVICES) { implementation "com.android.support:mediarouter-v7:${mozconfig.substs.ANDROID_SUPPORT_LIBRARY_VERSION}" Loading Loading @@ -265,14 +262,6 @@ dependencies { // Including the Robotium JAR directly can cause issues with dexing. androidTestImplementation 'com.jayway.android.robotium:robotium-solo:5.5.4' // Orbot implementation 'com.github.delight-im:Android-Languages:v1.0.1' implementation 'pl.bclogic:pulsator4droid:1.0.3' // Orbotservice implementation 'org.torproject:tor-android-binary:0.3.4.9' implementation 'com.jrummyapps:android-shell:1.0.1' } // TODO: (bug 1261486): This impl is not robust - Loading
mobile/android/base/AndroidManifest.xml.in +0 −1 Original line number Diff line number Diff line Loading @@ -24,7 +24,6 @@ #include FennecManifest_permissions.xml.in <application android:label="@string/moz_app_displayname" tools:replace="android:label" android:icon="@drawable/icon" android:logo="@drawable/logo" android:name="@MOZ_ANDROID_APPLICATION_CLASS@" Loading
mobile/android/base/java/org/mozilla/gecko/BrowserApp.java +29 −24 Original line number Diff line number Diff line Loading @@ -181,8 +181,7 @@ import org.mozilla.gecko.widget.GeckoActionProvider; import org.mozilla.gecko.widget.SplashScreen; import org.mozilla.geckoview.GeckoSession; import org.torproject.android.OrbotMainActivity; import org.torproject.android.service.TorServiceConstants; import info.guardianproject.netcipher.proxy.OrbotHelper; import java.io.File; import java.io.FileNotFoundException; Loading Loading @@ -240,9 +239,6 @@ public class BrowserApp extends GeckoApp public static final int ACTIVITY_REQUEST_TRIPLE_READERVIEW = 4001; public static final int ACTIVITY_RESULT_TRIPLE_READERVIEW_ADD_BOOKMARK = 4002; public static final int ACTIVITY_RESULT_TRIPLE_READERVIEW_IGNORE = 4003; public static final int ACTIVITY_RESULT_ORBOT_LAUNCH = 5001; private static boolean mOrbotRun = false; public static final String ACTION_VIEW_MULTIPLE = AppConstants.ANDROID_PACKAGE_NAME + ".action.VIEW_MULTIPLE"; Loading Loading @@ -1286,26 +1282,41 @@ public class BrowserApp extends GeckoApp @Override public void onReceive(Context context, Intent intent) { if (TextUtils.equals(intent.getAction(), TorServiceConstants.ACTION_STATUS)) { if (TextUtils.equals(intent.getAction(), OrbotHelper.ACTION_STATUS)) { GeckoAppShell.setTorStatus(intent); } } }; public void checkStartOrbot() { if (!OrbotHelper.isOrbotInstalled(this)) { final Intent installOrbotIntent = OrbotHelper.getOrbotInstallIntent(this); AlertDialog.Builder builder = new AlertDialog.Builder(this); builder.setTitle(R.string.install_orbot); builder.setMessage(R.string.you_must_have_orbot); builder.setPositiveButton(R.string.yes, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialogInterface, int i) { startActivity(installOrbotIntent); } }); builder.setNegativeButton(R.string.no, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialogInterface, int i) { } }); builder.show(); } else { /* run in thread so Tor status updates will be received while the * Gecko event sync is blocking the main thread */ HandlerThread handlerThread = new HandlerThread("torStatusReceiver"); handlerThread.start(); Looper looper = handlerThread.getLooper(); Handler handler = new Handler(looper); registerReceiver(torStatusReceiver, new IntentFilter(TorServiceConstants.ACTION_STATUS), registerReceiver(torStatusReceiver, new IntentFilter(OrbotHelper.ACTION_STATUS), null, handler); if (!mOrbotRun) { final String orbotStartAction = "android.intent.action.MAIN"; final Intent launchOrbot = new Intent(orbotStartAction, null, this, OrbotMainActivity.class); startActivityForResult(launchOrbot, ACTIVITY_RESULT_ORBOT_LAUNCH, null); OrbotHelper.requestStartTor(this); } } Loading Loading @@ -3007,12 +3018,6 @@ public class BrowserApp extends GeckoApp TabQueueHelper.processTabQueuePromptResponse(resultCode, this); break; case ACTIVITY_RESULT_ORBOT_LAUNCH: final SafeIntent intent = new SafeIntent(getIntent()); Log.d(LOGTAG, "onActivityResult: ACTIVITY_RESULT_ORBOT_LAUNCH"); mOrbotRun = true; break; default: for (final BrowserAppDelegate delegate : delegates) { delegate.onActivityResult(this, requestCode, resultCode, data); Loading