类android.content.IntentSender.SendIntentException源码实例Demo

下面列出了怎么用android.content.IntentSender.SendIntentException的API类实例代码及写法,或者点击链接到github查看源代码。

@Override
public void onPackageDeleted(String basePackageName, int returnCode, String msg) {
    if (PackageManager.DELETE_SUCCEEDED == returnCode && mNotification != null) {
        NotificationManager notificationManager = (NotificationManager)
                mContext.getSystemService(Context.NOTIFICATION_SERVICE);
        notificationManager.notify(basePackageName,
                SystemMessage.NOTE_PACKAGE_STATE,
                mNotification);
    }
    final Intent fillIn = new Intent();
    fillIn.putExtra(PackageInstaller.EXTRA_PACKAGE_NAME, mPackageName);
    fillIn.putExtra(PackageInstaller.EXTRA_STATUS,
            PackageManager.deleteStatusToPublicStatus(returnCode));
    fillIn.putExtra(PackageInstaller.EXTRA_STATUS_MESSAGE,
            PackageManager.deleteStatusToString(returnCode, msg));
    fillIn.putExtra(PackageInstaller.EXTRA_LEGACY_STATUS, returnCode);
    try {
        mTarget.sendIntent(mContext, 0, fillIn, null, null);
    } catch (SendIntentException ignored) {
    }
}
 
源代码2 项目: godot-gpgs   文件: Client.java
public boolean resolveConnectionFailure(ConnectionResult result, int requestCode) {
    if (result.hasResolution()) {
        try {
            result.startResolutionForResult(activity, requestCode);
            return true;
        } catch (IntentSender.SendIntentException e) {
            // The intent was canceled before it was sent.  Return to the default
            // state and attempt to connect to get an updated ConnectionResult.
            googleApiClient.connect();
            return false;
        }
    } else {
        // not resolvable... so show an error message
        int errorCode = result.getErrorCode();

        if (errorCode == ConnectionResult.INTERNAL_ERROR) {
            googleApiClient.connect();
        }

        GodotLib.calldeferred(instance_id, "_on_google_play_game_services_connection_failed", new Object[] { });
        Log.i(TAG, "GPGS: onConnectionFailed error code: " + String.valueOf(errorCode));
        return false;
    }
}
 
源代码3 项目: zulip-android   文件: LoginActivity.java
@Override
public void onConnectionFailed(ConnectionResult result) {
    if (commonProgressDialog.isShowing()) {
        // The user clicked the sign-in button already. Start to resolve
        // connection errors. Wait until onConnected() to dismiss the
        // connection dialog.
        if (result.hasResolution()) {
            try {
                result.startResolutionForResult(this, REQUEST_CODE_RESOLVE_ERR);
            } catch (SendIntentException e) {
                Log.e(TAG, e.getMessage(), e);
                // Yeah, no idea what to do here.
                commonProgressDialog.dismiss();
                Toast.makeText(LoginActivity.this, R.string.google_app_login_failed, Toast.LENGTH_SHORT).show();
            }
        } else {
            commonProgressDialog.dismiss();
            if (!isNetworkAvailable()) {
                Toast.makeText(LoginActivity.this, R.string.toast_no_internet_connection, Toast.LENGTH_SHORT).show();
            } else {
                Toast.makeText(LoginActivity.this, R.string.google_app_login_failed, Toast.LENGTH_SHORT).show();
            }

        }
    }
}
 
源代码4 项目: Pix-Art-Messenger   文件: ConversationFragment.java
@Override
public void onClick(View v) {
    PendingIntent pendingIntent = conversation.getAccount().getPgpDecryptionService().getPendingIntent();
    if (pendingIntent != null) {
        try {
            getActivity().startIntentSenderForResult(pendingIntent.getIntentSender(),
                    REQUEST_DECRYPT_PGP,
                    null,
                    0,
                    0,
                    0);
        } catch (SendIntentException e) {
            ToastCompat.makeText(getActivity(), R.string.unable_to_connect_to_keychain, Toast.LENGTH_SHORT).show();
            conversation.getAccount().getPgpDecryptionService().continueDecryption(true);
        }
    }
    updateSnackBar(conversation);
}
 
