Java Code Examples for org.chromium.chrome.browser.preferences.PreferencesLauncher#createIntentForSettingsPage()
The following examples show how to use
org.chromium.chrome.browser.preferences.PreferencesLauncher#createIntentForSettingsPage() .
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: AccountManagementFragment.java From AndroidChromium with Apache License 2.0 | 5 votes |
/** * Open the account management UI. * @param applicationContext An application context. * @param profile A user profile. * @param serviceType A signin::GAIAServiceType that triggered the dialog. */ public static void openAccountManagementScreen( Context applicationContext, Profile profile, int serviceType) { Intent intent = PreferencesLauncher.createIntentForSettingsPage(applicationContext, AccountManagementFragment.class.getName()); Bundle arguments = new Bundle(); arguments.putInt(SHOW_GAIA_SERVICE_TYPE_EXTRA, serviceType); intent.putExtra(Preferences.EXTRA_SHOW_FRAGMENT_ARGUMENTS, arguments); applicationContext.startActivity(intent); }
Example 2
Source File: DataReductionMainMenuFooter.java From 365browser with Apache License 2.0 | 5 votes |
@Override public void onClick(View v) { Intent intent = PreferencesLauncher.createIntentForSettingsPage( getContext(), DataReductionPreferences.class.getName()); RecordUserAction.record("MobileMenuDataSaverOpened"); intent.putExtra(DataReductionPreferences.FROM_MAIN_MENU, true); getContext().startActivity(intent); }
Example 3
Source File: AccountManagementFragment.java From 365browser with Apache License 2.0 | 5 votes |
/** * Open the account management UI. * @param serviceType A signin::GAIAServiceType that triggered the dialog. */ public static void openAccountManagementScreen(int serviceType) { Intent intent = PreferencesLauncher.createIntentForSettingsPage( ContextUtils.getApplicationContext(), AccountManagementFragment.class.getName()); Bundle arguments = new Bundle(); arguments.putInt(SHOW_GAIA_SERVICE_TYPE_EXTRA, serviceType); intent.putExtra(Preferences.EXTRA_SHOW_FRAGMENT_ARGUMENTS, arguments); ContextUtils.getApplicationContext().startActivity(intent); }
Example 4
Source File: GeolocationSnackbarController.java From 365browser with Apache License 2.0 | 5 votes |
@Override public void onAction(Object actionData) { View view = (View) actionData; UiUtils.hideKeyboard(view); Context context = view.getContext(); Intent intent = PreferencesLauncher.createIntentForSettingsPage( context, SearchEnginePreference.class.getName()); context.startActivity(intent); }
Example 5
Source File: SogouPromoDialog.java From 365browser with Apache License 2.0 | 5 votes |
@Override public void onClick(View widget) { mChoice = CHOICE_SETTINGS; Intent intent = PreferencesLauncher.createIntentForSettingsPage( getContext(), SearchEnginePreference.class.getName()); getContext().startActivity(intent); dismiss(); }
Example 6
Source File: LocaleManager.java From 365browser with Apache License 2.0 | 5 votes |
@Override public void onAction(Object actionData) { Context context = ContextUtils.getApplicationContext(); Intent intent = PreferencesLauncher.createIntentForSettingsPage(context, SearchEnginePreference.class.getName()); context.startActivity(intent); }
Example 7
Source File: PaymentRequestImpl.java From 365browser with Apache License 2.0 | 5 votes |
@Override public void onCardAndAddressSettingsClicked() { Context context = ChromeActivity.fromWebContents(mWebContents); if (context == null) { mJourneyLogger.setAborted(AbortReason.OTHER); disconnectFromClientWithDebugMessage("Unable to find Chrome activity"); return; } Intent intent = PreferencesLauncher.createIntentForSettingsPage( context, AutofillAndPaymentsPreferences.class.getName()); context.startActivity(intent); mJourneyLogger.setAborted(AbortReason.ABORTED_BY_USER); disconnectFromClientWithDebugMessage("Card and address settings clicked"); }
Example 8
Source File: SearchGeolocationDisclosureInfoBar.java From AndroidChromium with Apache License 2.0 | 5 votes |
@CalledByNative private static void showSettingsPage(String searchUrl) { Context context = ContextUtils.getApplicationContext(); Intent settingsIntent = PreferencesLauncher.createIntentForSettingsPage( context, SingleWebsitePreferences.class.getName()); Bundle fragmentArgs = SingleWebsitePreferences.createFragmentArgsForSite(searchUrl); settingsIntent.putExtra(Preferences.EXTRA_SHOW_FRAGMENT_ARGUMENTS, fragmentArgs); IntentUtils.safeStartActivity(context, settingsIntent); }
Example 9
Source File: ChromeApplication.java From delion with Apache License 2.0 | 5 votes |
/** * Opens the single origin settings page for the given URL. * * @param url The URL to show the single origin settings for. This is a complete url * including scheme, domain, port, path, etc. */ protected void showSingleOriginSettings(String url) { Bundle fragmentArgs = SingleWebsitePreferences.createFragmentArgsForSite(url); Intent intent = PreferencesLauncher.createIntentForSettingsPage( this, SingleWebsitePreferences.class.getName()); intent.putExtra(Preferences.EXTRA_SHOW_FRAGMENT_ARGUMENTS, fragmentArgs); startActivity(intent); }
Example 10
Source File: GeolocationSnackbarController.java From AndroidChromium with Apache License 2.0 | 5 votes |
@Override public void onAction(Object actionData) { View view = (View) actionData; UiUtils.hideKeyboard(view); Context context = view.getContext(); Intent intent = PreferencesLauncher.createIntentForSettingsPage( context, SearchEnginePreference.class.getName()); context.startActivity(intent); }
Example 11
Source File: ChromeApplication.java From AndroidChromium with Apache License 2.0 | 5 votes |
/** * Opens the UI to clear browsing data. * @param tab The tab that triggered the request. */ @CalledByNative protected void openClearBrowsingData(Tab tab) { Activity activity = tab.getWindowAndroid().getActivity().get(); if (activity == null) { Log.e(TAG, "Attempting to open clear browsing data for a tab without a valid activity"); return; } Intent intent = PreferencesLauncher.createIntentForSettingsPage(activity, ClearBrowsingDataPreferences.class.getName()); activity.startActivity(intent); }
Example 12
Source File: SearchEnginePromoDialog.java From AndroidChromium with Apache License 2.0 | 5 votes |
@Override public void onClick(View widget) { mChoice = CHOICE_SETTINGS; Intent intent = PreferencesLauncher.createIntentForSettingsPage(getContext(), SearchEnginePreference.class.getName()); getContext().startActivity(intent); dismiss(); }
Example 13
Source File: LocaleManager.java From AndroidChromium with Apache License 2.0 | 5 votes |
@Override public void onAction(Object actionData) { Context context = ContextUtils.getApplicationContext(); Intent intent = PreferencesLauncher.createIntentForSettingsPage(context, SearchEnginePreference.class.getName()); context.startActivity(intent); }
Example 14
Source File: AccountManagementFragment.java From delion with Apache License 2.0 | 5 votes |
/** * Open the account management UI. * @param applicationContext An application context. * @param profile A user profile. * @param serviceType A signin::GAIAServiceType that triggered the dialog. */ public static void openAccountManagementScreen( Context applicationContext, Profile profile, int serviceType) { Intent intent = PreferencesLauncher.createIntentForSettingsPage(applicationContext, AccountManagementFragment.class.getName()); Bundle arguments = new Bundle(); arguments.putInt(SHOW_GAIA_SERVICE_TYPE_EXTRA, serviceType); intent.putExtra(Preferences.EXTRA_SHOW_FRAGMENT_ARGUMENTS, arguments); applicationContext.startActivity(intent); }
Example 15
Source File: GeolocationSnackbarController.java From delion with Apache License 2.0 | 5 votes |
@Override public void onAction(Object actionData) { View view = (View) actionData; UiUtils.hideKeyboard(view); Context context = view.getContext(); Intent intent = PreferencesLauncher.createIntentForSettingsPage(context, null); Bundle fragmentArgs = new Bundle(); fragmentArgs.putBoolean(MainPreferences.EXTRA_SHOW_SEARCH_ENGINE_PICKER, true); intent.putExtra(Preferences.EXTRA_SHOW_FRAGMENT_ARGUMENTS, fragmentArgs); context.startActivity(intent); }
Example 16
Source File: ChromeApplication.java From delion with Apache License 2.0 | 5 votes |
/** * Opens the UI to clear browsing data. * @param tab The tab that triggered the request. */ @CalledByNative protected void openClearBrowsingData(Tab tab) { Activity activity = tab.getWindowAndroid().getActivity().get(); if (activity == null) { Log.e(TAG, "Attempting to open clear browsing data for a tab without a valid activity"); return; } Intent intent = PreferencesLauncher.createIntentForSettingsPage(activity, ClearBrowsingDataPreferences.class.getName()); activity.startActivity(intent); }
Example 17
Source File: FirstRunSignInProcessor.java From AndroidChromium with Apache License 2.0 | 4 votes |
/** * Opens sign in settings as requested in the FRE sign-in dialog. */ private static void openSignInSettings(Activity activity) { Intent intent = PreferencesLauncher.createIntentForSettingsPage( activity, AccountManagementFragment.class.getName()); activity.startActivity(intent); }
Example 18
Source File: FirstRunSignInProcessor.java From delion with Apache License 2.0 | 4 votes |
/** * Opens sign in settings as requested in the FRE sign-in dialog. */ private static void openSignInSettings(Activity activity) { Intent intent = PreferencesLauncher.createIntentForSettingsPage( activity, AccountManagementFragment.class.getName()); activity.startActivity(intent); }
Example 19
Source File: SyncNotificationController.java From 365browser with Apache License 2.0 | 2 votes |
/** * Creates an intent that launches the Chrome settings, and automatically opens the fragment * for signed in users. * * @return the intent for opening the settings */ private Intent createSettingsIntent() { return PreferencesLauncher.createIntentForSettingsPage( mApplicationContext, mAccountManagementFragment.getCanonicalName()); }
Example 20
Source File: SyncNotificationController.java From delion with Apache License 2.0 | 2 votes |
/** * Creates an intent that launches the Chrome settings, and automatically opens the fragment * for signed in users. * * @return the intent for opening the settings */ private Intent createSettingsIntent() { return PreferencesLauncher.createIntentForSettingsPage( mApplicationContext, mAccountManagementFragment.getCanonicalName()); }