use of com.android.settings.core.SubSettingLauncher in project Resurrection_packages_apps_Settings by ResurrectionRemix.
the class ToggleFeaturePreferenceFragmentTest method setUp.
@Before
public void setUp() {
mInstrumentation.runOnMainSync(() -> {
MyToggleFeaturePreferenceFragment fragment = new MyToggleFeaturePreferenceFragment();
Bundle args = new Bundle();
args.putString(AccessibilitySettings.EXTRA_SUMMARY, SUMMARY_TEXT);
fragment.setArguments(args);
new SubSettingLauncher(mActivityRule.getActivity()).setDestination(MyToggleFeaturePreferenceFragment.class.getName()).setArguments(args).setSourceMetricsCategory(InstrumentedPreferenceFragment.METRICS_CATEGORY_UNKNOWN).launch();
});
}
use of com.android.settings.core.SubSettingLauncher in project Resurrection_packages_apps_Settings by ResurrectionRemix.
the class AccountSyncPreferenceController method handlePreferenceTreeClick.
@Override
public boolean handlePreferenceTreeClick(Preference preference) {
if (!KEY_ACCOUNT_SYNC.equals(preference.getKey())) {
return false;
}
final Bundle args = new Bundle();
args.putParcelable(AccountSyncSettings.ACCOUNT_KEY, mAccount);
args.putParcelable(EXTRA_USER, mUserHandle);
new SubSettingLauncher(mContext).setDestination(AccountSyncSettings.class.getName()).setArguments(args).setSourceMetricsCategory(SettingsEnums.ACCOUNT).setTitleRes(R.string.account_sync_title).launch();
return true;
}
use of com.android.settings.core.SubSettingLauncher in project Resurrection_packages_apps_Settings by ResurrectionRemix.
the class ProcessStatsSummary method onPreferenceClick.
@Override
public boolean onPreferenceClick(Preference preference) {
if (preference == mAppListPreference) {
final Bundle args = new Bundle();
args.putBoolean(ARG_TRANSFER_STATS, true);
args.putInt(ARG_DURATION_INDEX, mDurationIndex);
mStatsManager.xferStats();
new SubSettingLauncher(getContext()).setDestination(ProcessStatsUi.class.getName()).setTitleRes(R.string.memory_usage_apps).setArguments(args).setSourceMetricsCategory(getMetricsCategory()).launch();
return true;
}
return false;
}
use of com.android.settings.core.SubSettingLauncher in project Resurrection_packages_apps_Settings by ResurrectionRemix.
the class NotificationChannelSlice method getIntent.
@Override
public Intent getIntent() {
final Bundle args = new Bundle();
args.putString(AppInfoBase.ARG_PACKAGE_NAME, mPackageName);
args.putInt(AppInfoBase.ARG_PACKAGE_UID, mUid);
return new SubSettingLauncher(mContext).setDestination(AppNotificationSettings.class.getName()).setTitleRes(R.string.notifications_title).setArguments(args).setSourceMetricsCategory(SettingsEnums.SLICE).toIntent();
}
use of com.android.settings.core.SubSettingLauncher in project Resurrection_packages_apps_Settings by ResurrectionRemix.
the class NotificationChannelSlice method buildRowSliceAction.
private SliceAction buildRowSliceAction(NotificationChannel channel, IconCompat icon) {
final Bundle channelArgs = new Bundle();
channelArgs.putInt(AppInfoBase.ARG_PACKAGE_UID, mUid);
channelArgs.putString(AppInfoBase.ARG_PACKAGE_NAME, mPackageName);
channelArgs.putString(Settings.EXTRA_CHANNEL_ID, channel.getId());
final Intent channelIntent = new SubSettingLauncher(mContext).setDestination(ChannelNotificationSettings.class.getName()).setArguments(channelArgs).setTitleRes(R.string.notification_channel_title).setSourceMetricsCategory(SettingsEnums.SLICE).toIntent();
return SliceAction.createDeeplink(PendingIntent.getActivity(mContext, channel.hashCode(), channelIntent, 0), icon, ListBuilder.ICON_IMAGE, channel.getName());
}
Aggregations