源代码5 项目: 365browser   文件: ActivityWindowAndroid.java
@Override
public int showCancelableIntent(
        PendingIntent intent, IntentCallback callback, Integer errorId) {
    Activity activity = getActivity().get();
    if (activity == null) return START_INTENT_FAILURE;

    int requestCode = generateNextRequestCode();

    try {
        activity.startIntentSenderForResult(
                intent.getIntentSender(), requestCode, new Intent(), 0, 0, 0);
    } catch (SendIntentException e) {
        return START_INTENT_FAILURE;
    }

    storeCallbackData(requestCode, callback, errorId);
    return requestCode;
}
 
源代码6 项目: barterli_android   文件: GooglePlusManager.java
/**
 * A helper method to flip the mResolveOnFail flag and start the resolution
 * of the ConnenctionResult from the failed connect() call.
 */
private void startResolution() {

    try {
        // Don't start another resolution now until we have a
        // result from the activity we're about to start.
        mResolveOnFail = false;
        // If we can resolve the error, then call start resolution
        // and pass it an integer tag we can use to track. This means
        // that when we get the onActivityResult callback we'll know
        // its from being started here.
        mConnectionResult
                        .startResolutionForResult(mActivity, CONNECTION_UPDATE_ERROR);
    } catch (final SendIntentException e) {
        // Any problems, just try to connect() again so we get a new
        // ConnectionResult.
        mPlusClient.connect();
    }
}
 
private void resolveSignInError() {
	if (connectionResult.hasResolution()) {
		try {
			intentInProgress = true;
			startIntentSenderForResult(connectionResult.getResolution()
					.getIntentSender(), RC_SIGN_IN, null, 0, 0, 0);
		} catch (SendIntentException e) {
			Log.i(LOG_TAG,
					"Sign in intent could not be sent: "
							+ e.getLocalizedMessage());
			// The intent was canceled before it was sent. Return to the
			// default
			// state and attempt to connect to get an updated
			// ConnectionResult.
			intentInProgress = false;
			googleAPIClient.connect();
		}
	}
}
 
源代码8 项目: Conversations   文件: ConversationFragment.java
@Override
public void onClick(View v) {
    PendingIntent pendingIntent = conversation.getAccount().getPgpDecryptionService().getPendingIntent();
    if (pendingIntent != null) {
        try {
            getActivity().startIntentSenderForResult(pendingIntent.getIntentSender(),
                    REQUEST_DECRYPT_PGP,
                    null,
                    0,
                    0,
                    0);
        } catch (SendIntentException e) {
            Toast.makeText(getActivity(), R.string.unable_to_connect_to_keychain, Toast.LENGTH_SHORT).show();
            conversation.getAccount().getPgpDecryptionService().continueDecryption(true);
        }
    }
    updateSnackBar(conversation);
}
 
@Override
public void onUserActionRequired(Intent intent) {
    final Intent fillIn = new Intent();
    fillIn.putExtra(PackageInstaller.EXTRA_PACKAGE_NAME, mPackageName);
    fillIn.putExtra(PackageInstaller.EXTRA_STATUS,
            PackageInstaller.STATUS_PENDING_USER_ACTION);
    fillIn.putExtra(Intent.EXTRA_INTENT, intent);
    try {
        mTarget.sendIntent(mContext, 0, fillIn, null, null);
    } catch (SendIntentException ignored) {
    }
}
 
@Override
public void onUserActionRequired(Intent intent) {
    final Intent fillIn = new Intent();
    fillIn.putExtra(PackageInstaller.EXTRA_SESSION_ID, mSessionId);
    fillIn.putExtra(PackageInstaller.EXTRA_STATUS,
            PackageInstaller.STATUS_PENDING_USER_ACTION);
    fillIn.putExtra(Intent.EXTRA_INTENT, intent);
    try {
        mTarget.sendIntent(mContext, 0, fillIn, null, null);
    } catch (SendIntentException ignored) {
    }
}
 
