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.
 

745 lines
33 KiB

From: Wengling Chen <[email protected]>
Date: Sat, 2 Nov 2019 08:58:19 +0100
Subject: Remove dependency on
com.google.android.gms.common/auth/signin/dynamic,
com.google.android.gms.tasks
---
chrome/android/BUILD.gn | 8
chrome/android/features/cablev2_authenticator/BUILD.gn | 2
chrome/android/features/media_router/BUILD.gn | 2
chrome/android/features/media_router/java/src/org/chromium/chrome/browser/media/router/ChromeMediaRouter.java | 7
chrome/android/java/AndroidManifest.xml | 9 -
chrome/android/java/src/org/chromium/chrome/browser/AppHooks.java | 14 -
chrome/android/java/src/org/chromium/chrome/browser/ChromeVersionInfo.java | 12 -
chrome/android/java/src/org/chromium/chrome/browser/component_updater/UpdateScheduler.java | 8
chrome/android/java/src/org/chromium/chrome/browser/externalauth/ExternalAuthUtils.java | 14 -
chrome/android/java/src/org/chromium/chrome/browser/externalauth/UserRecoverableErrorHandler.java | 7
chrome/android/java/src/org/chromium/chrome/browser/gcore/ChromeGoogleApiClientImpl.java | 25 ---
chrome/android/java/src/org/chromium/chrome/browser/gcore/GoogleApiClientHelper.java | 82 ----------
chrome/android/java/src/org/chromium/chrome/browser/omaha/UpdateStatusProvider.java | 10 -
chrome/android/java/src/org/chromium/chrome/browser/password_manager/PasswordManagerLauncher.java | 4
chrome/test/android/BUILD.gn | 2
components/background_task_scheduler/BUILD.gn | 3
components/background_task_scheduler/internal/BUILD.gn | 6
components/signin/core/browser/android/BUILD.gn | 2
components/signin/core/browser/android/java/src/org/chromium/components/signin/GmsAvailabilityException.java | 4
content/public/android/BUILD.gn | 3
content/test/BUILD.gn | 3
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
third_party/cacheinvalidation/BUILD.gn | 1
third_party/robolectric/BUILD.gn | 2
28 files changed, 17 insertions(+), 226 deletions(-)
--- a/chrome/android/BUILD.gn
+++ b/chrome/android/BUILD.gn
@@ -275,9 +275,6 @@ android_library("chrome_java") {
":partner_location_descriptor_proto_java",
":update_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/features/keyboard_accessory:public_java",
@@ -706,8 +703,6 @@ junit_binary("chrome_junit_tests") {
":chrome_app_java_resources",
":chrome_java",
":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",
@@ -820,9 +815,6 @@ android_library("chrome_test_java") {
":chrome_test_util_java",
":native_java_unittests_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",
"//base:jni_java",
--- a/chrome/android/features/media_router/BUILD.gn
+++ b/chrome/android/features/media_router/BUILD.gn
@@ -10,8 +10,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",
"//base:jni_java",
"//chrome/android:chrome_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
@@ -8,9 +8,6 @@ import androidx.annotation.Nullable;
import androidx.annotation.VisibleForTesting;
import androidx.mediarouter.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;
@@ -43,9 +40,7 @@ public class ChromeMediaRouter implement
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);
--- a/chrome/android/java/AndroidManifest.xml
+++ b/chrome/android/java/AndroidManifest.xml
@@ -775,15 +775,6 @@ by a child template that "extends" this
</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"
--- a/chrome/android/java/src/org/chromium/chrome/browser/AppHooks.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/AppHooks.java
@@ -10,9 +10,6 @@ import android.content.pm.PackageManager
import androidx.annotation.Nullable;
import androidx.annotation.VisibleForTesting;
-import com.google.android.gms.common.ConnectionResult;
-import com.google.android.gms.common.GoogleApiAvailability;
-
import org.chromium.base.Callback;
import org.chromium.base.ContextUtils;
import org.chromium.base.annotations.CalledByNative;
@@ -333,16 +330,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*/
}
/**
--- 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;
@@ -95,7 +93,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;
@@ -118,12 +116,6 @@ public class ChromeVersionInfo {
* package is not found.
*/
public static int getPlayServicesApkVersionNumber(Context context) {
- try {
- return context.getPackageManager()
- .getPackageInfo(GoogleApiAvailability.GOOGLE_PLAY_SERVICES_PACKAGE, 0)
- .versionCode;
- } catch (PackageManager.NameNotFoundException e) {
- return 0;
- }
+ return 0;
}
}
--- 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.comp
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;
@@ -36,10 +33,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) {
--- 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.text.TextUtils;
import androidx.annotation.VisibleForTesting;
import androidx.annotation.WorkerThread;
-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;
@@ -158,9 +155,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;
}
/**
@@ -182,7 +177,6 @@ public class ExternalAuthUtils {
Context context = ContextUtils.getApplicationContext();
final int resultCode = checkGooglePlayServicesAvailable(context);
- 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)) {
@@ -252,7 +246,7 @@ public class ExternalAuthUtils {
protected int checkGooglePlayServicesAvailable(final Context context) {
// TODO(crbug.com/577190): Temporarily allowing disk access until more permanent fix is in.
try (StrictModeContext ignored = StrictModeContext.allowDiskWrites()) {
- return GoogleApiAvailability.getInstance().isGooglePlayServicesAvailable(context);
+ return 1; /*SERVICE_MISSING*/
}
}
@@ -264,7 +258,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;
}
/**
@@ -274,6 +268,6 @@ public class ExternalAuthUtils {
* @return a textual description of the error code
*/
protected String describeError(final int errorCode) {
- return GoogleApiAvailability.getInstance().getErrorString(errorCode);
+ return "";
}
}
--- a/chrome/android/java/src/org/chromium/chrome/browser/externalauth/UserRecoverableErrorHandler.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/externalauth/UserRecoverableErrorHandler.java
@@ -9,8 +9,6 @@ import android.app.Dialog;
import android.content.Context;
import android.content.DialogInterface;
-import com.google.android.gms.common.GoogleApiAvailability;
-
import org.chromium.base.ThreadUtils;
import org.chromium.base.metrics.RecordUserAction;
@@ -90,7 +88,6 @@ public abstract class UserRecoverableErr
if (!sNotificationShown.getAndSet(true)) {
return;
}
- GoogleApiAvailability.getInstance().showErrorNotification(context, errorCode);
}
}
@@ -183,11 +180,7 @@ public abstract class UserRecoverableErr
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()) {
--- 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.gcor
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 i
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 i
* @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 i
@Override
public void disconnect() {
- mClient.disconnect();
}
@Override
@@ -58,24 +52,11 @@ public class ChromeGoogleApiClientImpl i
@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;
- }
}
--- 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.gcor
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,30 +62,16 @@ 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;
}
}
--- a/chrome/android/java/src/org/chromium/chrome/browser/omaha/UpdateStatusProvider.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/omaha/UpdateStatusProvider.java
@@ -21,8 +21,6 @@ import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.annotation.VisibleForTesting;
-import com.google.android.gms.common.GooglePlayServicesUtil;
-
import org.chromium.base.ActivityState;
import org.chromium.base.ApplicationStatus;
import org.chromium.base.ApplicationStatus.ActivityStateListener;
@@ -465,13 +463,7 @@ public class UpdateStatusProvider implem
}
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)
--- a/chrome/test/android/BUILD.gn
+++ b/chrome/test/android/BUILD.gn
@@ -197,8 +197,6 @@ android_library("chrome_java_test_suppor
"javatests/src/org/chromium/chrome/test/util/browser/webapps/WebappTestPage.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",
--- a/components/background_task_scheduler/BUILD.gn
+++ b/components/background_task_scheduler/BUILD.gn
@@ -119,9 +119,6 @@ if (is_android) {
]
deps = [
- "$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",
"internal:internal_java",
"internal:proto_java",
"//base:base_java",
--- a/components/signin/core/browser/android/BUILD.gn
+++ b/components/signin/core/browser/android/BUILD.gn
@@ -14,8 +14,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",
--- 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 ex
}
public boolean isUserResolvableError() {
- return GoogleApiAvailability.getInstance().isUserResolvableError(mResultCode);
+ return false;
}
}
--- a/content/public/android/BUILD.gn
+++ b/content/public/android/BUILD.gn
@@ -75,9 +75,6 @@ action("generate_sandboxed_service_srcja
android_library("content_java") {
deps = [
":content_java_resources",
- "$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",
"//components/download/public/common:public_java",
--- a/content/test/BUILD.gn
+++ b/content/test/BUILD.gn
@@ -2424,9 +2424,6 @@ if (is_android) {
testonly = true
sources = content_java_sources_needing_jni
deps = [
- "$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",
"//content/public/android:content_java",
"//ui/android:ui_full_java",
--- a/device/BUILD.gn
+++ b/device/BUILD.gn
@@ -384,8 +384,6 @@ if (is_android) {
junit_binary("device_junit_tests") {
sources = [ "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",
--- a/remoting/android/client_java_tmpl.gni
+++ b/remoting/android/client_java_tmpl.gni
@@ -102,9 +102,6 @@ template("remoting_android_client_java_t
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",
]
}
--- a/services/BUILD.gn
+++ b/services/BUILD.gn
@@ -103,8 +103,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",
@@ -132,8 +130,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",
--- a/services/device/geolocation/BUILD.gn
+++ b/services/device/geolocation/BUILD.gn
@@ -156,8 +156,6 @@ if (is_android) {
deps = [
":geolocation_jni_headers",
- "$google_play_services_package:google_play_services_base_java",
- "$google_play_services_package:google_play_services_basement_java",
"//base:base_java",
"//base:jni_java",
"//components/location/android:location_java",
--- a/services/shape_detection/BUILD.gn
+++ b/services/shape_detection/BUILD.gn
@@ -89,8 +89,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",
--- a/third_party/cacheinvalidation/BUILD.gn
+++ b/third_party/cacheinvalidation/BUILD.gn
@@ -133,7 +133,6 @@ if (is_android) {
jacoco_never_instrument = true
deps = [
":cacheinvalidation_proto_java",
- "$google_play_services_package:google_play_services_tasks_java",
"//base:base_java",
"//third_party/android_protobuf:protobuf_nano_javalib",
]
--- a/third_party/robolectric/BUILD.gn
+++ b/third_party/robolectric/BUILD.gn
@@ -1162,8 +1162,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/android_deps:com_android_support_support_annotations_java",
"//third_party/android_deps:com_android_support_support_fragment_java",
--- a/chrome/android/java/src/org/chromium/chrome/browser/password_manager/PasswordManagerLauncher.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/password_manager/PasswordManagerLauncher.java
@@ -6,8 +6,6 @@ package org.chromium.chrome.browser.pass
import android.app.Activity;
-import com.google.android.gms.common.ConnectionResult;
-
import org.chromium.base.annotations.CalledByNative;
import org.chromium.base.metrics.RecordHistogram;
import org.chromium.chrome.browser.AppHooks;
@@ -97,7 +95,7 @@ public class PasswordManagerLauncher {
GOOGLE_ACCOUNT_PWM_UI, MIN_GOOGLE_PLAY_SERVICES_VERSION_PARAM,
DEFAULT_MIN_GOOGLE_PLAY_SERVICES_APK_VERSION);
if (AppHooks.get().isGoogleApiAvailableWithMinApkVersion(minGooglePlayServicesVersion)
- != ConnectionResult.SUCCESS) {
+ != 0) {
return false;
}
--- a/components/background_task_scheduler/internal/BUILD.gn
+++ b/components/background_task_scheduler/internal/BUILD.gn
@@ -27,9 +27,6 @@ if (is_android) {
deps = [
":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",
"//components/background_task_scheduler:background_task_scheduler_task_ids_java",
"//components/background_task_scheduler:public_java",
@@ -97,9 +94,6 @@ if (is_android) {
deps = [
":internal_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",
"//components/background_task_scheduler:background_task_scheduler_task_ids_java",
--- a/chrome/android/features/cablev2_authenticator/BUILD.gn
+++ b/chrome/android/features/cablev2_authenticator/BUILD.gn
@@ -14,8 +14,6 @@ android_library("java") {
]
deps = [
- "$google_play_services_package:google_play_services_base_java",
- "$google_play_services_package:google_play_services_tasks_java",
"//base:base_java",
"//base:jni_java",
"//chrome/android:chrome_java",