Java Code Examples for org.chromium.chrome.browser.externalauth.UserRecoverableErrorHandler#ModalDialog

The following examples show how to use org.chromium.chrome.browser.externalauth.UserRecoverableErrorHandler#ModalDialog . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SigninManager.java    From delion with Apache License 2.0 5 votes vote down vote up
private void progressSignInFlowSeedSystemAccounts() {
    if (AccountTrackerService.get(mContext).checkAndSeedSystemAccounts()) {
        progressSignInFlowCheckPolicy();
    } else if (AccountIdProvider.getInstance().canBeUsed(mContext)) {
        mSignInState.blockedOnAccountSeeding = true;
    } else {
        Activity activity = mSignInState.activity;
        UserRecoverableErrorHandler errorHandler = activity != null
                ? new UserRecoverableErrorHandler.ModalDialog(activity)
                : new UserRecoverableErrorHandler.SystemNotification();
        ExternalAuthUtils.getInstance().canUseGooglePlayServices(mContext, errorHandler);
        Log.w(TAG, "Cancelling the sign-in process as Google Play services is unavailable");
        abortSignIn();
    }
}
 
Example 2
Source File: SigninManager.java    From AndroidChromium with Apache License 2.0 5 votes vote down vote up
private void progressSignInFlowSeedSystemAccounts() {
    if (AccountTrackerService.get(mContext).checkAndSeedSystemAccounts()) {
        progressSignInFlowCheckPolicy();
    } else if (AccountIdProvider.getInstance().canBeUsed(mContext)) {
        mSignInState.blockedOnAccountSeeding = true;
    } else {
        Activity activity = mSignInState.activity;
        UserRecoverableErrorHandler errorHandler = activity != null
                ? new UserRecoverableErrorHandler.ModalDialog(activity)
                : new UserRecoverableErrorHandler.SystemNotification();
        ExternalAuthUtils.getInstance().canUseGooglePlayServices(mContext, errorHandler);
        Log.w(TAG, "Cancelling the sign-in process as Google Play services is unavailable");
        abortSignIn();
    }
}
 
Example 3
Source File: AccountSigninView.java    From AndroidChromium with Apache License 2.0 5 votes vote down vote up
private boolean checkGooglePlayServicesAvailable() {
    ExternalAuthUtils extAuthUtils = ExternalAuthUtils.getInstance();
    if (mGooglePlayServicesUpdateErrorHandler == null) {
        mGooglePlayServicesUpdateErrorHandler = new UserRecoverableErrorHandler.ModalDialog(
                mDelegate.getActivity());
    }
    int resultCode = extAuthUtils.canUseGooglePlayServicesResultCode(
            getContext(), mGooglePlayServicesUpdateErrorHandler);
    if (extAuthUtils.isGooglePlayServicesUpdateRequiredError(resultCode)) {
        mIsGooglePlayServicesOutOfDate = true;
    }
    return resultCode == ConnectionResult.SUCCESS;
}
 
Example 4
Source File: SigninManager.java    From 365browser with Apache License 2.0 5 votes vote down vote up
private void progressSignInFlowSeedSystemAccounts() {
    if (AccountTrackerService.get().checkAndSeedSystemAccounts()) {
        progressSignInFlowCheckPolicy();
    } else if (AccountIdProvider.getInstance().canBeUsed()) {
        mSignInState.blockedOnAccountSeeding = true;
    } else {
        Activity activity = mSignInState.activity;
        UserRecoverableErrorHandler errorHandler = activity != null
                ? new UserRecoverableErrorHandler.ModalDialog(activity, !isForceSigninEnabled())
                : new UserRecoverableErrorHandler.SystemNotification();
        ExternalAuthUtils.getInstance().canUseGooglePlayServices(mContext, errorHandler);
        Log.w(TAG, "Cancelling the sign-in process as Google Play services is unavailable");
        abortSignIn();
    }
}
 
Example 5
Source File: AccountSigninView.java    From 365browser with Apache License 2.0 5 votes vote down vote up
private boolean checkGooglePlayServicesAvailable() {
    ExternalAuthUtils extAuthUtils = ExternalAuthUtils.getInstance();
    if (mGooglePlayServicesUpdateErrorHandler == null) {
        boolean cancelable = !SigninManager.get(getContext()).isForceSigninEnabled();
        mGooglePlayServicesUpdateErrorHandler = new UserRecoverableErrorHandler.ModalDialog(
                mDelegate.getActivity(), cancelable);
    }
    int resultCode = extAuthUtils.canUseGooglePlayServicesResultCode(
            getContext(), mGooglePlayServicesUpdateErrorHandler);
    if (extAuthUtils.isGooglePlayServicesUpdateRequiredError(resultCode)) {
        mIsGooglePlayServicesOutOfDate = true;
    }
    return resultCode == ConnectionResult.SUCCESS;
}