]> gitweb.stoutner.com Git - PrivacyBrowserAndroid.git/commitdiff
Remove GMS (Google Mobile Services) because it didn't work.
authorSoren Stoutner <soren@stoutner.com>
Mon, 21 Nov 2016 12:41:45 +0000 (05:41 -0700)
committerSoren Stoutner <soren@stoutner.com>
Mon, 21 Nov 2016 12:41:45 +0000 (05:41 -0700)
app/build.gradle
app/src/main/java/com/stoutner/privacybrowser/activities/MainWebView.java

index f52a93cfdb4b6b06ba80637549eada58598ac3f4..b6334127d9d0f6b8ad73e7efba7c0d0011d890df 100644 (file)
@@ -60,9 +60,6 @@ dependencies {
     compile fileTree(include: ['*.jar'], dir: 'libs')
     compile 'com.android.support:design:24.2.1'
 
     compile fileTree(include: ['*.jar'], dir: 'libs')
     compile 'com.android.support:design:24.2.1'
 
-    // GMS (Google Mobile Services) is necessary to update OpenSSL on API 19, but must be removed to build on F-Droid.
-    compile 'com.google.android.gms:play-services-safetynet:9.8.0'
-
     // Only compile `com.google.firebase:firebase-ads:9.8.0` for the free flavor.
     freeCompile 'com.google.firebase:firebase-ads:9.8.0'
 }
     // Only compile `com.google.firebase:firebase-ads:9.8.0` for the free flavor.
     freeCompile 'com.google.firebase:firebase-ads:9.8.0'
 }
index 00ea17818b35ef6ce111c33c0dabcee5be73c8f7..500df319f019cf621552a7c95b3cc2e963bdfb2d 100644 (file)
@@ -52,7 +52,6 @@ import android.support.v7.app.AppCompatDialogFragment;
 import android.support.v7.widget.Toolbar;
 import android.text.Editable;
 import android.text.TextWatcher;
 import android.support.v7.widget.Toolbar;
 import android.text.Editable;
 import android.text.TextWatcher;
-import android.util.Log;
 import android.util.Patterns;
 import android.view.ContextMenu;
 import android.view.KeyEvent;
 import android.util.Patterns;
 import android.view.ContextMenu;
 import android.view.KeyEvent;
@@ -77,11 +76,6 @@ import android.widget.ProgressBar;
 import android.widget.RelativeLayout;
 import android.widget.TextView;
 
 import android.widget.RelativeLayout;
 import android.widget.TextView;
 
-// These three GMS (Google Mobile Services) lines need to be removed for F-Droid to build correctly.
-import com.google.android.gms.common.GooglePlayServicesNotAvailableException;
-import com.google.android.gms.common.GooglePlayServicesRepairableException;
-import com.google.android.gms.security.ProviderInstaller;
-
 import com.stoutner.privacybrowser.BannerAd;
 import com.stoutner.privacybrowser.R;
 import com.stoutner.privacybrowser.helpers.OrbotProxyHelper;
 import com.stoutner.privacybrowser.BannerAd;
 import com.stoutner.privacybrowser.R;
 import com.stoutner.privacybrowser.helpers.OrbotProxyHelper;
@@ -190,27 +184,15 @@ public class MainWebView extends AppCompatActivity implements NavigationView.OnN
         super.onCreate(savedInstanceState);
         setContentView(R.layout.main_coordinatorlayout);
 
         super.onCreate(savedInstanceState);
         setContentView(R.layout.main_coordinatorlayout);
 
-        // API 19 uses an old version of OpenSSL, which exposes users to man-in-the-middle attacks.
-        if (Build.VERSION.SDK_INT == 19) {
-            try {
-                // Update OpenSSL using Google Play Services.  This command must be removed for the build to succeed on F-Droid.
-                ProviderInstaller.installIfNeeded(this);
-            } catch (GooglePlayServicesRepairableException exception) {
-                Log.i("Privacy Browser", "OpenSSL needs to be updated");
-            } catch (GooglePlayServicesNotAvailableException exception) {
-                Log.i("Privacy Browser", "OpenSSL cannot be updated because Google Play Services are not available");
-            }
-        }
-
         // Get a handle for `inputMethodManager`.
         inputMethodManager = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
 
         // Get a handle for `inputMethodManager`.
         inputMethodManager = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
 
-        // We need to use the SupportActionBar from android.support.v7.app.ActionBar until the minimum API is >= 21.
+        // We need to use the `SupportActionBar` from `android.support.v7.app.ActionBar` until the minimum API is >= 21.
         Toolbar supportAppBar = (Toolbar) findViewById(R.id.appBar);
         setSupportActionBar(supportAppBar);
         appBar = getSupportActionBar();
 
         Toolbar supportAppBar = (Toolbar) findViewById(R.id.appBar);
         setSupportActionBar(supportAppBar);
         appBar = getSupportActionBar();
 
-        // This is needed to get rid of the Android Studio warning that appBar might be null.
+        // This is needed to get rid of the Android Studio warning that `appBar` might be null.
         assert appBar != null;
 
         // Add the custom url_app_bar layout, which shows the favoriteIcon, urlTextBar, and progressBar.
         assert appBar != null;
 
         // Add the custom url_app_bar layout, which shows the favoriteIcon, urlTextBar, and progressBar.