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

This commit is contained in:
Zoey Chen
2019-12-18 09:23:09 +00:00
committed by Android (Google) Code Review

View File

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