@Override
public void onPackageInstalled(String basePackageName, int returnCode, String msg,
        Bundle extras) {
    if (PackageManager.INSTALL_SUCCEEDED == returnCode && mShowNotification) {
        boolean update = (extras != null) && extras.getBoolean(Intent.EXTRA_REPLACING);
        Notification notification = buildSuccessNotification(mContext,
                mContext.getResources()
                        .getString(update ? R.string.package_updated_device_owner :
                                R.string.package_installed_device_owner),
                basePackageName,
                mUserId);
        if (notification != null) {
            NotificationManager notificationManager = (NotificationManager)
                    mContext.getSystemService(Context.NOTIFICATION_SERVICE);
            notificationManager.notify(basePackageName,
                    SystemMessage.NOTE_PACKAGE_STATE,
                    notification);
        }
    }
    final Intent fillIn = new Intent();
    fillIn.putExtra(PackageInstaller.EXTRA_PACKAGE_NAME, basePackageName);
    fillIn.putExtra(PackageInstaller.EXTRA_SESSION_ID, mSessionId);
    fillIn.putExtra(PackageInstaller.EXTRA_STATUS,
            PackageManager.installStatusToPublicStatus(returnCode));
    fillIn.putExtra(PackageInstaller.EXTRA_STATUS_MESSAGE,
            PackageManager.installStatusToString(returnCode, msg));
    fillIn.putExtra(PackageInstaller.EXTRA_LEGACY_STATUS, returnCode);
    if (extras != null) {
        final String existing = extras.getString(
                PackageManager.EXTRA_FAILURE_EXISTING_PACKAGE);
        if (!TextUtils.isEmpty(existing)) {
            fillIn.putExtra(PackageInstaller.EXTRA_OTHER_PACKAGE_NAME, existing);
        }
    }
    try {
        mTarget.sendIntent(mContext, 0, fillIn, null, null);
    } catch (SendIntentException ignored) {
    }
}
 
源代码12 项目: android_9.0.0_r45   文件: ShortcutService.java
void injectSendIntentSender(IntentSender intentSender, Intent extras) {
    if (intentSender == null) {
        return;
    }
    try {
        intentSender.sendIntent(mContext, /* code= */ 0, extras,
                /* onFinished=*/ null, /* handler= */ null);
    } catch (SendIntentException e) {
        Slog.w(TAG, "sendIntent failed().", e);
    }
}
 
源代码13 项目: ground-android   文件: SettingsManager.java
private Completable startResolution(int requestCode, ResolvableApiException resolvableException) {
  return Completable.create(
      em -> {
        Log.d(TAG, "Prompting user to enable settings");
        activityStreams.withActivity(
            act -> {
              try {
                resolvableException.startResolutionForResult(act, requestCode);
                em.onComplete();
              } catch (SendIntentException e) {
                em.onError(e);
              }
            });
      });
}
 
源代码14 项目: Asteroid   文件: GameHelper.java
/**
 * Attempts to resolve a connection failure. This will usually involve
 * starting a UI flow that lets the user give the appropriate consents
 * necessary for sign-in to work.
 */
void resolveConnectionResult() {
    // Try to resolve the problem
    if (mExpectingResolution) {
        debugLog("We're already expecting the result of a previous resolution.");
        return;
    }

    if (mActivity == null) {
        debugLog("No need to resolve issue, activity does not exist anymore");
        return;
    }

    debugLog("resolveConnectionResult: trying to resolve result: "
            + mConnectionResult);
    if (mConnectionResult.hasResolution()) {
        // This problem can be fixed. So let's try to fix it.
        debugLog("Result has resolution. Starting it.");
        try {
            // launch appropriate UI flow (which might, for example, be the
            // sign-in flow)
            mExpectingResolution = true;
            mConnectionResult.startResolutionForResult(mActivity,
                    RC_RESOLVE);
        } catch (SendIntentException e) {
            // Try connecting again
            debugLog("SendIntentException, so connecting again.");
            connect();
        }
    } else {
        // It's not a problem what we can solve, so give up and show an
        // error.
        debugLog("resolveConnectionResult: result has no resolution. Giving up.");
        giveUp(new SignInFailureReason(mConnectionResult.getErrorCode()));

        mConnectionResult = null;
    }
}
 
源代码15 项目: Trivia-Knowledge   文件: GameHelper.java
/**
 * Attempts to resolve a connection failure. This will usually involve
 * starting a UI flow that lets the user give the appropriate consents
 * necessary for sign-in to work.
 */
