OLD | NEW |
---|---|
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 package org.chromium.chrome.browser.signin; | 5 package org.chromium.chrome.browser.signin; |
6 | 6 |
7 import android.app.Activity; | 7 import android.app.Activity; |
8 import android.app.FragmentManager; | 8 import android.app.FragmentManager; |
9 import android.content.Context; | 9 import android.content.Context; |
10 import android.graphics.Bitmap; | 10 import android.graphics.Bitmap; |
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
329 showConfirmSigninPageAccountTrackerServiceCheck(); | 329 showConfirmSigninPageAccountTrackerServiceCheck(); |
330 } | 330 } |
331 } | 331 } |
332 callback.onResult(true); | 332 callback.onResult(true); |
333 } | 333 } |
334 }); | 334 }); |
335 } | 335 } |
336 | 336 |
337 private boolean checkGooglePlayServicesAvailable() { | 337 private boolean checkGooglePlayServicesAvailable() { |
338 ExternalAuthUtils extAuthUtils = ExternalAuthUtils.getInstance(); | 338 ExternalAuthUtils extAuthUtils = ExternalAuthUtils.getInstance(); |
339 boolean cancelable = !SigninManager.get(getContext()).isForceSigninEnabl ed(); | 339 if (mGooglePlayServicesUpdateErrorHandler == null) { |
340 mGooglePlayServicesUpdateErrorHandler = new UserRecoverableErrorHandler. ModalDialog( | 340 boolean cancelable = !SigninManager.get(getContext()).isForceSigninE nabled(); |
estevenson
2017/01/11 19:35:12
I couldn't figure out if this can change during th
Bernhard Bauer
2017/01/12 10:14:33
According to https://cs.chromium.org/chromium/src/
estevenson
2017/01/12 19:52:33
Ahh cool, thanks!
| |
341 mDelegate.getActivity(), cancelable); | 341 mGooglePlayServicesUpdateErrorHandler = new UserRecoverableErrorHand ler.ModalDialog( |
342 mDelegate.getActivity(), cancelable); | |
343 } | |
342 int resultCode = extAuthUtils.canUseGooglePlayServicesResultCode( | 344 int resultCode = extAuthUtils.canUseGooglePlayServicesResultCode( |
343 getContext(), mGooglePlayServicesUpdateErrorHandler); | 345 getContext(), mGooglePlayServicesUpdateErrorHandler); |
344 if (extAuthUtils.isGooglePlayServicesUpdateRequiredError(resultCode)) { | 346 if (extAuthUtils.isGooglePlayServicesUpdateRequiredError(resultCode)) { |
345 mIsGooglePlayServicesOutOfDate = true; | 347 mIsGooglePlayServicesOutOfDate = true; |
346 } | 348 } |
347 return resultCode == ConnectionResult.SUCCESS; | 349 return resultCode == ConnectionResult.SUCCESS; |
348 } | 350 } |
349 | 351 |
350 /** | 352 /** |
351 * Attempt to select a new element that is in the new list, but not in the o ld list. | 353 * Attempt to select a new element that is in the new list, but not in the o ld list. |
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
620 * @return Whether the view is in "no choice, just a confirmation" forced-ac count mode. | 622 * @return Whether the view is in "no choice, just a confirmation" forced-ac count mode. |
621 */ | 623 */ |
622 public boolean isInForcedAccountMode() { | 624 public boolean isInForcedAccountMode() { |
623 return mForcedAccountName != null; | 625 return mForcedAccountName != null; |
624 } | 626 } |
625 | 627 |
626 private String getSelectedAccountName() { | 628 private String getSelectedAccountName() { |
627 return mAccountNames.get(mSigninChooseView.getSelectedAccountPosition()) ; | 629 return mAccountNames.get(mSigninChooseView.getSelectedAccountPosition()) ; |
628 } | 630 } |
629 } | 631 } |
OLD | NEW |