Commit 0ebd4bac authored by Matthew Finkel's avatar Matthew Finkel Committed by Georg Koppen
Browse files

Bug 28329 - Part 3. Remove OrbotActivity dependency

parent 8ee89054
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -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'
+8 −0
Original line number Diff line number Diff line
@@ -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>
+0 −18
Original line number Diff line number Diff line
@@ -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);
+0 −5
Original line number Diff line number Diff line
@@ -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();
    }