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

Commit a3f0c812 authored by Muralidhar Reddy's avatar Muralidhar Reddy Committed by Muralidhar Reddy Mule
Browse files

Profile is getting activated on wrong portIndex

PortIndex retrieval has issue during resolving resolvable errors which is causing to set default port index(i.e 0) always.
Modified to retrieve the port index only in case of NO_PRIVILEGES action and extras bundle has the port index value.

Bug: 294988914
Test: Manually verified during slow switching between P+E <-> E+E, b/298970620
Test: atest FrameworksTelephonyTests
Change-Id: I705c55fdccaf0d6a34252d4ab0a66df804840e32
parent 13cbe364
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -191,6 +191,19 @@ public class EuiccController extends IEuiccController.Stub {
            boolean usePortIndex = resolutionIntent.getBooleanExtra(
                    EuiccService.EXTRA_RESOLUTION_USE_PORT_INDEX, false);
            resolutionExtras.putBoolean(EuiccService.EXTRA_RESOLUTION_USE_PORT_INDEX, usePortIndex);

            if (!EuiccService.ACTION_RESOLVE_NO_PRIVILEGES.equals(resolutionIntent.getAction())
                    || !resolutionExtras.containsKey(EuiccService.EXTRA_RESOLUTION_PORT_INDEX)) {
                // Port index resolution is requested only through the ACTION_RESOLVE_NO_PRIVILEGES
                // action. Therefore, if the action is not ACTION_RESOLVE_NO_PRIVILEGES, use the
                // port index from the resolution intent.
                // (OR) If the action is ACTION_RESOLVE_NO_PRIVILEGES and resolutionExtras does not
                // contain the EXTRA_RESOLUTION_PORT_INDEX key, retrieve the port index from
                // resolutionIntent.
                resolutionExtras.putInt(EuiccService.EXTRA_RESOLUTION_PORT_INDEX,
                        resolutionIntent.getIntExtra(EuiccService.EXTRA_RESOLUTION_PORT_INDEX,
                                TelephonyManager.DEFAULT_PORT_INDEX));
            }
            Log.i(TAG, " continueOperation portIndex: " + resolutionExtras.getInt(
                    EuiccService.EXTRA_RESOLUTION_PORT_INDEX) + " usePortIndex: " + usePortIndex);
            op.continueOperation(cardId, resolutionExtras, callbackIntent);