Commit Graph

37 Commits

Author SHA1 Message Date
Ling Ma
9c3ad34d6e Wrap subManager creation with createForAllProfiles
Since U, a sub can be associated with a particular profile, and thus in V we enforce filtering on the caller and only show the subs that are associated with the caller.
However, in some cases the caller indeed needs to see all subs regardless of its association, e.g. sysUI. Therefore, a param isForAllProfile is added to indicate whether the caller intends to see all subs.

Bug: 296076674
Test: voice call + data browsing
Flag: ACONFIG com.android.internal.telephony.flags.enforce_subscription_user_filter
 DEVELOPMENT
Change-Id: Ib5ccc841029a32ae9cf25d7a65b156e363d6b139
2024-01-20 05:28:14 +00:00
SongFerng Wang
ba2a86ad9f Using ACTION_SIM_CARD_STATE_CHANGED to detect simSlotMapping is complete
Sometime modem can't return the GET_SIM_STATUS immediately, so that the settings send the sim switching too early after simSlotMapping.

Bug: 291733084
Change-Id: If547c8b02020bc86c83915334e29945176a4ee9f
Test: tester will test it manually.
2023-12-22 05:57:53 +00:00
SongFerngWang
0ba519f1b4 To avoid the NullPointerException of UiccSlotInfo
Bug: 307599094
Test: Build pass
Change-Id: Ia3b8d29b37f2c9616856e9448c9f346b81229534
2023-10-31 19:54:44 +08:00
SongFerngWang
d94ac12190 To fix waiting too long issue when psim -> esim
if the user swithes slot from psim to esim, then the settings
need to wait the simSlotMapping completed and it has a timer to avoid
UI stay here too long.

Since the framework did not sned the carrier config changed with vaild
subId in MEP + psim->esim case, it cause the settings does not know the
simSlotMapping completed and it stay here until timeout.

For MEP case, changing this condition as SimSlotStatusChanged

Bug: 273813956
Test: atest UiccSlotUtilTest
Change-Id: Ic09dbcb3629fe13770f3ad301c0a396d6745969f
2023-07-07 10:22:49 +00:00
SongFerng Wang
40838101dd Merge "Revert "[MEP] psim->esim, don't skip carrierConfigChanged with subId -1"" into tm-qpr-dev am: f71b548285
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/20973543

Change-Id: Iff0e0f03886e414c36d508e5b17541514c1171f4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-01-16 08:21:26 +00:00
SongFerng Wang
f71b548285 Merge "Revert "[MEP] psim->esim, don't skip carrierConfigChanged with subId -1"" into tm-qpr-dev 2023-01-16 07:44:37 +00:00
SongFerng Wang
fe5978cde1 Revert "[MEP] psim->esim, don't skip carrierConfigChanged with subId -1"
This reverts commit 078ecbd765.

Reason for revert: The in-market device have error by some unknown reasons at b/264371574. To revert it, then the settings wait the 25s, it can protect the system has enough time for enabling esim.

Change-Id: Ic17380f549c764306851ad5cba6360f68df9b9b5
2023-01-13 04:18:34 +00:00
SongFerng Wang
bd476febf0 Merge "[MEP] the user can't enable the psim when revmovable esim is enabled" into tm-qpr-dev am: 2cd07f51ef
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/20116277

Change-Id: Ib62e9adf0e2bdac25821c9f70634c27b26515056
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-18 06:50:09 +00:00
SongFerng Wang
2cd07f51ef Merge "[MEP] the user can't enable the psim when revmovable esim is enabled" into tm-qpr-dev 2022-10-18 06:30:34 +00:00
SongFerngWang
c27b674e38 [MEP] the user can't enable the psim when revmovable esim is enabled
The isRemovableSimEnabled method at ToggleSubscriptionDialogActivity
UI is for psim, not esim. It should skip the revmovable esim slot.

Bug: 251384644
Test: build pass. atest UiccSlotUtilTest
Change-Id: I11d0f9528961ec5e47cd8682cf9b6bb988a5700f
2022-10-11 18:48:36 +08:00
SongFerng Wang
97d375875a Merge "[MEP] psim->esim, don't skip carrierConfigChanged with subId -1" into tm-qpr-dev am: da58404ea6
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/20064005

