Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2469)

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/signin/AccountIdProvider.java

Issue 1554103002: Notify the lack of Google Play Services only if the user tries to Signin. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix test Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/signin/AccountTrackerService.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/android/java/src/org/chromium/chrome/browser/signin/AccountIdProvider.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/signin/AccountIdProvider.java b/chrome/android/java/src/org/chromium/chrome/browser/signin/AccountIdProvider.java
index 902c22b0e78073a0f3c9c04fb2ee27c8fe7481b1..423409da02eae5e19f6b971f2c62a95ed30e79f1 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/signin/AccountIdProvider.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/signin/AccountIdProvider.java
@@ -4,7 +4,6 @@
package org.chromium.chrome.browser.signin;
-import android.app.Activity;
import android.content.Context;
import com.google.android.gms.auth.GoogleAuthException;
@@ -18,8 +17,6 @@ import org.chromium.chrome.browser.externalauth.UserRecoverableErrorHandler;
import java.io.IOException;
-import javax.annotation.Nullable;
-
/**
* Returns a stable id that can be used to identify a Google Account. This
* id does not change if the email address associated to the account changes,
@@ -55,15 +52,10 @@ public class AccountIdProvider {
* Returns whether the AccountIdProvider can be used.
* Since the AccountIdProvider queries Google Play services, this basically checks whether
* Google Play services is available.
- *
- * @param activity If an activity is provided, it will be used to show a Modal Dialog notifying
- * the user to update Google Play services, else a System notification is shown.
*/
- public boolean canBeUsed(Context ctx, @Nullable Activity activity) {
- UserRecoverableErrorHandler errorHandler = activity != null
- ? new UserRecoverableErrorHandler.ModalDialog(activity)
- : new UserRecoverableErrorHandler.SystemNotification();
- return ExternalAuthUtils.getInstance().canUseGooglePlayServices(ctx, errorHandler);
+ public boolean canBeUsed(Context ctx) {
+ return ExternalAuthUtils.getInstance().canUseGooglePlayServices(
+ ctx, new UserRecoverableErrorHandler.Silent());
}
/**
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/signin/AccountTrackerService.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698