use of com.android.settings.core.SubSettingLauncher in project Resurrection_packages_apps_Settings by ResurrectionRemix.
the class BrandedAccountPreferenceController method displayPreference.
@Override
public void displayPreference(PreferenceScreen screen) {
super.displayPreference(screen);
final AccountFeatureProvider accountFeatureProvider = FeatureFactory.getFactory(mContext).getAccountFeatureProvider();
final Preference accountPreference = screen.findPreference(getPreferenceKey());
if (accountPreference != null && (mAccounts == null || mAccounts.length == 0)) {
screen.removePreference(accountPreference);
return;
}
accountPreference.setSummary(mAccounts[0].name);
accountPreference.setOnPreferenceClickListener(preference -> {
final Bundle args = new Bundle();
args.putParcelable(AccountDetailDashboardFragment.KEY_ACCOUNT, mAccounts[0]);
args.putParcelable(AccountDetailDashboardFragment.KEY_USER_HANDLE, android.os.Process.myUserHandle());
args.putString(AccountDetailDashboardFragment.KEY_ACCOUNT_TYPE, accountFeatureProvider.getAccountType());
new SubSettingLauncher(mContext).setDestination(AccountDetailDashboardFragment.class.getName()).setTitleRes(R.string.account_sync_title).setArguments(args).setSourceMetricsCategory(SettingsEnums.DEVICEINFO).launch();
return true;
});
}
use of com.android.settings.core.SubSettingLauncher in project Resurrection_packages_apps_Settings by ResurrectionRemix.
the class OpenNetworkSelectPagePreferenceController method handlePreferenceTreeClick.
@Override
public boolean handlePreferenceTreeClick(Preference preference) {
if (TextUtils.equals(preference.getKey(), getPreferenceKey())) {
final Bundle bundle = new Bundle();
bundle.putInt(Settings.EXTRA_SUB_ID, mSubId);
new SubSettingLauncher(mContext).setDestination(NetworkSelectSettings.class.getName()).setSourceMetricsCategory(SettingsEnums.MOBILE_NETWORK_SELECT).setTitleRes(R.string.choose_network_title).setArguments(bundle).launch();
return true;
}
return false;
}
use of com.android.settings.core.SubSettingLauncher in project Resurrection_packages_apps_Settings by ResurrectionRemix.
the class BubbleSummaryPreferenceController method updateState.
@Override
public void updateState(Preference preference) {
super.updateState(preference);
if (mAppRow != null) {
Bundle args = new Bundle();
args.putString(AppInfoBase.ARG_PACKAGE_NAME, mAppRow.pkg);
args.putInt(AppInfoBase.ARG_PACKAGE_UID, mAppRow.uid);
preference.setIntent(new SubSettingLauncher(mContext).setDestination(AppBubbleNotificationSettings.class.getName()).setArguments(args).setSourceMetricsCategory(SettingsEnums.NOTIFICATION_APP_NOTIFICATION).toIntent());
}
}
use of com.android.settings.core.SubSettingLauncher in project Resurrection_packages_apps_Settings by ResurrectionRemix.
the class ZenModeRuleSettingsBase method onCreate.
@Override
public void onCreate(Bundle icicle) {
mContext = getActivity();
final Intent intent = getActivity().getIntent();
if (DEBUG)
Log.d(TAG, "onCreate getIntent()=" + intent);
if (intent == null) {
Log.w(TAG, "No intent");
toastAndFinish();
return;
}
mId = intent.getStringExtra(ConditionProviderService.EXTRA_RULE_ID);
if (mId == null) {
Log.w(TAG, "rule id is null");
toastAndFinish();
return;
}
if (DEBUG)
Log.d(TAG, "mId=" + mId);
if (refreshRuleOrFinish()) {
return;
}
super.onCreate(icicle);
mCustomBehaviorPreference = getPreferenceScreen().findPreference(CUSTOM_BEHAVIOR_KEY);
mCustomBehaviorPreference.setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() {
@Override
public boolean onPreferenceClick(Preference preference) {
Bundle bundle = new Bundle();
bundle.putString(ZenCustomRuleSettings.RULE_ID, mId);
new SubSettingLauncher(mContext).setDestination(ZenCustomRuleSettings.class.getName()).setArguments(bundle).setSourceMetricsCategory(// TODO
0).launch();
return true;
}
});
onCreateInternal();
}
use of com.android.settings.core.SubSettingLauncher in project android_packages_apps_Settings by omnirom.
the class BillingCyclePreference method getIntent.
@Override
public Intent getIntent() {
final Bundle args = new Bundle();
args.putParcelable(DataUsageList.EXTRA_NETWORK_TEMPLATE, mTemplate);
return new SubSettingLauncher(getContext()).setDestination(BillingCycleSettings.class.getName()).setArguments(args).setTitleRes(R.string.billing_cycle).setSourceMetricsCategory(SettingsEnums.PAGE_UNKNOWN).toIntent();
}
Aggregations