[MEP] Refactor SlotSidecar API for all of sim page.

remove the SlotSidecar's run() and using new run() with port id
information.

Bug: 218439715
Test: manual test for UI
Change-Id: I81479a0c514f2b8f58b9167b31d357f017732482
This commit is contained in:
SongFerngWang
2022-02-08 16:37:43 +08:00
parent 387566c7d3
commit 4d0749febd
5 changed files with 14 additions and 38 deletions

View File

@@ -69,20 +69,15 @@ public class SwitchToEuiccSubscriptionSidecar extends EuiccOperationSidecar {
}
}
/** Starts calling EuiccManager#switchToSubscription to enable/disable the eSIM profile. */
// ToDo: delete this api and refactor the related code.
public void run(int subscriptionId) {
setState(State.RUNNING, Substate.UNUSED);
mCallbackIntent = createCallbackIntent();
mEuiccManager.switchToSubscription(subscriptionId, mCallbackIntent);
}
/**
* Starts calling EuiccManager#switchToSubscription to enable/disable the eSIM profile.
*
* @param subscriptionId the esim's subscriptionId.
* @param port the esim's portId. If user wants to inactivate esim, then user must to assign the
* the port. If user wants to activate esim, then the port can be -1.
* @param port the esim's portId. If user wants to inactivate esim, then user must to assign
* the corresponding port. If user wants to activate esim, then the port can be
* {@link UiccSlotUtil#INVALID_PORT_ID}. When it is
* {@link UiccSlotUtil#INVALID_PORT_ID}, the system will reassign a corresponding
* port id.
* @param removedSubInfo if the all of slots have sims, it should remove the one of active sim.
* If the removedSubInfo is null, then use the default value.
* The default value is the esim slot and portId 0.