Moved network settings reset away from Backup & reset.

Moved Settings -> Backup & reset -> Network setting reset to
Settings -> Wireless & networks -> More.

Bug: 28683031
Change-Id: I52385ec862789985ccb8647398950605955569f7
This commit is contained in:
Doris Ling
2016-06-07 17:56:00 -07:00
parent d4e31320c1
commit e6f635ff82
4 changed files with 21 additions and 14 deletions

View File

@@ -72,6 +72,7 @@ public class WirelessSettings extends SettingsPreferenceFragment implements Inde
private static final String KEY_MOBILE_NETWORK_SETTINGS = "mobile_network_settings";
private static final String KEY_MANAGE_MOBILE_PLAN = "manage_mobile_plan";
private static final String KEY_WFC_SETTINGS = "wifi_calling_settings";
private static final String KEY_NETWORK_RESET = "network_reset";
public static final String EXIT_ECM_RESULT = "exit_ecm_result";
public static final int REQUEST_CODE_EXIT_ECM = 1;
@@ -336,6 +337,12 @@ public class WirelessSettings extends SettingsPreferenceFragment implements Inde
p.setEnabled(!TetherSettings
.isProvisioningNeededButUnavailable(getActivity()));
}
// Remove network reset if not allowed
if (RestrictedLockUtils.hasBaseUserRestriction(activity,
UserManager.DISALLOW_NETWORK_RESET, UserHandle.myUserId())) {
removePreference(KEY_NETWORK_RESET);
}
}
@Override
@@ -470,6 +477,11 @@ public class WirelessSettings extends SettingsPreferenceFragment implements Inde
result.add(KEY_WFC_SETTINGS);
}
if (RestrictedLockUtils.hasBaseUserRestriction(context,
UserManager.DISALLOW_NETWORK_RESET, UserHandle.myUserId())) {
result.add(KEY_NETWORK_RESET);
}
return result;
}
};