[Settings] Remove null checking for TelephonyManager

1. TelephonyManager#createForSubscriptionId(int) never returns null
   Remove null checking.
2. Adopting context#getSystemService(SubscriptionManager.class)

Bug: None
Test: make
Change-Id: Ie36dea80a4dfabbc34d9d25c50e60e4928b2f936
This commit is contained in:
Bonian Chen
2020-01-14 01:01:51 +08:00
parent 65b29905f7
commit ec344c6031
2 changed files with 2 additions and 6 deletions

View File

@@ -174,9 +174,6 @@ public class ApnSettings extends RestrictedSettingsFragment
final TelephonyManager updatedTelephonyManager =
mTelephonyManager.createForSubscriptionId(subId);
if (updatedTelephonyManager == null) {
return;
}
// restart monitoring when subscription has been changed
mTelephonyManager.listen(mPhoneStateListener,