use of com.android.settings.core.SubSettingLauncher in project Resurrection_packages_apps_Settings by ResurrectionRemix.
the class SavedAccessPointsWifiSettings method showWifiPage.
public void showWifiPage(@Nullable AccessPointPreference accessPoint) {
removeDialog(WifiSettings.WIFI_DIALOG_ID);
if (accessPoint != null) {
// Save the access point and edit mode
mSelectedAccessPoint = accessPoint.getAccessPoint();
} else {
// No access point is selected. Clear saved state.
mSelectedAccessPoint = null;
mAccessPointSavedState = null;
}
if (mSelectedAccessPoint == null) {
mSelectedAccessPoint = new AccessPoint(getActivity(), mAccessPointSavedState);
}
final Bundle savedState = new Bundle();
mSelectedAccessPoint.saveWifiState(savedState);
new SubSettingLauncher(getContext()).setTitleText(mSelectedAccessPoint.getTitle()).setDestination(WifiNetworkDetailsFragment.class.getName()).setArguments(savedState).setSourceMetricsCategory(getMetricsCategory()).launch();
}
use of com.android.settings.core.SubSettingLauncher in project Resurrection_packages_apps_Settings by ResurrectionRemix.
the class WifiSettings method launchNetworkDetailsFragment.
private void launchNetworkDetailsFragment(ConnectedAccessPointPreference pref) {
final AccessPoint accessPoint = pref.getAccessPoint();
final Context context = getContext();
final CharSequence title = FeatureFlagUtils.isEnabled(context, FeatureFlags.WIFI_DETAILS_DATAUSAGE_HEADER) ? accessPoint.getTitle() : context.getText(R.string.pref_title_network_details);
new SubSettingLauncher(getContext()).setTitleText(title).setDestination(WifiNetworkDetailsFragment.class.getName()).setArguments(pref.getExtras()).setSourceMetricsCategory(getMetricsCategory()).launch();
}
use of com.android.settings.core.SubSettingLauncher in project Resurrection_packages_apps_Settings by ResurrectionRemix.
the class AccessibilityDetailsSettingsFragment method openAccessibilitySettingsAndFinish.
@VisibleForTesting
void openAccessibilitySettingsAndFinish() {
new SubSettingLauncher(getActivity()).setDestination(AccessibilitySettings.class.getName()).setSourceMetricsCategory(getMetricsCategory()).launch();
finish();
}
use of com.android.settings.core.SubSettingLauncher in project Resurrection_packages_apps_Settings by ResurrectionRemix.
the class AccessibilityHearingAidPreferenceController method launchBluetoothDeviceDetailSetting.
@VisibleForTesting
void launchBluetoothDeviceDetailSetting(final CachedBluetoothDevice device) {
if (device == null) {
return;
}
final Bundle args = new Bundle();
args.putString(BluetoothDeviceDetailsFragment.KEY_DEVICE_ADDRESS, device.getDevice().getAddress());
new SubSettingLauncher(mContext).setDestination(BluetoothDeviceDetailsFragment.class.getName()).setArguments(args).setTitleRes(R.string.device_details_title).setSourceMetricsCategory(SettingsEnums.ACCESSIBILITY).launch();
}
use of com.android.settings.core.SubSettingLauncher 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;
}
Aggregations