Change-Id: Id8b05f8faaadee52922e785b6e15c40eb1dd12de
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-07 14:09:58 +00:00
SongFerngWang
078ecbd765 [MEP] psim->esim, don't skip carrierConfigChanged with subId -1
After simSlotMapping from psim to esim, since the esim can not be
enabled by the modem, the UI start to enable the esim. Therefore,
when receiver receive the first carrier config changed, UI can
exit waiting state, and then start to enable esim.

Bug: 246556280
Test: Build pass. Verify by QA
Change-Id: I4b8b2f3d1dd014fc1ddb92ebffa614d6daf9d142
2022-09-29 17:46:24 +08:00
SongFerngWang
e63dfcbd90 [MEP] Modify the comments
Bug: 235792308
Test: build pass
Change-Id: Idf0ce19814ce8b23bc1eea864b36815203069f87
2022-06-13 18:24:30 +08:00
SongFerngWang
56e1297abe Unable to enable the removable esim
When the user enable the removable esim, the settings select wrong
slot(esim slot). The slot shold be the removable + esim slot and the
UiccCardInfo's cardId is the same as the removable esim's cardId.

Bug: 233170453
Bug: 233338345
Test: atest UiccSlotUtilTest
Change-Id: Ibd324b781c84318c994e3742bb82e1d1393b94e4
Merged-In: Ibd324b781c84318c994e3742bb82e1d1393b94e4
2022-06-13 17:49:00 +08:00
SongFerngWang
887bb592c8 Reuse the active esim slot
If there is the active esim slot in SS mode, the settings should
reuse it and does not change the sim slot mapping.

Bug: 229803628
Test: manually test.
Change-Id: I6daa38f54abfaf67c7640d9dc8be0da02eb59554
Merged-In: I6daa38f54abfaf67c7640d9dc8be0da02eb59554
2022-06-13 17:48:34 +08:00
SongFerngWang
64430ba2d2 Unable to enable the removable esim
When the user enable the removable esim, the settings select wrong
slot(esim slot). The slot shold be the removable + esim slot and the
UiccCardInfo's cardId is the same as the removable esim's cardId.

Bug: 233170453
Bug: 233338345
Test: atest UiccSlotUtilTest
Change-Id: Ibd324b781c84318c994e3742bb82e1d1393b94e4
2022-06-06 17:56:25 +08:00
SongFerngWang
7d71d3f451 [MEP] The removale slot can read the esim card
Revert the wrong logic for removale slot part at ag/18579901,
the removable slot can read the esim card.

Bug: 233338345
Test: atest UiccSlotUtilTest
Change-Id: Ic2ac6a5cc4d5846b8b1e2ca766348f239bb1b719
Merged-In: Ic2ac6a5cc4d5846b8b1e2ca766348f239bb1b719
2022-05-27 08:54:09 +00:00
SongFerngWang
18f10bb8b1 [MEP] The removale slot can read the esim card
Revert the wrong logic for removale slot part at ag/18579901,
the removable slot can read the esim card.

Bug: 233338345
Test: atest UiccSlotUtilTest
Change-Id: Ic2ac6a5cc4d5846b8b1e2ca766348f239bb1b719
2022-05-27 16:44:52 +08:00
SongFerngWang
82bf2a66b7 Changing the condition since the esim may be removable
The condition whether the slot is esim slot should use getIsEuicc
api since the esim may be removable.

Bug: 233338345
Test: atest UiccSlotUtilTest
Change-Id: I47dc068e57a0faa7f7ce85af7933a48caa2c93e4
Merged-In: I47dc068e57a0faa7f7ce85af7933a48caa2c93e4
2022-05-27 07:10:28 +00:00
SongFerngWang
948f512098 Changing the condition since the esim may be removable
The condition whether the slot is esim slot should use getIsEuicc
api since the esim may be removable.