void resolveConnectionResult() {
    // Try to resolve the problem
    if (mExpectingResolution) {
        debugLog("We're already expecting the result of a previous resolution.");
        return;
    }

    if (mActivity == null) {
        debugLog("No need to resolve issue, activity does not exist anymore");
        return;
    }

    debugLog("resolveConnectionResult: trying to resolve result: "
            + mConnectionResult);
    if (mConnectionResult.hasResolution()) {
        // This problem can be fixed. So let's try to fix it.
        debugLog("Result has resolution. Starting it.");
        try {
            // launch appropriate UI flow (which might, for example, be the
            // sign-in flow)
            mExpectingResolution = true;
            mConnectionResult.startResolutionForResult(mActivity,
                    RC_RESOLVE);
        } catch (SendIntentException e) {
            // Try connecting again
            debugLog("SendIntentException, so connecting again.");
            connect();
        }
    } else {
        // It's not a problem what we can solve, so give up and show an
        // error.
        debugLog("resolveConnectionResult: result has no resolution. Giving up.");
        giveUp(new SignInFailureReason(mConnectionResult.getErrorCode()));
        
        mConnectionResult = null;
    }
}
 
源代码16 项目: robocar   文件: CompanionActivity.java
@Override
public void onGoogleApiConnectionFailed(ConnectionResult connectionResult) {
    if (connectionResult.hasResolution()) {
        try {
            connectionResult.startResolutionForResult(this, REQUEST_RESOLVE_CONNECTION);
        } catch (SendIntentException e) {
            Log.e(TAG, "Google API connection failed. " + connectionResult, e);
        }
    } else {
        Log.e(TAG, "Google API connection failed. " + connectionResult);
    }
}
 
源代码17 项目: dice-heroes   文件: GameHelper.java
/**
 * Attempts to resolve a connection failure. This will usually involve
 * starting a UI flow that lets the user give the appropriate consents
 * necessary for sign-in to work.
 */
void resolveConnectionResult() {
    // Try to resolve the problem
    if (mExpectingResolution) {
        debugLog("We're already expecting the result of a previous resolution.");
        return;
    }

    if (mActivity == null) {
        debugLog("No need to resolve issue, activity does not exist anymore");
        return;
    }

    debugLog("resolveConnectionResult: trying to resolve result: "
            + mConnectionResult);
    if (mConnectionResult.hasResolution()) {
        // This problem can be fixed. So let's try to fix it.
        debugLog("Result has resolution. Starting it.");
        try {
            // launch appropriate UI flow (which might, for example, be the
            // sign-in flow)
            mExpectingResolution = true;
            mConnectionResult.startResolutionForResult(mActivity,
                    RC_RESOLVE);
        } catch (SendIntentException e) {
            // Try connecting again
            debugLog("SendIntentException, so connecting again.");
            connect();
        }
    } else {
        // It's not a problem what we can solve, so give up and show an
        // error.
        debugLog("resolveConnectionResult: result has no resolution. Giving up.");
        giveUp(new SignInFailureReason(mConnectionResult.getErrorCode()));
    }
}
 
源代码18 项目: FixMath   文件: GameHelper.java
/**
 * Attempts to resolve a connection failure. This will usually involve
 * starting a UI flow that lets the user give the appropriate consents
 * necessary for sign-in to work.
 */
void resolveConnectionResult() {
    // Try to resolve the problem
    if (mExpectingResolution) {
        debugLog("We're already expecting the result of a previous resolution.");
        return;
    }

    if (mActivity == null) {
        debugLog("No need to resolve issue, activity does not exist anymore");
        return;
    }

    debugLog("resolveConnectionResult: trying to resolve result: "
            + mConnectionResult);
    if (mConnectionResult.hasResolution()) {
        // This problem can be fixed. So let's try to fix it.
        debugLog("Result has resolution. Starting it.");
        try {
            // launch appropriate UI flow (which might, for example, be the
            // sign-in flow)
            mExpectingResolution = true;
            mConnectionResult.startResolutionForResult(mActivity,
                    RC_RESOLVE);
        } catch (SendIntentException e) {
            // Try connecting again
            debugLog("SendIntentException, so connecting again.");
            connect();
        }
    } else {
        // It's not a problem what we can solve, so give up and show an
        // error.
        debugLog("resolveConnectionResult: result has no resolution. Giving up.");
        giveUp(new SignInFailureReason(mConnectionResult.getErrorCode()));
        
        mConnectionResult = null;
    }
}
 
源代码19 项目: CompositeAndroid   文件: BlueprintActivity.java
/**
 * Same as calling {@link #startIntentSenderFromChild(Activity, IntentSender,
 * int, Intent, int, int, int, Bundle)} with no options.
 */
