[Settings] Replace TelephonyManager#from()

Replacing TelephonyManager#from() by public API.

Bug: 146752167
Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=EuiccPreferenceControllerTest
Change-Id: I8f6e8bc57c20782540f8b26bdeb163d881e70a2e
This commit is contained in:
Bonian Chen
2019-12-23 15:44:52 +08:00
parent 6aee4f9548
commit 67f7ab3f2b
2 changed files with 15 additions and 17 deletions

View File

@@ -50,7 +50,8 @@ public class EuiccPreferenceController extends TelephonyBasePreferenceController
public void init(int subId) {
mSubId = subId;
mTelephonyManager = TelephonyManager.from(mContext).createForSubscriptionId(mSubId);
mTelephonyManager = mContext.getSystemService(TelephonyManager.class)
.createForSubscriptionId(mSubId);
}
@Override