[Settings] Replacing SubscriptionManager#addOnSubscriptionsChangedListener API

Replace SubscriptionManager#addOnSubscriptionsChangedListener API in
order to compatible with legacy design.

Bug: 151838951
Test: m RunSettingsRoboTests -j ROBOTEST_FILTER=SubscriptionsChangeListenerTest
Test: m RunSettingsRoboTests -j ROBOTEST_FILTER=ActiveSubsciptionsListenerTest
Test: m RunSettingsRoboTests -j ROBOTEST_FILTER=SimStatusDialogControllerTest
Merged-In: Ib98ce0dcbf18b6f48a6f267dd9e7be017d571157
Merged-In: I350604a64a56151195f52d38bd258e34c76e40c5
Change-Id: I4fc89e91381b1562ee7e2f48cfc159949c81a414
This commit is contained in:
Bonian Chen
2020-04-07 19:59:28 +08:00
parent 9371311309
commit d9957643d9
5 changed files with 37 additions and 25 deletions

View File

@@ -268,7 +268,8 @@ public class SimStatusDialogController implements LifecycleObserver, OnResume, O
PhoneStateListener.LISTEN_DATA_CONNECTION_STATE
| PhoneStateListener.LISTEN_SIGNAL_STRENGTHS
| PhoneStateListener.LISTEN_SERVICE_STATE);
mSubscriptionManager.addOnSubscriptionsChangedListener(mOnSubscriptionsChangedListener);
mSubscriptionManager.addOnSubscriptionsChangedListener(
mContext.getMainExecutor(), mOnSubscriptionsChangedListener);
registerImsRegistrationCallback(mSubscriptionInfo.getSubscriptionId());
if (mShowLatestAreaInfo) {