/** * @param intent * @param requestCode * @return * @see android.app.Activity#startActivityIfNeeded(android.content.Intent, * int) */ public boolean startActivityIfNeeded(Intent intent, int requestCode) { return mActivity.startActivityIfNeeded(intent, requestCode); }
@Override public boolean startActivityIfNeeded(android.content.Intent intent0, int int1) { return mOriginActivity.startActivityIfNeeded(intent0, int1); }
/** * @param intent * @param requestCode * @param options * @return * @see android.app.Activity#startActivityIfNeeded(android.content.Intent, * int, android.os.Bundle) */ public boolean startActivityIfNeeded(Intent intent, int requestCode, Bundle options) { return mActivity.startActivityIfNeeded(intent, requestCode, options); }
@RequiresApi(api = Build.VERSION_CODES.JELLY_BEAN) @Override public boolean startActivityIfNeeded(android.content.Intent intent0, int int1, android.os.Bundle bundle2) { return mOriginActivity.startActivityIfNeeded(intent0, int1, bundle2); }
@RequiresApi(api = Build.VERSION_CODES.JELLY_BEAN) @Override public boolean startActivityIfNeeded(@RequiresPermission @NonNull Intent intent, int requestCode, @Nullable Bundle options) { return mContentProxy.getContext().startActivityIfNeeded(mContentProxy.setActivityIntentExtra(intent), requestCode, options); }
@Override public boolean startActivityIfNeeded(@RequiresPermission @NonNull Intent intent, int requestCode) { return mContentProxy.getContext() .startActivityIfNeeded(mContentProxy.setActivityIntentExtra(intent), requestCode); }
@Override public boolean startActivityIfNeeded(Intent intent) { boolean isExternalProtocol = !UrlUtilities.isAcceptedScheme(intent.getDataString()); boolean hasDefaultHandler = hasDefaultHandler(intent); try { // For a URL chrome can handle and there is no default set, handle it ourselves. if (!hasDefaultHandler) { if (!TextUtils.isEmpty(mClientPackageName) && isPackageSpecializedHandler( mApplicationContext, mClientPackageName, intent)) { intent.setPackage(mClientPackageName); } else if (!isExternalProtocol) { return false; } } // If android fails to find a handler, handle it ourselves. Context context = getAvailableContext(); if (context instanceof Activity && ((Activity) context).startActivityIfNeeded(intent, -1)) { mHasActivityStarted = true; return true; } return false; } catch (RuntimeException e) { logTransactionTooLargeOrRethrow(e, intent); return false; } }
@Override public boolean startActivityIfNeeded(Intent intent) { boolean activityWasLaunched; // Only touches disk on Kitkat. See http://crbug.com/617725 for more context. StrictMode.ThreadPolicy oldPolicy = StrictMode.allowThreadDiskWrites(); StrictMode.allowThreadDiskReads(); try { forcePdfViewerAsIntentHandlerIfNeeded(mApplicationContext, intent); Context context = getAvailableContext(); if (context instanceof Activity) { activityWasLaunched = ((Activity) context).startActivityIfNeeded(intent, -1); } else { activityWasLaunched = false; } if (activityWasLaunched) recordExternalNavigationDispatched(intent); return activityWasLaunched; } catch (RuntimeException e) { logTransactionTooLargeOrRethrow(e, intent); return false; } finally { StrictMode.setThreadPolicy(oldPolicy); } }