use of com.android.settings.core.SubSettingLauncher in project Resurrection_packages_apps_Settings by ResurrectionRemix.
the class StorageItemPreferenceController method getGamesIntent.
private Intent getGamesIntent() {
final Bundle args = getWorkAnnotatedBundle(1);
args.putString(ManageApplications.EXTRA_CLASSNAME, Settings.GamesStorageActivity.class.getName());
return new SubSettingLauncher(mContext).setDestination(ManageApplications.class.getName()).setTitleRes(R.string.game_storage_settings).setArguments(args).setSourceMetricsCategory(mMetricsFeatureProvider.getMetricsCategory(mFragment)).toIntent();
}
use of com.android.settings.core.SubSettingLauncher in project Resurrection_packages_apps_Settings by ResurrectionRemix.
the class StorageItemPreferenceController method getAudioIntent.
private Intent getAudioIntent() {
if (mVolume == null) {
return null;
}
Bundle args = getWorkAnnotatedBundle(4);
args.putString(ManageApplications.EXTRA_CLASSNAME, Settings.StorageUseActivity.class.getName());
args.putString(ManageApplications.EXTRA_VOLUME_UUID, mVolume.getFsUuid());
args.putString(ManageApplications.EXTRA_VOLUME_NAME, mVolume.getDescription());
args.putInt(ManageApplications.EXTRA_STORAGE_TYPE, ManageApplications.STORAGE_TYPE_MUSIC);
return new SubSettingLauncher(mContext).setDestination(ManageApplications.class.getName()).setTitleRes(R.string.storage_music_audio).setArguments(args).setSourceMetricsCategory(mMetricsFeatureProvider.getMetricsCategory(mFragment)).toIntent();
}
use of com.android.settings.core.SubSettingLauncher in project Resurrection_packages_apps_Settings by ResurrectionRemix.
the class UserSettings method onManageUserClicked.
private void onManageUserClicked(int userId, boolean newUser) {
mAddingUser = false;
if (userId == UserPreference.USERID_GUEST_DEFAULTS) {
Bundle extras = new Bundle();
extras.putBoolean(UserDetailsSettings.EXTRA_USER_GUEST, true);
new SubSettingLauncher(getContext()).setDestination(UserDetailsSettings.class.getName()).setArguments(extras).setTitleRes(R.string.user_guest).setSourceMetricsCategory(getMetricsCategory()).launch();
return;
}
UserInfo info = mUserManager.getUserInfo(userId);
if (info.isRestricted() && mUserCaps.mIsAdmin) {
Bundle extras = new Bundle();
extras.putInt(RestrictedProfileSettings.EXTRA_USER_ID, userId);
extras.putBoolean(RestrictedProfileSettings.EXTRA_NEW_USER, newUser);
new SubSettingLauncher(getContext()).setDestination(RestrictedProfileSettings.class.getName()).setArguments(extras).setTitleRes(R.string.user_restrictions_title).setSourceMetricsCategory(getMetricsCategory()).launch();
} else if (info.id == UserHandle.myUserId()) {
// Jump to owner info panel
OwnerInfoSettings.show(this);
} else if (mUserCaps.mIsAdmin) {
final Bundle extras = new Bundle();
extras.putInt(UserDetailsSettings.EXTRA_USER_ID, userId);
new SubSettingLauncher(getContext()).setDestination(UserDetailsSettings.class.getName()).setArguments(extras).setTitleText(info.name).setSourceMetricsCategory(getMetricsCategory()).launch();
}
}
use of com.android.settings.core.SubSettingLauncher in project Resurrection_packages_apps_Settings by ResurrectionRemix.
the class RecentAppsPreferenceController method displayPreference.
@Override
public void displayPreference(PreferenceScreen screen) {
super.displayPreference(screen);
mDivider = screen.findPreference(KEY_DIVIDER);
mRecentAppsPreference = screen.findPreference(getPreferenceKey());
final View view = mRecentAppsPreference.findViewById(R.id.app_entities_header);
mAppEntitiesController = AppEntitiesHeaderController.newInstance(mContext, view).setHeaderTitleRes(R.string.recent_app_category_title).setHeaderDetailsClickListener((View v) -> {
new SubSettingLauncher(mContext).setDestination(ManageApplications.class.getName()).setArguments(null).setTitleRes(R.string.application_info_label).setSourceMetricsCategory(SettingsEnums.SETTINGS_APP_NOTIF_CATEGORY).launch();
});
}
use of com.android.settings.core.SubSettingLauncher in project Resurrection_packages_apps_Settings by ResurrectionRemix.
the class AppInfoBase method startAppInfoFragment.
public static void startAppInfoFragment(Class<?> fragment, int titleRes, String pkg, int uid, Fragment source, int request, int sourceMetricsCategory) {
final Bundle args = new Bundle();
args.putString(AppInfoBase.ARG_PACKAGE_NAME, pkg);
args.putInt(AppInfoBase.ARG_PACKAGE_UID, uid);
new SubSettingLauncher(source.getContext()).setDestination(fragment.getName()).setSourceMetricsCategory(sourceMetricsCategory).setTitleRes(titleRes).setArguments(args).setUserHandle(new UserHandle(UserHandle.getUserId(uid))).setResultListener(source, request).launch();
}
Aggregations