Search in sources :

Example 1 with Instrumentable

use of com.android.settingslib.core.instrumentation.Instrumentable in project Resurrection_packages_apps_Settings by ResurrectionRemix.

the class AccessibilitySettingsForSetupWizardActivity method onPreferenceStartFragment.

@Override
public boolean onPreferenceStartFragment(PreferenceFragmentCompat caller, Preference pref) {
    Bundle args = pref.getExtras();
    if (args == null) {
        args = new Bundle();
    }
    args.putInt(HelpResourceProvider.HELP_URI_RESOURCE_KEY, 0);
    args.putBoolean(SearchMenuController.NEED_SEARCH_ICON_IN_ACTION_BAR, false);
    new SubSettingLauncher(this).setDestination(pref.getFragment()).setArguments(args).setSourceMetricsCategory(caller instanceof Instrumentable ? ((Instrumentable) caller).getMetricsCategory() : Instrumentable.METRICS_CATEGORY_UNKNOWN).launch();
    return true;
}
Also used : SubSettingLauncher(com.android.settings.core.SubSettingLauncher) Bundle(android.os.Bundle) Instrumentable(com.android.settingslib.core.instrumentation.Instrumentable)

Example 2 with Instrumentable

use of com.android.settingslib.core.instrumentation.Instrumentable in project android_packages_apps_Settings by omnirom.

the class AccessibilitySettingsForSetupWizardActivity method onPreferenceStartFragment.

@Override
public boolean onPreferenceStartFragment(PreferenceFragmentCompat caller, Preference pref) {
    Bundle args = pref.getExtras();
    if (args == null) {
        args = new Bundle();
    }
    args.putInt(HelpResourceProvider.HELP_URI_RESOURCE_KEY, 0);
    args.putBoolean(SearchMenuController.NEED_SEARCH_ICON_IN_ACTION_BAR, false);
    new SubSettingLauncher(this).setDestination(pref.getFragment()).setArguments(args).setSourceMetricsCategory(caller instanceof Instrumentable ? ((Instrumentable) caller).getMetricsCategory() : Instrumentable.METRICS_CATEGORY_UNKNOWN).setExtras(SetupWizardUtils.copyLifecycleExtra(getIntent().getExtras(), new Bundle())).setTransitionType(SettingsTransitionHelper.TransitionType.TRANSITION_FADE).launch();
    return true;
}
Also used : SubSettingLauncher(com.android.settings.core.SubSettingLauncher) Bundle(android.os.Bundle) Instrumentable(com.android.settingslib.core.instrumentation.Instrumentable)

Aggregations

Bundle (android.os.Bundle)2 SubSettingLauncher (com.android.settings.core.SubSettingLauncher)2 Instrumentable (com.android.settingslib.core.instrumentation.Instrumentable)2