[Setting] Use @SystemApi to replace the hidden api

Bug: 145785535
Test: make
Change-Id: I32554eec8e9f0477a7342a8137a32939b5393fad
Merged-In: I32554eec8e9f0477a7342a8137a32939b5393fad
This commit is contained in:
zoey chen
2019-12-17 16:36:52 +08:00
parent b2380eaaee
commit 7ab984b603

View File

@@ -104,9 +104,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)