Bug: 233338345
Test: atest UiccSlotUtilTest
Change-Id: I47dc068e57a0faa7f7ce85af7933a48caa2c93e4
2022-05-26 10:54:39 +08:00
SongFerngWang
42aa247383 Reuse the active esim slot
If there is the active esim slot in SS mode, the settings should
reuse it and does not change the sim slot mapping.

Bug: 229803628
Test: manually test.
Change-Id: I6daa38f54abfaf67c7640d9dc8be0da02eb59554
2022-05-10 01:04:20 +08:00
SongFerngWang
ef80331fb0 [MEP] sort the simSlotMapping by logcal slot id
The modem assign the simSlotMapping like UiccSlotMapping[
(mPortIndex=0, mPhysicalSlotIndex=0, mLogicalSlotIndex=1),
UiccSlotMapping (mPortIndex=1, mPhysicalSlotIndex=0,
mLogicalSlotIndex=0)]. The settings replace the first one
UiccSlotMapping when user insert psim and the both of esim
profile are not enabled. It is not correct. The root cause is that
the settings did not sort the simSlotMapping by logcal slot id.

Bug: 223662007
Test: atest UiccSlotUtilTest  (PASS)
Change-Id: I6871db6c2d8d7b9f3cb334bb5cd2c7978b5b3b85
Merged-In: I6871db6c2d8d7b9f3cb334bb5cd2c7978b5b3b85
2022-04-14 03:47:20 +08:00
SongFerngWang
ccd55cc5c9 In E+E, the user can't enable the PSIM
In the E+E and there is the empty slot, the user can't enable PSIM.
Since the settings can't set the correct simSlotMapping.

Bug: 222231991
Test: atest UiccSlotUtilTest (All passes) and Build pass
Change-Id: Ia261e3b41c6c4a43a5429815d93ae9f6ff16f0ec
Merged-In: Ia261e3b41c6c4a43a5429815d93ae9f6ff16f0ec
2022-04-14 03:46:28 +08:00
SongFerngWang
2479c9f7bd [MEP] psim's logical slot index is 0
psim's logical slot index is 0, so changing the API and adding test
cases.

Bug: 221839363
Test: atest UiccSlotUtilTest
Change-Id: I1588bd4a2f552a6b41844883b6ad50f1bfec95de
(cherry picked from commit b162438b5d)
Merged-In: I1588bd4a2f552a6b41844883b6ad50f1bfec95de
2022-04-14 03:45:55 +08:00
SongFerngWang
7ab547f1b8 [MEP] The subscriptionInfo's getSimSlotIndex is logical slotId
1. The subscriptionInfo's getSimSlotIndex is logical slotId. The code
   should compare it with uiccSlotMapping.getLogicalSlotIndex()
2. Rename the parameters for the readability.
3. The mobile network selection dialog did not be closed after user clicked.

Bug: 219951253
Test: manual test.
Change-Id: I7fef78547f4e6283791cd15a03275eaefeb50e3c
Merged-In: I7fef78547f4e6283791cd15a03275eaefeb50e3c
2022-04-14 03:37:16 +08:00
SongFerngWang
d3f3730721 [MEP]The Esim's PhysicalSlotIndex is wrong
Using the getUiccSlotInfo API to get the PhysicalSlotIndex of esim

Bug: 215302360
Test: atest UiccSlotUtilTest
Change-Id: Ic43d6c4a3209d24673769b71b9a148e780ee81ab
Merged-In: Ic43d6c4a3209d24673769b71b9a148e780ee81ab
2022-04-14 03:33:42 +08:00
SongFerngWang
37358798bc switch SIM refactor to support MEP
1. Using new telephony API and doing the code refactor
2. To support multi esim profiles case

Bug: 199902896
Test: local build pass.
Change-Id: I8580022793e5c3fc14159f14b406f864353477f8
Merged-In: I8580022793e5c3fc14159f14b406f864353477f8
2022-03-25 17:03:55 +00:00
SongFerngWang
506c3df5b9 [MEP] sort the simSlotMapping by logcal slot id
The modem assign the simSlotMapping like UiccSlotMapping[
(mPortIndex=0, mPhysicalSlotIndex=0, mLogicalSlotIndex=1),
UiccSlotMapping (mPortIndex=1, mPhysicalSlotIndex=0,
mLogicalSlotIndex=0)]. The settings replace the first one
UiccSlotMapping when user insert psim and the both of esim
profile are not enabled. It is not correct. The root cause is that
the settings did not sort the simSlotMapping by logcal slot id.

