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

Commit 7f705e2d authored by Jiashen Wang's avatar Jiashen Wang Committed by Automerger Merge Worker
Browse files

Merge "Change EuiccConnector to only refresh eSIM profile list when rebinding"...

Merge "Change EuiccConnector to only refresh eSIM profile list when rebinding" into rvc-qpr-dev am: df5c23cb am: 459c9277

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/opt/telephony/+/13248402

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I4c58de567c45b0119155fb864da973b966bb7ca3
parents 68e28bb6 459c9277
Loading
Loading
Loading
Loading
+9 −2
Original line number Diff line number Diff line
@@ -404,6 +404,8 @@ public class EuiccConnector extends StateMachine implements ServiceConnection {

        start();

        // All app package changes could trigger the package monitor receiver. It is not limited to
        // apps extended from EuiccService.
        mPackageMonitor.register(mContext, null /* thread */, null /* user */);
        mContext.registerReceiver(
                mUserUnlockedReceiver, new IntentFilter(Intent.ACTION_USER_UNLOCKED));
@@ -555,10 +557,10 @@ public class EuiccConnector extends StateMachine implements ServiceConnection {
                mSelectedComponent = findBestComponent();
                if (mSelectedComponent != null) {
                    transitionTo(mAvailableState);
                    updateSubscriptionInfoListForAllAccessibleEuiccs();
                } else if (getCurrentState() != mUnavailableState) {
                    transitionTo(mUnavailableState);
                }
                updateSubscriptionInfoListForAllAccessibleEuiccs();
                return HANDLED;
            } else if (isEuiccCommand(message.what)) {
                BaseEuiccCommandCallback callback = getCallback(message);
@@ -651,11 +653,16 @@ public class EuiccConnector extends StateMachine implements ServiceConnection {
                if (bestComponent == null) {
                    isSameComponent = mSelectedComponent != null;
                } else {
                    // Checks whether the bound component is the same as the best component. If it
                    // is not, set isSameComponent to false and the connector will bind the best
                    // component instead.
                    isSameComponent = mSelectedComponent == null
                            || Objects.equals(new ComponentName(bestComponent.packageName,
                            bestComponent.name),
                        new ComponentName(mSelectedComponent.packageName, mSelectedComponent.name));
                }
                // Checks whether the bound component is impacted by the package changes. If it is,
                // change the forceRebind to true so the connector will re-bind the component.
                boolean forceRebind = bestComponent != null
                        && Objects.equals(bestComponent.packageName, affectedPackage);
                if (!isSameComponent || forceRebind) {
@@ -666,8 +673,8 @@ public class EuiccConnector extends StateMachine implements ServiceConnection {
                    } else {
                        transitionTo(mBindingState);
                    }
                }
                    updateSubscriptionInfoListForAllAccessibleEuiccs();
                }
                return HANDLED;
            } else if (message.what == CMD_CONNECT_TIMEOUT) {
                transitionTo(mAvailableState);