Reduce Repetitive Calls to TelephonyManager From Telephony2gUpdater
Only update allowed network status for a subId if one of the following
conditions is met:
1. The subId is newly added.
2. The DISALLOW_CELLULAR_2G user restriction changes, in which case all
subIds are updated.
Also fixes a bug in which hidden subscriptions were not being updated.
Test: atest Telephony2gUpdaterTest
Test: Manual testing w/ TestDPC app and inserting and removing SIM
Bug: 263869683
Change-Id: I9a59046fbfb5da2525e208ea7e26973fa62792e9
diff --git a/src/com/android/phone/PhoneInterfaceManager.java b/src/com/android/phone/PhoneInterfaceManager.java
index bdbd5f9..ba8b330 100644
--- a/src/com/android/phone/PhoneInterfaceManager.java
+++ b/src/com/android/phone/PhoneInterfaceManager.java
@@ -2347,8 +2347,7 @@
mRadioInterfaceCapabilities = RadioInterfaceCapabilityController.getInstance();
mNotifyUserActivity = new AtomicBoolean(false);
PropertyInvalidatedCache.invalidateCache(TelephonyManager.CACHE_KEY_PHONE_ACCOUNT_TO_SUBID);
- mTelephony2gUpdater = new Telephony2gUpdater(
- Executors.newSingleThreadExecutor(), mApp);
+ mTelephony2gUpdater = new Telephony2gUpdater(mApp);
mTelephony2gUpdater.init();
publish();
}