@Override
public void startIntentSenderFromChild(Activity child, IntentSender intent, int requestCode, Intent fillInIntent,
        int flagsMask, int flagsValues, int extraFlags) throws SendIntentException {
    super.startIntentSenderFromChild(child, intent, requestCode, fillInIntent, flagsMask, flagsValues,
            extraFlags);
}
 
源代码20 项目: CompositeAndroid   文件: BlueprintActivity.java
/**
 * Like {@link #startActivityFromChild(Activity, Intent, int)}, but
 * taking a IntentSender; see
 * {@link #startIntentSenderForResult(IntentSender, int, Intent, int, int, int)}
 * for more information.
 */
@Override
public void startIntentSenderFromChild(Activity child, IntentSender intent, int requestCode, Intent fillInIntent,
        int flagsMask, int flagsValues, int extraFlags, @Nullable Bundle options) throws SendIntentException {
    super.startIntentSenderFromChild(child, intent, requestCode, fillInIntent, flagsMask, flagsValues, extraFlags,
            options);
}
 
源代码21 项目: CompositeAndroid   文件: BlueprintActivity.java
@Override
public void startIntentSenderFromFragment(Fragment fragment, IntentSender intent, int requestCode,
        @Nullable Intent fillInIntent, int flagsMask, int flagsValues, int extraFlags, Bundle options)
        throws SendIntentException {
    super.startIntentSenderFromFragment(fragment, intent, requestCode, fillInIntent, flagsMask, flagsValues,
            extraFlags, options);
}
 
源代码22 项目: CompositeAndroid   文件: FragmentPlugin.java
public void startIntentSenderForResult(IntentSender intent, int requestCode, @Nullable Intent fillInIntent,
        int flagsMask, int flagsValues, int extraFlags, Bundle options) throws SendIntentException {
    verifyMethodCalledFromDelegate(
            "startIntentSenderForResult(IntentSender, Integer, Intent, Integer, Integer, Integer, Bundle)");
    ((CallVoid7<IntentSender, Integer, Intent, Integer, Integer, Integer, Bundle>) mSuperListeners.pop())
            .call(intent, requestCode, fillInIntent, flagsMask, flagsValues, extraFlags, options);
}
 
源代码23 项目: CompositeAndroid   文件: FragmentPlugin.java
void startIntentSenderForResult(
        final CallVoid7<IntentSender, Integer, Intent, Integer, Integer, Integer, Bundle> superCall,
        IntentSender intent, int requestCode, @Nullable Intent fillInIntent, int flagsMask, int flagsValues,
        int extraFlags, Bundle options) throws SendIntentException {
    synchronized (mSuperListeners) {
        mSuperListeners.push(superCall);
        startIntentSenderForResult(intent, requestCode, fillInIntent, flagsMask, flagsValues, extraFlags,
                options);
    }
}
 
源代码24 项目: CompositeAndroid   文件: CompositeFragment.java
@Override
public void startIntentSenderForResult(IntentSender intent, int requestCode, @Nullable Intent fillInIntent,
        int flagsMask, int flagsValues, int extraFlags, Bundle options) throws SendIntentException {
    try {
        delegate.startIntentSenderForResult(intent, requestCode, fillInIntent, flagsMask, flagsValues, extraFlags,
                options);
    } catch (SuppressedException e) {
        throw (SendIntentException) e.getCause();
    }
}
 
源代码25 项目: CompositeAndroid   文件: CompositeDialogFragment.java
@Override
public void startIntentSenderForResult(IntentSender intent, int requestCode, @Nullable Intent fillInIntent,
        int flagsMask, int flagsValues, int extraFlags, Bundle options) throws SendIntentException {
    try {
        delegate.startIntentSenderForResult(intent, requestCode, fillInIntent, flagsMask, flagsValues, extraFlags,
                options);
    } catch (SuppressedException e) {
        throw (SendIntentException) e.getCause();
    }
}
 
源代码26 项目: cloud-cup-android   文件: MainActivity.java
public void onConnectionFailed(ConnectionResult result) {
    if (!mIntentInProgress && result.hasResolution()) {
        try {
            mIntentInProgress = true;
            startIntentSenderForResult(result.getResolution().getIntentSender(),
                    RC_SIGN_IN, null, 0, 0, 0);
        } catch (SendIntentException e) {
            // The intent was canceled before it was sent.  Return to the default
            // state and attempt to connect to get an updated ConnectionResult.
            mIntentInProgress = false;
            mGoogleApiClient.connect();
        }
    }
}
 
