Merge "[Setting] Use @SystemApi to replace the hidden api"

This commit is contained in:
Zoey Chen
2019-12-24 10:58:34 +00:00
committed by Gerrit Code Review

View File

@@ -104,9 +104,10 @@ public class ResetNetworkConfirm extends InstrumentedFragment {
p2pFactoryReset(mContext); p2pFactoryReset(mContext);
TelephonyManager telephonyManager = (TelephonyManager) TelephonyManager telephonyManager = (TelephonyManager)
mContext.getSystemService(Context.TELEPHONY_SERVICE); mContext.getSystemService(TelephonyManager.class)
.createForSubscriptionId(mSubId);
if (telephonyManager != null) { if (telephonyManager != null) {
telephonyManager.factoryReset(mSubId); telephonyManager.resetSettings();
} }
NetworkPolicyManager policyManager = (NetworkPolicyManager) NetworkPolicyManager policyManager = (NetworkPolicyManager)