Bug: 223662007
Test: atest UiccSlotUtilTest  (PASS)
Change-Id: I6871db6c2d8d7b9f3cb334bb5cd2c7978b5b3b85
2022-03-11 02:58:55 +08:00
SongFerngWang
68cfaafe73 In E+E, the user can't enable the PSIM
In the E+E and there is the empty slot, the user can't enable PSIM.
Since the settings can't set the correct simSlotMapping.

Bug: 222231991
Test: atest UiccSlotUtilTest (All passes) and Build pass
Change-Id: Ia261e3b41c6c4a43a5429815d93ae9f6ff16f0ec
2022-03-07 12:44:00 +08:00
SongFerngWang
0b948c827b [MEP] psim's logical slot index is 0
psim's logical slot index is 0, so changing the API and adding test
cases.

Bug: 221839363
Test: atest UiccSlotUtilTest
Change-Id: I1588bd4a2f552a6b41844883b6ad50f1bfec95de
(cherry picked from commit b162438b5d)
2022-03-03 17:14:44 +00:00
SongFerngWang
e90d80cc52 [MEP] The subscriptionInfo's getSimSlotIndex is logical slotId
1. The subscriptionInfo's getSimSlotIndex is logical slotId. The code
   should compare it with uiccSlotMapping.getLogicalSlotIndex()
2. Rename the parameters for the readability.
3. The mobile network selection dialog did not be closed after user clicked.

Bug: 219951253
Test: manual test.
Change-Id: I7fef78547f4e6283791cd15a03275eaefeb50e3c
(cherry picked from commit 181f8179f1)
2022-03-03 09:31:47 +00:00
SongFerngWang
28bed8ec9f [MEP]The Esim's PhysicalSlotIndex is wrong
Using the getUiccSlotInfo API to get the PhysicalSlotIndex of esim

Bug: 215302360
Test: atest UiccSlotUtilTest
Change-Id: Ic43d6c4a3209d24673769b71b9a148e780ee81ab
2022-01-27 21:13:16 +08:00
sandeepjs
dbe31b8e6b eSIM deprecated API test Refactoring
Test: build
Bug: 159354974
Change-Id: Iedeb90f186ab9f82894e2fecef86d339c8989542
Merged-In: Iedeb90f186ab9f82894e2fecef86d339c8989542
2022-01-03 12:15:02 +00:00
SongFerngWang
1e0e9021ac switch SIM refactor to support MEP
1. Using new telephony API and doing the code refactor
2. To support multi esim profiles case

Bug: 199902896
Test: local build pass.
Change-Id: I8580022793e5c3fc14159f14b406f864353477f8
2021-12-08 18:35:33 +08:00
sandeepjs
40ffe69a3e eSIM deprecated API test Refactoring
Test: build
Bug: 159354974
Change-Id: Iedeb90f186ab9f82894e2fecef86d339c8989542
2021-11-15 05:44:54 +00:00
Jiashen Wang
595884ed04 Change Settings to be able to receive timeout values from LPA
Bug: 171846124
Test: Tested manually
Change-Id: I547315eabd7cc873b0dda7a3bb2d09c84225ddd3
2021-01-31 21:38:28 +00:00
Jiashen Wang
7840ae7569 [SIM Dialog Migration] Migrate SIM enable dialog from LPA to Settings
Migrates SIM enabling and DSDS dialog from LPA to Settings.
Design: https://docs.google.com/document/d/1wb5_hoBkZVbkXGNWHbx4Jf61swjfxsJzkytiTzJosYo/edit?usp=sharing
Bug: 160819390
Test: Manually tested eSIM profile enabling.

Change-Id: I9ce690a1594adfc90b62840819237acd54418469
2020-11-05 14:58:15 -08:00