Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 298b7e8e authored by Brad Ebinger's avatar Brad Ebinger
Browse files

Also bind to device ImsService when SIM state moves to NOT_READY

When the device starts and the eSIM is disabled, we will move into
NOT_READY instead of ABSENT. Do not ignore this state transition in
the ImsResolver.

Fixes: 191432303
Test: atest FrameworksTelephonyTests:ImsResolverTest
Change-Id: Id81e3f9088db5412b1c738c8d6d276bed0e4ee9c
parent 3c5a43e3
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -274,15 +274,18 @@ public class ImsResolver implements ImsServiceController.ImsServiceControllerCal
                    SubscriptionManager.INVALID_SUBSCRIPTION_ID);
            int slotSimState = mTelephonyManagerProxy.getSimState(mContext, slotId);
            if (subId == SubscriptionManager.INVALID_SUBSCRIPTION_ID
                    && slotSimState != TelephonyManager.SIM_STATE_ABSENT) {
                    && (slotSimState != TelephonyManager.SIM_STATE_ABSENT
                    && slotSimState != TelephonyManager.SIM_STATE_NOT_READY)) {
                // We only care about carrier config updates that happen when a slot is known to be
                // absent or populated and the carrier config has been loaded.
                // absent, the subscription is disabled (not ready), or populated and the carrier
                // config has been loaded.
                Log.i(TAG, "Received CCC for slot " + slotId + " and sim state "
                        + slotSimState + ", ignoring.");
                return;
            }

            Log.i(TAG, "Received Carrier Config Changed for SlotId: " + slotId);
            Log.i(TAG, "Received Carrier Config Changed for SlotId: " + slotId
                    + ", sim state: " + slotSimState);

            mHandler.obtainMessage(HANDLER_CONFIG_CHANGED, slotId).sendToTarget();
        }