[Settings] Change network reset into reset mobile network
Replace reset network into Reset mobile network settings Bug: 260034791 Test: local and auto Change-Id: I9547f266c1586073fd2b96f35cc9df8861b0a105
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<!-- Copyright (C) 2015 The Android Open Source Project
|
<!-- Copyright (C) 2022 The Android Open Source Project
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
you may not use this file except in compliance with the License.
|
you may not use this file except in compliance with the License.
|
||||||
@@ -35,7 +35,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textAppearance="@style/TextAppearance.PreferenceTitle.SettingsLib"
|
android:textAppearance="@style/TextAppearance.PreferenceTitle.SettingsLib"
|
||||||
android:textDirection="locale"
|
android:textDirection="locale"
|
||||||
android:text="@string/reset_network_desc" />
|
android:text="@string/reset_mobile_network_settings_desc" />
|
||||||
<include layout="@layout/reset_esim_checkbox"/>
|
<include layout="@layout/reset_esim_checkbox"/>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</androidx.core.widget.NestedScrollView>
|
</androidx.core.widget.NestedScrollView>
|
@@ -2719,11 +2719,13 @@
|
|||||||
<!-- Title for a screen containing all device reset options [CHAR LIMIT=50] -->
|
<!-- Title for a screen containing all device reset options [CHAR LIMIT=50] -->
|
||||||
<string name="reset_dashboard_title">Reset options</string>
|
<string name="reset_dashboard_title">Reset options</string>
|
||||||
|
|
||||||
<!-- Reset Network -->
|
<!-- Reset Mobile Network -->
|
||||||
<!-- Button title to reset Wi-Fi settings, Mobile data setting, bluetooth settings -->
|
<!-- Button title to reset Mobile network setting -->
|
||||||
<string name="reset_network_title">Reset Wi-Fi, mobile & Bluetooth</string>
|
<string name="reset_mobile_network_settings_title">Reset Mobile Network Settings</string>
|
||||||
<!-- SD card & phone storage settings screen, message on screen after user selects Reset network settings [CHAR LIMIT=NONE] -->
|
<!-- User selects Reset mobile network settings [CHAR LIMIT=NONE] -->
|
||||||
<string name="reset_network_desc">This will reset all network settings, including:\n\n<li>Wi\u2011Fi</li>\n<li>Mobile data</li>\n<li>Bluetooth</li>"</string>
|
<string name="reset_mobile_network_settings_desc">This will reset all mobile network settings</string>
|
||||||
|
<!-- Reset Mobile network setting confirmation screen title [CHAR LIMIT=30] -->
|
||||||
|
<string name="reset_mobile_network_settings_confirm_title">Reset Mobile Network Settings?</string>
|
||||||
|
|
||||||
<!-- Reset Bluetooth and Wi-Fi Network -->
|
<!-- Reset Bluetooth and Wi-Fi Network -->
|
||||||
<!-- Dialog title to reset Bluetooth and Wi-Fi settings -->
|
<!-- Dialog title to reset Bluetooth and Wi-Fi settings -->
|
||||||
|
@@ -20,10 +20,10 @@
|
|||||||
xmlns:settings="http://schemas.android.com/apk/res-auto"
|
xmlns:settings="http://schemas.android.com/apk/res-auto"
|
||||||
android:title="@string/reset_dashboard_title">
|
android:title="@string/reset_dashboard_title">
|
||||||
|
|
||||||
<!-- Network reset -->
|
<!-- Mobile Network reset -->
|
||||||
<com.android.settingslib.RestrictedPreference
|
<com.android.settingslib.RestrictedPreference
|
||||||
android:key="network_reset_pref"
|
android:key="network_reset_mobile_network_settings_pref"
|
||||||
android:title="@string/reset_network_title"
|
android:title="@string/reset_mobile_network_settings_title"
|
||||||
settings:userRestriction="no_network_reset"
|
settings:userRestriction="no_network_reset"
|
||||||
settings:useAdminDisabledSummary="true"
|
settings:useAdminDisabledSummary="true"
|
||||||
settings:isPreferenceVisible="@bool/config_show_sim_info"
|
settings:isPreferenceVisible="@bool/config_show_sim_info"
|
||||||
|
@@ -85,7 +85,7 @@ public class ResetNetwork extends InstrumentedFragment {
|
|||||||
@Override
|
@Override
|
||||||
public void onCreate(@Nullable Bundle savedInstanceState) {
|
public void onCreate(@Nullable Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
getActivity().setTitle(R.string.reset_network_title);
|
getActivity().setTitle(R.string.reset_mobile_network_settings_title);
|
||||||
|
|
||||||
mActivityResultLauncher = registerForActivityResult(
|
mActivityResultLauncher = registerForActivityResult(
|
||||||
new ActivityResultContracts.StartActivityForResult(),
|
new ActivityResultContracts.StartActivityForResult(),
|
||||||
@@ -103,7 +103,7 @@ public class ResetNetwork extends InstrumentedFragment {
|
|||||||
final ChooseLockSettingsHelper.Builder builder =
|
final ChooseLockSettingsHelper.Builder builder =
|
||||||
new ChooseLockSettingsHelper.Builder(getActivity(), this);
|
new ChooseLockSettingsHelper.Builder(getActivity(), this);
|
||||||
return builder.setRequestCode(request)
|
return builder.setRequestCode(request)
|
||||||
.setTitle(res.getText(R.string.reset_network_title))
|
.setTitle(res.getText(R.string.reset_mobile_network_settings_title))
|
||||||
.setActivityResultLauncher(mActivityResultLauncher)
|
.setActivityResultLauncher(mActivityResultLauncher)
|
||||||
.show();
|
.show();
|
||||||
}
|
}
|
||||||
@@ -124,10 +124,7 @@ public class ResetNetwork extends InstrumentedFragment {
|
|||||||
|
|
||||||
ResetNetworkRequest request = new ResetNetworkRequest(
|
ResetNetworkRequest request = new ResetNetworkRequest(
|
||||||
ResetNetworkRequest.RESET_CONNECTIVITY_MANAGER |
|
ResetNetworkRequest.RESET_CONNECTIVITY_MANAGER |
|
||||||
ResetNetworkRequest.RESET_VPN_MANAGER |
|
ResetNetworkRequest.RESET_VPN_MANAGER
|
||||||
ResetNetworkRequest.RESET_WIFI_MANAGER |
|
|
||||||
ResetNetworkRequest.RESET_WIFI_P2P_MANAGER |
|
|
||||||
ResetNetworkRequest.RESET_BLUETOOTH_MANAGER
|
|
||||||
);
|
);
|
||||||
if (mSubscriptions != null && mSubscriptions.size() > 0) {
|
if (mSubscriptions != null && mSubscriptions.size() > 0) {
|
||||||
int selectedIndex = mSubscriptionSpinner.getSelectedItemPosition();
|
int selectedIndex = mSubscriptionSpinner.getSelectedItemPosition();
|
||||||
@@ -146,7 +143,7 @@ public class ResetNetwork extends InstrumentedFragment {
|
|||||||
new SubSettingLauncher(getContext())
|
new SubSettingLauncher(getContext())
|
||||||
.setDestination(ResetNetworkConfirm.class.getName())
|
.setDestination(ResetNetworkConfirm.class.getName())
|
||||||
.setArguments(args)
|
.setArguments(args)
|
||||||
.setTitleRes(R.string.reset_network_confirm_title)
|
.setTitleRes(R.string.reset_mobile_network_settings_confirm_title)
|
||||||
.setSourceMetricsCategory(getMetricsCategory())
|
.setSourceMetricsCategory(getMetricsCategory())
|
||||||
.launch();
|
.launch();
|
||||||
}
|
}
|
||||||
@@ -305,7 +302,7 @@ public class ResetNetwork extends InstrumentedFragment {
|
|||||||
return view;
|
return view;
|
||||||
}
|
}
|
||||||
|
|
||||||
mContentView = inflater.inflate(R.layout.reset_network, null);
|
mContentView = inflater.inflate(R.layout.reset_mobile_network_settings, null);
|
||||||
|
|
||||||
establishInitialState(getActiveSubscriptionInfoList());
|
establishInitialState(getActiveSubscriptionInfoList());
|
||||||
return mContentView;
|
return mContentView;
|
||||||
|
@@ -40,6 +40,6 @@ public class NetworkResetPreferenceController extends AbstractPreferenceControll
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getPreferenceKey() {
|
public String getPreferenceKey() {
|
||||||
return "network_reset_pref";
|
return "network_reset_mobile_network_settings_pref";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user