[tbb-commits] [tor-browser/tor-browser-60.5.1esr-8.5-1] Bug 28329 - Part 3. Remove OrbotActivity dependency
gk at torproject.org
gk at torproject.org
Fri Mar 15 21:48:09 UTC 2019
commit e4d2df5e776b6270b5eb98f4b718ea6eb5ea5094
Author: Matthew Finkel <Matthew.Finkel at gmail.com>
Date: Wed Feb 20 01:08:36 2019 +0000
Bug 28329 - Part 3. Remove OrbotActivity dependency
---
mobile/android/app/build.gradle | 5 -----
mobile/android/base/AndroidManifest.xml.in | 8 ++++++++
.../base/java/org/mozilla/gecko/BrowserApp.java | 18 ------------------
.../base/java/org/mozilla/gecko/GeckoApplication.java | 5 -----
4 files changed, 8 insertions(+), 28 deletions(-)
diff --git a/mobile/android/app/build.gradle b/mobile/android/app/build.gradle
index d0060901b6b3..c8380042d8a9 100644
--- a/mobile/android/app/build.gradle
+++ b/mobile/android/app/build.gradle
@@ -225,7 +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')
@@ -266,10 +265,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'
diff --git a/mobile/android/base/AndroidManifest.xml.in b/mobile/android/base/AndroidManifest.xml.in
index c7c5ead7f82f..72b1e16925b7 100644
--- a/mobile/android/base/AndroidManifest.xml.in
+++ b/mobile/android/base/AndroidManifest.xml.in
@@ -493,5 +493,13 @@
<meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />
#endif
+ <!-- Define Orbotservice's TorService -->
+ <service
+ android:name="org.torproject.android.service.TorService"
+ android:enabled="true"
+ android:exported="false"
+ android:stopWithTask="true">
+ </service>
+
</application>
</manifest>
diff --git a/mobile/android/base/java/org/mozilla/gecko/BrowserApp.java b/mobile/android/base/java/org/mozilla/gecko/BrowserApp.java
index 5aa0a6a7f3ac..464b4054c9ff 100644
--- a/mobile/android/base/java/org/mozilla/gecko/BrowserApp.java
+++ b/mobile/android/base/java/org/mozilla/gecko/BrowserApp.java
@@ -182,7 +182,6 @@ 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.TorService;
import org.torproject.android.service.TorServiceConstants;
@@ -242,7 +241,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;
public static final String ACTION_VIEW_MULTIPLE = AppConstants.ANDROID_PACKAGE_NAME + ".action.VIEW_MULTIPLE";
@@ -271,7 +269,6 @@ public class BrowserApp extends GeckoApp
private HomeScreen mHomeScreen;
private TabsPanel mTabsPanel;
- private boolean mOrbotNeedsStart = true;
private boolean mTorNeedsStart = true;
private boolean showSplashScreen = false;
@@ -1410,14 +1407,6 @@ public class BrowserApp extends GeckoApp
}
}
- public void checkStartOrbot() {
- if (mOrbotNeedsStart) {
- final String orbotStartAction = "android.intent.action.MAIN";
- final Intent launchOrbot = new Intent(orbotStartAction, null, this, OrbotMainActivity.class);
- startActivityForResult(launchOrbot, ACTIVITY_RESULT_ORBOT_LAUNCH, null);
- }
- }
-
@Override
public void onResume() {
super.onResume();
@@ -1436,7 +1425,6 @@ public class BrowserApp extends GeckoApp
// need to know if we are in automation.
final SafeIntent intent = new SafeIntent(getIntent());
if (!IntentUtils.getIsInAutomationFromEnvironment(intent)) {
- checkStartOrbot();
mTorNeedsStart = !checkTorIsStarted();
}
}
@@ -1891,7 +1879,6 @@ public class BrowserApp extends GeckoApp
NotificationHelper.destroy();
GeckoNetworkManager.destroy();
- mOrbotNeedsStart = true;
mTorNeedsStart = true;
super.onDestroy();
@@ -3111,11 +3098,6 @@ public class BrowserApp extends GeckoApp
TabQueueHelper.processTabQueuePromptResponse(resultCode, this);
break;
- case ACTIVITY_RESULT_ORBOT_LAUNCH:
- Log.d(LOGTAG, "onActivityResult: ACTIVITY_RESULT_ORBOT_LAUNCH");
- mOrbotNeedsStart = false;
- break;
-
default:
for (final BrowserAppDelegate delegate : delegates) {
delegate.onActivityResult(this, requestCode, resultCode, data);
diff --git a/mobile/android/base/java/org/mozilla/gecko/GeckoApplication.java b/mobile/android/base/java/org/mozilla/gecko/GeckoApplication.java
index b8e4985332a9..b38e7184c798 100644
--- a/mobile/android/base/java/org/mozilla/gecko/GeckoApplication.java
+++ b/mobile/android/base/java/org/mozilla/gecko/GeckoApplication.java
@@ -63,7 +63,6 @@ import java.net.URL;
import java.util.UUID;
import org.torproject.android.service.util.Prefs;
-import org.torproject.android.settings.Languages;
public class GeckoApplication extends Application
implements HapticFeedbackDelegate {
@@ -325,10 +324,6 @@ public class GeckoApplication extends Application
// Give Orbot the base Context
Prefs.setContext(context);
- // Initialize Orbot's Language settings
- Languages.setup(BrowserApp.class, R.string.menu_settings);
- Languages.setLanguage(this, Prefs.getDefaultLocale(), true);
-
super.onCreate();
}
More information about the tbb-commits
mailing list