Android build for ungoogled-chromium. https://uc.droidware.info
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

823 lines
37 KiB

Remove dependency on com.google.android.gms.common/auth/signin/dynamic, com.google.android.gms.tasks (play-services-base-15.0.1.aar, play-services-basement-15.0.1.aar, play-services-tasks-15.0.1.aar).
author: Wengling Chen <[email protected]>
---
chrome/android/BUILD.gn | 8 ---
chrome/android/features/media_router/BUILD.gn | 2 -
.../browser/media/router/ChromeMediaRouter.java | 7 +-
chrome/android/java/AndroidManifest.xml | 9 ---
.../src/org/chromium/chrome/browser/AppHooks.java | 14 +---
.../chromium/chrome/browser/ChromeVersionInfo.java | 12 +---
.../browser/component_updater/UpdateScheduler.java | 8 +--
.../browser/externalauth/ExternalAuthUtils.java | 15 ++--
.../externalauth/UserRecoverableErrorHandler.java | 7 --
.../browser/gcore/ChromeGoogleApiClientImpl.java | 25 +------
.../browser/gcore/GoogleApiClientHelper.java | 82 +---------------------
.../chrome/browser/omaha/UpdateStatusProvider.java | 10 +--
.../browser/preferences/PreferencesLauncher.java | 5 +-
chrome/test/android/BUILD.gn | 2 -
components/background_task_scheduler/BUILD.gn | 9 ---
components/signin/core/browser/android/BUILD.gn | 2 -
.../signin/GmsAvailabilityException.java | 4 +-
device/BUILD.gn | 2 -
remoting/android/client_java_tmpl.gni | 3 -
services/BUILD.gn | 4 --
services/device/geolocation/BUILD.gn | 2 -
services/shape_detection/BUILD.gn | 2 -
.../shape_detection/FaceDetectionProviderImpl.java | 8 +--
third_party/android_deps/BUILD.gn | 53 --------------
third_party/cacheinvalidation/BUILD.gn | 1 -
third_party/robolectric/BUILD.gn | 2 -
26 files changed, 18 insertions(+), 280 deletions(-)
diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn
--- a/chrome/android/BUILD.gn
+++ b/chrome/android/BUILD.gn
@@ -249,9 +249,6 @@ android_library("chrome_java") {
":partner_location_descriptor_proto_java",
":thumbnail_cache_entry_proto_java",
":usage_stats_proto_java",
- "$google_play_services_package:google_play_services_base_java",
- "$google_play_services_package:google_play_services_basement_java",
- "$google_play_services_package:google_play_services_tasks_java",
"//base:base_java",
"//base:jni_java",
"//chrome/android/third_party/compositor_animator:compositor_animator_java",
@@ -611,8 +608,6 @@ junit_binary("chrome_junit_tests") {
":chrome_java",
":chrome_junit_test_support",
":partner_location_descriptor_proto_java",
- "$google_play_services_package:google_play_services_base_java",
- "$google_play_services_package:google_play_services_basement_java",
"//base:base_java",
"//base:base_java_test_support",
"//base:base_junit_test_support",
@@ -706,9 +701,6 @@ android_library("chrome_test_java") {
":browser_java_test_support",
":chrome_test_util_java",
":partner_location_descriptor_proto_java",
- "$google_play_services_package:google_play_services_base_java",
- "$google_play_services_package:google_play_services_basement_java",
- "$google_play_services_package:google_play_services_tasks_java",
"//base:base_java",
"//base:base_java_test_support",
"//chrome/android:app_hooks_java",
diff --git a/chrome/android/features/media_router/BUILD.gn b/chrome/android/features/media_router/BUILD.gn
--- a/chrome/android/features/media_router/BUILD.gn
+++ b/chrome/android/features/media_router/BUILD.gn
@@ -9,8 +9,6 @@ import("//chrome/common/features.gni")
android_library("java") {
deps = [
":java_resources",
- "$google_play_services_package:google_play_services_base_java",
- "$google_play_services_package:google_play_services_basement_java",
"//base:base_java",
"//chrome/android:chrome_java",
"//services/media_session/public/cpp/android:media_session_java",
diff --git a/chrome/android/features/media_router/java/src/org/chromium/chrome/browser/media/router/ChromeMediaRouter.java b/chrome/android/features/media_router/java/src/org/chromium/chrome/browser/media/router/ChromeMediaRouter.java
--- a/chrome/android/features/media_router/java/src/org/chromium/chrome/browser/media/router/ChromeMediaRouter.java
+++ b/chrome/android/features/media_router/java/src/org/chromium/chrome/browser/media/router/ChromeMediaRouter.java
@@ -7,9 +7,6 @@ package org.chromium.chrome.browser.media.router;
import android.support.annotation.Nullable;
import android.support.v7.media.MediaRouter;
-import com.google.android.gms.common.ConnectionResult;
-import com.google.android.gms.common.GoogleApiAvailability;
-
import org.chromium.base.ContextUtils;
import org.chromium.base.Log;
import org.chromium.base.StrictModeContext;
@@ -42,9 +39,7 @@ public class ChromeMediaRouter implements MediaRouteManager {
int googleApiAvailabilityResult =
AppHooks.get().isGoogleApiAvailableWithMinApkVersion(
MIN_GOOGLE_PLAY_SERVICES_APK_VERSION);
- if (googleApiAvailabilityResult != ConnectionResult.SUCCESS) {
- GoogleApiAvailability.getInstance().showErrorNotification(
- ContextUtils.getApplicationContext(), googleApiAvailabilityResult);
+ if (true) {
return;
}
MediaRouteProvider cafProvider = CafMediaRouteProvider.create(manager);
diff --git a/chrome/android/java/AndroidManifest.xml b/chrome/android/java/AndroidManifest.xml
--- a/chrome/android/java/AndroidManifest.xml
+++ b/chrome/android/java/AndroidManifest.xml
@@ -886,15 +886,6 @@ by a child template that "extends" this file.
</intent-filter>
</activity>
- <!-- Activity for dispatching intents to Instant Apps. -->
- <activity
- android:name="org.chromium.chrome.browser.instantapps.AuthenticatedProxyActivity"
- android:exported="false"
- android:theme="@android:style/Theme.NoDisplay"
- android:noHistory="true"
- android:excludeFromRecents="true">
- </activity>
-
<activity
android:name="org.chromium.chrome.browser.vr.VrCancelAnimationActivity"
android:exported="false"
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/AppHooks.java b/chrome/android/java/src/org/chromium/chrome/browser/AppHooks.java
--- a/chrome/android/java/src/org/chromium/chrome/browser/AppHooks.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/AppHooks.java
@@ -15,9 +15,6 @@ import android.support.annotation.Nullable;
import android.view.View;
import android.view.inputmethod.InputConnection;
-import com.google.android.gms.common.ConnectionResult;
-import com.google.android.gms.common.GoogleApiAvailability;
-
import org.chromium.base.Callback;
import org.chromium.base.CommandLine;
import org.chromium.base.ContextUtils;
@@ -409,16 +406,7 @@ public abstract class AppHooks {
* same as {@link GoogleApiAvailability#isGooglePlayServicesAvailable()}.
*/
public int isGoogleApiAvailableWithMinApkVersion(int minApkVersion) {
- try {
- PackageInfo gmsPackageInfo =
- ContextUtils.getApplicationContext().getPackageManager().getPackageInfo(
- GoogleApiAvailability.GOOGLE_PLAY_SERVICES_PACKAGE, /* flags= */ 0);
- int apkVersion = gmsPackageInfo.versionCode;
- if (apkVersion >= minApkVersion) return ConnectionResult.SUCCESS;
- } catch (PackageManager.NameNotFoundException e) {
- return ConnectionResult.SERVICE_MISSING;
- }
- return ConnectionResult.SERVICE_VERSION_UPDATE_REQUIRED;
+ return 1; /* SERVICE_MISSING*/
}
/**
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeVersionInfo.java b/chrome/android/java/src/org/chromium/chrome/browser/ChromeVersionInfo.java
--- a/chrome/android/java/src/org/chromium/chrome/browser/ChromeVersionInfo.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/ChromeVersionInfo.java
@@ -7,8 +7,6 @@ package org.chromium.chrome.browser;
import android.content.Context;
import android.content.pm.PackageManager;
-import com.google.android.gms.common.GoogleApiAvailability;
-
import org.chromium.base.ContextUtils;
import org.chromium.base.annotations.CalledByNative;
import org.chromium.chrome.browser.externalauth.ExternalAuthUtils;
@@ -88,7 +86,7 @@ public class ChromeVersionInfo {
public static String getGmsInfo() {
Context context = ContextUtils.getApplicationContext();
- final long sdkVersion = GoogleApiAvailability.GOOGLE_PLAY_SERVICES_VERSION_CODE;
+ final long sdkVersion = 12600000;
final long installedGmsVersion = getPlayServicesApkVersionNumber(context);
final String accessType;
@@ -105,12 +103,6 @@ public class ChromeVersionInfo {
}
private static long getPlayServicesApkVersionNumber(Context context) {
- try {
- return context.getPackageManager()
- .getPackageInfo(GoogleApiAvailability.GOOGLE_PLAY_SERVICES_PACKAGE, 0)
- .versionCode;
- } catch (PackageManager.NameNotFoundException e) {
- return 0;
- }
+ return 0;
}
}
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/component_updater/UpdateScheduler.java b/chrome/android/java/src/org/chromium/chrome/browser/component_updater/UpdateScheduler.java
--- a/chrome/android/java/src/org/chromium/chrome/browser/component_updater/UpdateScheduler.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/component_updater/UpdateScheduler.java
@@ -6,9 +6,6 @@ package org.chromium.chrome.browser.component_updater;
import android.os.Build;
-import com.google.android.gms.common.ConnectionResult;
-import com.google.android.gms.common.GoogleApiAvailability;
-
import org.chromium.base.ContextUtils;
import org.chromium.base.annotations.CalledByNative;
import org.chromium.base.annotations.JNINamespace;
@@ -35,10 +32,7 @@ public class UpdateScheduler {
@CalledByNative
/* package */ static boolean isAvailable() {
- return Build.VERSION.SDK_INT >= Build.VERSION_CODES.M
- || GoogleApiAvailability.getInstance().isGooglePlayServicesAvailable(
- ContextUtils.getApplicationContext())
- == ConnectionResult.SUCCESS;
+ return Build.VERSION.SDK_INT >= Build.VERSION_CODES.M;
}
/* package */ void onStartTaskBeforeNativeLoaded(TaskFinishedCallback callback) {
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/externalauth/ExternalAuthUtils.java b/chrome/android/java/src/org/chromium/chrome/browser/externalauth/ExternalAuthUtils.java
--- a/chrome/android/java/src/org/chromium/chrome/browser/externalauth/ExternalAuthUtils.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/externalauth/ExternalAuthUtils.java
@@ -15,9 +15,6 @@ import android.os.SystemClock;
import android.support.annotation.WorkerThread;
import android.text.TextUtils;
-import com.google.android.gms.common.ConnectionResult;
-import com.google.android.gms.common.GoogleApiAvailability;
-
import org.chromium.base.CommandLine;
import org.chromium.base.ContextUtils;
import org.chromium.base.Log;
@@ -165,9 +162,7 @@ public class ExternalAuthUtils {
* when it is updating.
*/
public boolean isGooglePlayServicesMissing(final Context context) {
- final int resultCode = checkGooglePlayServicesAvailable(context);
- return (resultCode == ConnectionResult.SERVICE_MISSING
- || resultCode == ConnectionResult.SERVICE_INVALID);
+ return true;
}
/**
@@ -190,7 +185,6 @@ public class ExternalAuthUtils {
Context context = ContextUtils.getApplicationContext();
final int resultCode = checkGooglePlayServicesAvailable(context);
recordConnectionResult(resultCode);
- if (resultCode == ConnectionResult.SUCCESS) return true;
// resultCode is some kind of error.
Log.v(TAG, "Unable to use Google Play Services: %s", describeError(resultCode));
if (isUserRecoverableError(resultCode)) {
@@ -271,8 +265,7 @@ public class ExternalAuthUtils {
StrictMode.ThreadPolicy oldPolicy = StrictMode.allowThreadDiskWrites();
try {
long time = SystemClock.elapsedRealtime();
- int isAvailable =
- GoogleApiAvailability.getInstance().isGooglePlayServicesAvailable(context);
+ int isAvailable = 1; /*SERVICE_MISSING*/
mRegistrationTimeHistogramSample.record(SystemClock.elapsedRealtime() - time);
return isAvailable;
} finally {
@@ -288,7 +281,7 @@ public class ExternalAuthUtils {
* @return true If the code represents a user-recoverable error
*/
protected boolean isUserRecoverableError(final int errorCode) {
- return GoogleApiAvailability.getInstance().isUserResolvableError(errorCode);
+ return false;
}
/**
@@ -298,6 +291,6 @@ public class ExternalAuthUtils {
* @return a textual description of the error code
*/
protected String describeError(final int errorCode) {
- return GoogleApiAvailability.getInstance().getErrorString(errorCode);
+ return "";
}
}
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/externalauth/UserRecoverableErrorHandler.java b/chrome/android/java/src/org/chromium/chrome/browser/externalauth/UserRecoverableErrorHandler.java
--- a/chrome/android/java/src/org/chromium/chrome/browser/externalauth/UserRecoverableErrorHandler.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/externalauth/UserRecoverableErrorHandler.java
@@ -10,8 +10,6 @@ import android.content.Context;
import android.content.DialogInterface;
import android.support.annotation.IntDef;
-import com.google.android.gms.common.GoogleApiAvailability;
-
import org.chromium.base.ThreadUtils;
import org.chromium.base.metrics.CachedMetrics.ActionEvent;
import org.chromium.base.metrics.CachedMetrics.EnumeratedHistogramSample;
@@ -120,7 +118,6 @@ public abstract class UserRecoverableErrorHandler {
sErrorHandlerActionHistogramSample.record(ErrorHandlerAction.IGNORED_AS_REDUNDANT);
return;
}
- GoogleApiAvailability.getInstance().showErrorNotification(context, errorCode);
sErrorHandlerActionHistogramSample.record(ErrorHandlerAction.SYSTEM_NOTIFICATION);
}
}
@@ -214,11 +211,7 @@ public abstract class UserRecoverableErrorHandler {
cancelDialog();
}
if (mDialog == null) {
- mDialog = GoogleApiAvailability.getInstance().getErrorDialog(
- mActivity, errorCode, NO_RESPONSE_REQUIRED);
mErrorCode = errorCode;
-
- DialogUserActionRecorder.createAndAttachToDialog(mDialog);
}
// This can happen if |errorCode| is ConnectionResult.SERVICE_INVALID.
if (mDialog != null && !mDialog.isShowing()) {
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/gcore/ChromeGoogleApiClientImpl.java b/chrome/android/java/src/org/chromium/chrome/browser/gcore/ChromeGoogleApiClientImpl.java
--- a/chrome/android/java/src/org/chromium/chrome/browser/gcore/ChromeGoogleApiClientImpl.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/gcore/ChromeGoogleApiClientImpl.java
@@ -6,9 +6,6 @@ package org.chromium.chrome.browser.gcore;
import android.content.Context;
-import com.google.android.gms.common.ConnectionResult;
-import com.google.android.gms.common.api.GoogleApiClient;
-
import org.chromium.base.Log;
import org.chromium.base.TraceEvent;
import org.chromium.chrome.browser.externalauth.ExternalAuthUtils;
@@ -22,7 +19,6 @@ public class ChromeGoogleApiClientImpl implements ChromeGoogleApiClient {
private static final String TAG = "Icing";
private final Context mApplicationContext;
- private final GoogleApiClient mClient;
/**
* @param context its application context will be exposed through
@@ -31,10 +27,9 @@ public class ChromeGoogleApiClientImpl implements ChromeGoogleApiClient {
* @param requireFirstPartyBuild true if the given client can only be used in a first-party
* build.
*/
- public ChromeGoogleApiClientImpl(Context context, GoogleApiClient client,
+ public ChromeGoogleApiClientImpl(Context context,
boolean requireFirstPartyBuild) {
mApplicationContext = context.getApplicationContext();
- mClient = client;
if (requireFirstPartyBuild && !ExternalAuthUtils.getInstance().isChromeGoogleSigned()) {
throw new IllegalStateException("GoogleApiClient requires first-party build");
}
@@ -42,7 +37,6 @@ public class ChromeGoogleApiClientImpl implements ChromeGoogleApiClient {
@Override
public void disconnect() {
- mClient.disconnect();
}
@Override
@@ -58,24 +52,11 @@ public class ChromeGoogleApiClientImpl implements ChromeGoogleApiClient {
@Override
public boolean connectWithTimeout(long timeout) {
TraceEvent.begin("ChromeGoogleApiClientImpl:connectWithTimeout");
- try {
- ConnectionResult result = mClient.blockingConnect(timeout, TimeUnit.MILLISECONDS);
- if (!result.isSuccess()) {
- Log.e(TAG, "Connection to GmsCore unsuccessful. Error %d", result.getErrorCode());
- } else {
- Log.d(TAG, "Connection to GmsCore successful.");
- }
- return result.isSuccess();
- } finally {
- TraceEvent.end("ChromeGoogleApiClientImpl:connectWithTimeout");
- }
+ TraceEvent.end("ChromeGoogleApiClientImpl:connectWithTimeout");
+ return false;
}
public Context getApplicationContext() {
return mApplicationContext;
}
-
- public GoogleApiClient getApiClient() {
- return mClient;
- }
}
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/gcore/GoogleApiClientHelper.java b/chrome/android/java/src/org/chromium/chrome/browser/gcore/GoogleApiClientHelper.java
--- a/chrome/android/java/src/org/chromium/chrome/browser/gcore/GoogleApiClientHelper.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/gcore/GoogleApiClientHelper.java
@@ -7,11 +7,6 @@ package org.chromium.chrome.browser.gcore;
import android.os.Bundle;
import android.os.Handler;
-import com.google.android.gms.common.ConnectionResult;
-import com.google.android.gms.common.api.GoogleApiClient;
-import com.google.android.gms.common.api.GoogleApiClient.ConnectionCallbacks;
-import com.google.android.gms.common.api.GoogleApiClient.OnConnectionFailedListener;
-
import org.chromium.base.ApplicationStatus;
import org.chromium.base.ApplicationStatus.ApplicationStateListener;
import org.chromium.base.Log;
@@ -67,29 +62,15 @@ import org.chromium.base.ThreadUtils;
* }
* </pre>
*/
-public class GoogleApiClientHelper
- implements OnConnectionFailedListener, ConnectionCallbacks {
+public class GoogleApiClientHelper {
private static final String TAG = "GCore";
private int mResolutionAttempts;
private boolean mWasConnectedBefore;
private final Handler mHandler = new Handler(ThreadUtils.getUiThreadLooper());
- private final GoogleApiClient mClient;
private long mDisconnectionDelayMs;
private Runnable mPendingDisconnect;
- /**
- * Creates a helper and enrolls it in the various connection management features.
- * See the class documentation for {@link GoogleApiClientHelper} for more information.
- *
- * @param client The client to wrap.
- */
- public GoogleApiClientHelper(GoogleApiClient client) {
- mClient = client;
- enableConnectionRetrying(true);
- enableLifecycleManagement(true);
- }
-
/**
* Opts in or out of lifecycle management. The client's connection will be closed and reopened
* when Chrome goes in and out of background.
@@ -116,13 +97,6 @@ public class GoogleApiClientHelper
* Enabling or disabling it while it is already enabled or disabled has no effect.
*/
public void enableConnectionRetrying(boolean enabled) {
- if (enabled) {
- mClient.registerConnectionCallbacks(this);
- mClient.registerConnectionFailedListener(this);
- } else {
- mClient.unregisterConnectionCallbacks(this);
- mClient.unregisterConnectionFailedListener(this);
- }
}
/**
@@ -155,21 +129,11 @@ public class GoogleApiClientHelper
// Cancel and reschedule the disconnection if we are in the background. We do it early to
// avoid race conditions between a disconnect on the UI thread and the connect below.
if (!ApplicationStatus.hasVisibleActivities()) scheduleDisconnection();
-
- // The client might be disconnected if we were idle in the background for too long.
- if (!mClient.isConnected() && !mClient.isConnecting()) {
- Log.d(TAG, "Reconnecting the client.");
- mClient.connect();
- }
}
void restoreConnectedState() {
// If we go back to the foreground before a delayed disconnect happens, cancel it.
cancelPendingDisconnection();
-
- if (mWasConnectedBefore) {
- mClient.connect();
- }
}
/**
@@ -192,12 +156,6 @@ public class GoogleApiClientHelper
}
private void disconnect() {
- if (mClient.isConnected() || mClient.isConnecting()) {
- mWasConnectedBefore = true;
- }
-
- // We always call disconnect to abort possibly pending connection requests.
- mClient.disconnect();
}
private void cancelPendingDisconnection() {
@@ -207,43 +165,7 @@ public class GoogleApiClientHelper
mPendingDisconnect = null;
}
- @Override
- public void onConnectionFailed(ConnectionResult result) {
- if (!isErrorRecoverableByRetrying(result.getErrorCode())) {
- Log.d(TAG, "Not retrying managed client connection. Unrecoverable error: %d",
- result.getErrorCode());
- return;
- }
-
- if (mResolutionAttempts < ConnectedTask.RETRY_NUMBER_LIMIT) {
- Log.d(TAG, "Retrying managed client connection. attempt %d/%d - errorCode: %d",
- mResolutionAttempts, ConnectedTask.RETRY_NUMBER_LIMIT, result.getErrorCode());
- mResolutionAttempts += 1;
-
- mHandler.postDelayed(new Runnable() {
- @Override
- public void run() {
- mClient.connect();
- }
- }, ConnectedTask.CONNECTION_RETRY_TIME_MS);
- }
- }
-
- @Override
- public void onConnected(Bundle connectionHint) {
- mResolutionAttempts = 0;
- }
-
- @Override
- public void onConnectionSuspended(int cause) {
- // GoogleApiClient handles retrying on suspension itself. Logging in case it didn't succeed
- // for some reason.
- Log.w(TAG, "Managed client connection suspended. Cause: %d", cause);
- }
-
private static boolean isErrorRecoverableByRetrying(int errorCode) {
- return errorCode == ConnectionResult.INTERNAL_ERROR
- || errorCode == ConnectionResult.NETWORK_ERROR
- || errorCode == ConnectionResult.SERVICE_UPDATING;
+ return false;
}
}
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/omaha/UpdateStatusProvider.java b/chrome/android/java/src/org/chromium/chrome/browser/omaha/UpdateStatusProvider.java
--- a/chrome/android/java/src/org/chromium/chrome/browser/omaha/UpdateStatusProvider.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/omaha/UpdateStatusProvider.java
@@ -16,8 +16,6 @@ import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.text.TextUtils;
-import com.google.android.gms.common.GooglePlayServicesUtil;
-
import org.chromium.base.ActivityState;
import org.chromium.base.ApplicationStatus;
import org.chromium.base.ApplicationStatus.ActivityStateListener;
@@ -428,13 +426,7 @@ public class UpdateStatusProvider implements ActivityStateListener {
}
private boolean isGooglePlayStoreAvailable(Context context) {
- try {
- context.getPackageManager().getPackageInfo(
- GooglePlayServicesUtil.GOOGLE_PLAY_STORE_PACKAGE, 0);
- } catch (PackageManager.NameNotFoundException e) {
- return false;
- }
- return true;
+ return false;
}
@TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR2)
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/PreferencesLauncher.java b/chrome/android/java/src/org/chromium/chrome/browser/preferences/PreferencesLauncher.java
--- a/chrome/android/java/src/org/chromium/chrome/browser/preferences/PreferencesLauncher.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/preferences/PreferencesLauncher.java
@@ -12,8 +12,6 @@ import android.os.Build;
import android.os.Bundle;
import android.support.annotation.Nullable;
-import com.google.android.gms.common.ConnectionResult;
-
import org.chromium.base.annotations.CalledByNative;
import org.chromium.base.metrics.RecordHistogram;
import org.chromium.base.metrics.RecordUserAction;
@@ -202,8 +200,7 @@ public class PreferencesLauncher {
int minGooglePlayServicesVersion = ChromeFeatureList.getFieldTrialParamByFeatureAsInt(
GOOGLE_ACCOUNT_PWM_UI, MIN_GOOGLE_PLAY_SERVICES_VERSION_PARAM,
DEFAULT_MIN_GOOGLE_PLAY_SERVICES_APK_VERSION);
- if (AppHooks.get().isGoogleApiAvailableWithMinApkVersion(minGooglePlayServicesVersion)
- != ConnectionResult.SUCCESS)
+ if (true)
return false;
if (!ChromeFeatureList.isEnabled(GOOGLE_ACCOUNT_PWM_UI)) return false;
diff --git a/chrome/test/android/BUILD.gn b/chrome/test/android/BUILD.gn
--- a/chrome/test/android/BUILD.gn
+++ b/chrome/test/android/BUILD.gn
@@ -67,8 +67,6 @@ android_library("chrome_java_test_support") {
"javatests/src/org/chromium/chrome/test/util/TranslateUtil.java",
]
deps = [
- "$google_play_services_package:google_play_services_base_java",
- "$google_play_services_package:google_play_services_basement_java",
"//base:base_java",
"//base:base_java_test_support",
"//chrome/android:chrome_java",
diff --git a/components/background_task_scheduler/BUILD.gn b/components/background_task_scheduler/BUILD.gn
--- a/components/background_task_scheduler/BUILD.gn
+++ b/components/background_task_scheduler/BUILD.gn
@@ -51,9 +51,6 @@ if (is_android) {
deps = [
":background_task_scheduler_task_ids_java",
- "$google_play_services_package:google_play_services_base_java",
- "$google_play_services_package:google_play_services_basement_java",
- "$google_play_services_package:google_play_services_tasks_java",
"//base:base_java",
"//third_party/android_deps:com_android_support_support_annotations_java",
]
@@ -70,9 +67,6 @@ if (is_android) {
deps = [
":background_task_scheduler_java",
":background_task_scheduler_task_ids_java",
- "$google_play_services_package:google_play_services_base_java",
- "$google_play_services_package:google_play_services_basement_java",
- "$google_play_services_package:google_play_services_tasks_java",
"//base:base_java",
"//base:base_java_test_support",
"//third_party/android_support_test_runner:runner_java",
@@ -93,9 +87,6 @@ if (is_android) {
deps = [
":background_task_scheduler_java",
- "$google_play_services_package:google_play_services_base_java",
- "$google_play_services_package:google_play_services_basement_java",
- "$google_play_services_package:google_play_services_tasks_java",
"//base:base_java",
"//base:base_java_test_support",
"//base:base_junit_test_support",
diff --git a/components/signin/core/browser/android/BUILD.gn b/components/signin/core/browser/android/BUILD.gn
--- a/components/signin/core/browser/android/BUILD.gn
+++ b/components/signin/core/browser/android/BUILD.gn
@@ -16,8 +16,6 @@ generate_jni("jni_headers") {
android_library("java") {
deps = [
- "$google_play_services_package:google_play_services_base_java",
- "$google_play_services_package:google_play_services_basement_java",
"//base:base_java",
"//base:jni_java",
"//net/android:net_java",
diff --git a/components/signin/core/browser/android/java/src/org/chromium/components/signin/GmsAvailabilityException.java b/components/signin/core/browser/android/java/src/org/chromium/components/signin/GmsAvailabilityException.java
--- a/components/signin/core/browser/android/java/src/org/chromium/components/signin/GmsAvailabilityException.java
+++ b/components/signin/core/browser/android/java/src/org/chromium/components/signin/GmsAvailabilityException.java
@@ -4,8 +4,6 @@
package org.chromium.components.signin;
-import com.google.android.gms.common.GoogleApiAvailability;
-
/**
* This class encapsulates return code if GMSCore package is not available.
*/
@@ -27,6 +25,6 @@ public class GmsAvailabilityException extends AccountManagerDelegateException {
}
public boolean isUserResolvableError() {
- return GoogleApiAvailability.getInstance().isUserResolvableError(mResultCode);
+ return false;
}
}
diff --git a/device/BUILD.gn b/device/BUILD.gn
--- a/device/BUILD.gn
+++ b/device/BUILD.gn
@@ -430,8 +430,6 @@ if (is_android) {
junit_binary("device_junit_tests") {
java_files = [ "gamepad/android/junit/src/org/chromium/device/gamepad/GamepadMappingsTest.java" ]
deps = [
- "$google_play_services_package:google_play_services_base_java",
- "$google_play_services_package:google_play_services_basement_java",
"//base:base_java",
"//base:base_java_test_support",
"//base:base_junit_test_support",
diff --git a/remoting/android/client_java_tmpl.gni b/remoting/android/client_java_tmpl.gni
--- a/remoting/android/client_java_tmpl.gni
+++ b/remoting/android/client_java_tmpl.gni
@@ -95,9 +95,6 @@ template("remoting_android_client_java_tmpl") {
if (defined(invoker.play_services_package)) {
deps += [
- "${invoker.play_services_package}:google_play_services_auth_base_java",
- "${invoker.play_services_package}:google_play_services_base_java",
- "${invoker.play_services_package}:google_play_services_basement_java",
]
}
diff --git a/services/BUILD.gn b/services/BUILD.gn
--- a/services/BUILD.gn
+++ b/services/BUILD.gn
@@ -100,8 +100,6 @@ if (is_android) {
"shape_detection/android/junit/src/org/chromium/shape_detection/BitmapUtilsTest.java",
]
deps = [
- "$google_play_services_package:google_play_services_base_java",
- "$google_play_services_package:google_play_services_basement_java",
"//base:base_java",
"//base:base_java_test_support",
"//base:base_junit_test_support",
@@ -129,8 +127,6 @@ if (is_android) {
"shape_detection/android/javatests/src/org/chromium/shape_detection/TextDetectionImplTest.java",
]
deps = [
- "$google_play_services_package:google_play_services_base_java",
- "$google_play_services_package:google_play_services_basement_java",
"//base:base_java",
"//base:base_java_test_support",
"//mojo/public/java:base_java",
diff --git a/services/device/geolocation/BUILD.gn b/services/device/geolocation/BUILD.gn
--- a/services/device/geolocation/BUILD.gn
+++ b/services/device/geolocation/BUILD.gn
@@ -143,8 +143,6 @@ if (is_android) {
deps = [
":geolocation",
":geolocation_jni_headers",
- "$google_play_services_package:google_play_services_base_java",
- "$google_play_services_package:google_play_services_basement_java",
"//base:base_java",
"//components/location/android:location_java",
"//services/device/public/java:geolocation_java",
diff --git a/services/shape_detection/BUILD.gn b/services/shape_detection/BUILD.gn
--- a/services/shape_detection/BUILD.gn
+++ b/services/shape_detection/BUILD.gn
@@ -97,8 +97,6 @@ if (is_android) {
]
deps = [
- "$google_play_services_package:google_play_services_base_java",
- "$google_play_services_package:google_play_services_basement_java",
"//base:base_java",
"//mojo/public/java:base_java",
"//mojo/public/java:bindings_java",
diff --git a/services/shape_detection/android/java/src/org/chromium/shape_detection/FaceDetectionProviderImpl.java b/services/shape_detection/android/java/src/org/chromium/shape_detection/FaceDetectionProviderImpl.java
--- a/services/shape_detection/android/java/src/org/chromium/shape_detection/FaceDetectionProviderImpl.java
+++ b/services/shape_detection/android/java/src/org/chromium/shape_detection/FaceDetectionProviderImpl.java
@@ -4,9 +4,6 @@
package org.chromium.shape_detection;
-import com.google.android.gms.common.ConnectionResult;
-import com.google.android.gms.common.GoogleApiAvailability;
-
import org.chromium.base.ContextUtils;
import org.chromium.mojo.bindings.InterfaceRequest;
import org.chromium.mojo.system.MojoException;
@@ -24,10 +21,7 @@ public class FaceDetectionProviderImpl implements FaceDetectionProvider {
@Override
public void createFaceDetection(
InterfaceRequest<FaceDetection> request, FaceDetectorOptions options) {
- final boolean isGmsCoreSupported =
- GoogleApiAvailability.getInstance().isGooglePlayServicesAvailable(
- ContextUtils.getApplicationContext())
- == ConnectionResult.SUCCESS;
+ final boolean isGmsCoreSupported = false;
if (isGmsCoreSupported) {
FaceDetection.MANAGER.bind(new FaceDetectionImplGmsCore(options), request);
diff --git a/third_party/android_deps/BUILD.gn b/third_party/android_deps/BUILD.gn
--- a/third_party/android_deps/BUILD.gn
+++ b/third_party/android_deps/BUILD.gn
@@ -25,21 +25,6 @@ java_group("android_support_v7_appcompat_java") {
}
# Aliases
-java_group("google_play_services_basement_java") {
- deps = [
- ":com_google_android_gms_play_services_basement_java",
- ]
-}
-java_group("google_play_services_tasks_java") {
- deps = [
- ":com_google_android_gms_play_services_tasks_java",
- ]
-}
-java_group("google_play_services_base_java") {
- deps = [
- ":com_google_android_gms_play_services_base_java",
- ]
-}
# The dependencies below are used by chromecast internal.
java_group("android_support_v7_preference_java") {
@@ -318,44 +303,6 @@ android_aar_prebuilt("com_android_support_support_v4_java") {
]
}
-# This is generated, do not edit. Update BuildConfigGenerator.groovy instead.
-android_aar_prebuilt("com_google_android_gms_play_services_base_java") {
- aar_path = "libs/com_google_android_gms_play_services_base/play-services-base-15.0.1.aar"
- info_path = "libs/com_google_android_gms_play_services_base/com_google_android_gms_play_services_base.info"
- deps = [
- ":com_google_android_gms_play_services_basement_java",
- ":com_google_android_gms_play_services_tasks_java",
- ]
-
- # Removing drawables from GMS .aars as they are unused bloat.
- strip_drawables = true
-}
-
-# This is generated, do not edit. Update BuildConfigGenerator.groovy instead.
-android_aar_prebuilt("com_google_android_gms_play_services_basement_java") {
- aar_path = "libs/com_google_android_gms_play_services_basement/play-services-basement-15.0.1.aar"
- info_path = "libs/com_google_android_gms_play_services_basement/com_google_android_gms_play_services_basement.info"
- deps = [
- ":com_android_support_support_v4_java",
- ]
-
- # Removing drawables from GMS .aars as they are unused bloat.
- strip_drawables = true
- input_jars_paths = [ "$android_sdk/optional/org.apache.http.legacy.jar" ]
-}
-
-# This is generated, do not edit. Update BuildConfigGenerator.groovy instead.
-android_aar_prebuilt("com_google_android_gms_play_services_tasks_java") {
- aar_path = "libs/com_google_android_gms_play_services_tasks/play-services-tasks-15.0.1.aar"
- info_path = "libs/com_google_android_gms_play_services_tasks/com_google_android_gms_play_services_tasks.info"
- deps = [
- ":com_google_android_gms_play_services_basement_java",
- ]
-
- # Removing drawables from GMS .aars as they are unused bloat.
- strip_drawables = true
-}
-
# This is generated, do not edit. Update BuildConfigGenerator.groovy instead.
android_aar_prebuilt("com_google_ar_core_java") {
aar_path = "libs/com_google_ar_core/core-1.8.0.aar"
diff --git a/third_party/cacheinvalidation/BUILD.gn b/third_party/cacheinvalidation/BUILD.gn
--- a/third_party/cacheinvalidation/BUILD.gn
+++ b/third_party/cacheinvalidation/BUILD.gn
@@ -137,7 +137,6 @@ if (is_android) {
emma_never_instrument = true
deps = [
":cacheinvalidation_proto_java",
- "$google_play_services_package:google_play_services_tasks_java",
"//third_party/android_protobuf:protobuf_nano_javalib",
]
diff --git a/third_party/robolectric/BUILD.gn b/third_party/robolectric/BUILD.gn
--- a/third_party/robolectric/BUILD.gn
+++ b/third_party/robolectric/BUILD.gn
@@ -944,8 +944,6 @@ java_library("shadows_play_services_java") {
":robolectric_shadowapi_java",
":robolectric_utils_java",
":shadows_core_java",
- "$google_play_services_package:google_play_services_base_java",
- "$google_play_services_package:google_play_services_basement_java",
"//third_party/android_deps:android_support_v4_java",
"//third_party/gson:gson_java",
"//third_party/guava:guava_java",