private void resolveConnection() {
    try {
        if (mConnectionResult != null && mConnectionResult.hasResolution()) {
            mConnectionResult.startResolutionForResult(getActivity(),
                    REQUEST_CODE_RESOLVE_ERR);
        } else {
            mGoogleApiClient.connect();
        }
    }  catch (SendIntentException e) {
        mConnectionResult = null;
        mGoogleApiClient.connect();
    }
}
 
源代码28 项目: CodenameOne   文件: GoogleImpl.java
public void onConnectionFailed(final ConnectionResult cr) {
    if (AndroidNativeUtil.getActivity() == null) {
        return;
    }
    final CodenameOneActivity main = (CodenameOneActivity) AndroidNativeUtil.getActivity();

    if (!mIntentInProgress && cr.hasResolution()) {
        try {
            mIntentInProgress = true;
            main.startIntentSenderForResult(cr.getResolution().getIntentSender(),
                    0, null, 0, 0, 0);
            main.setIntentResultListener(new com.codename1.impl.android.IntentResultListener() {

                public void onActivityResult(int requestCode, int resultCode, android.content.Intent data) {
                    mIntentInProgress = false;
                    if (!mGoogleApiClient.isConnecting()) {
                        mGoogleApiClient.connect();
                    }
                    main.restoreIntentResultListener();
                }
            });

        } catch (SendIntentException e) {
            // The intent was canceled before it was sent.  Return to the default
            // state and attempt to connect to get an updated ConnectionResult.
            mIntentInProgress = false;
            mGoogleApiClient.connect();
        }
        return;
    }
    if (callback != null) {
        Display.getInstance().callSerially(new Runnable() {

            @Override
            public void run() {
                callback.loginFailed(GooglePlayServicesUtil.getErrorString(cr.getErrorCode()));
            }
        });
    }
}
 
源代码29 项目: martianrun   文件: GameHelper.java
/**
 * Attempts to resolve a connection failure. This will usually involve
 * starting a UI flow that lets the user give the appropriate consents
 * necessary for sign-in to work.
 */
void resolveConnectionResult() {
    // Try to resolve the problem
    if (mExpectingResolution) {
        debugLog("We're already expecting the result of a previous resolution.");
        return;
    }

    debugLog("resolveConnectionResult: trying to resolve result: "
            + mConnectionResult);
    if (mConnectionResult.hasResolution()) {
        // This problem can be fixed. So let's try to fix it.
        debugLog("Result has resolution. Starting it.");
        try {
            // launch appropriate UI flow (which might, for example, be the
            // sign-in flow)
            mExpectingResolution = true;
            mConnectionResult.startResolutionForResult(mActivity,
                    RC_RESOLVE);
        } catch (SendIntentException e) {
            // Try connecting again
            debugLog("SendIntentException, so connecting again.");
            connect();
        }
    } else {
        // It's not a problem what we can solve, so give up and show an
        // error.
        debugLog("resolveConnectionResult: result has no resolution. Giving up.");
        giveUp(new SignInFailureReason(mConnectionResult.getErrorCode()));
    }
}
 
源代码30 项目: google-play-game-services-ane   文件: GameHelper.java
/**
 * Attempts to resolve a connection failure. This will usually involve
 * starting a UI flow that lets the user give the appropriate consents
 * necessary for sign-in to work.
 */
void resolveConnectionResult() {
    // Try to resolve the problem
    if (mExpectingResolution) {
        debugLog("We're already expecting the result of a previous resolution.");
        return;
    }

    debugLog("resolveConnectionResult: trying to resolve result: " + mConnectionResult);
    if (mConnectionResult.hasResolution()) {
        // This problem can be fixed. So let's try to fix it.
        debugLog("Result has resolution. Starting it.");
        try {
            // launch appropriate UI flow (which might, for example, be the
            // sign-in flow)
            mExpectingResolution = true;
            
            mConnectionResult.startResolutionForResult(mActivity, RC_RESOLVE);
        } catch (SendIntentException e) {
            // Try connecting again
            debugLog("SendIntentException, so connecting again.");
            connect();
        }
    } else {
        // It's not a problem what we can solve, so give up and show an error.
        debugLog("resolveConnectionResult: result has no resolution. Giving up.");
        giveUp(new SignInFailureReason(mConnectionResult.getErrorCode()));
    }
}
 
 类所在包
 同包方法