Commit Graph

60 Commits

Author SHA1 Message Date
Rafael Higuera Silva
736df6d2ef Add new dialogue when user is going to delete sim that use RAC.
Test: make
Bug: 316419093
Change-Id: Iaed54afa7cfd20c1dd6adbd4d50f54cab3da095d
2024-02-23 23:11:56 +00:00
songferngwang
f1ea484425 SIM Onboarding flow completed
- Add the setup flow for switching sim and rename and setup primary sim
  items
- Add the bottom sheet and progress dialog.
Bug: 318310357
Bug: 298898436
Bug: 298891941
Test: build pass. Will upload another cl for testing

Change-Id: Ie9680f0a67afe453c1449c0f2b59e98fd627e215
2024-02-06 10:56:59 +00:00
SongFerng Wang
4601261f81 Merge "Add the UI of dual sim onboarding" into main 2024-01-22 08:40:49 +00:00
SongFerngWang
4713fd6baa Add the UI of dual sim onboarding
This is the first version.

Bug: 318310357
Bug: 298898436
Bug: 298891941
Test: Build pass
atest SimOnboardingLabelSimTest
atest SimOnboardingPageProviderTest
atest SimOnboardingPrimarySimTest
atest SimOnboardingSelectSimTest

Change-Id: I195bd6b03ab0e881fdd67272c2476ef2b1fcd3ed
2024-01-22 07:47:51 +00:00
SongFerng Wang
1229c54470 Using the phone number without formate for the unique DisplayName
If the phone number has formate, the getUniqueSubscriptionDisplayNames may have the white space.

Bug: 318022908
Change-Id: I459fb244ec690eff03d565b494b007849ef44c8b
Test: atest SubscriptionUtilTest
2024-01-19 17:52:55 +00:00
Sunny Shao
076ed573eb Revert^2 "Nullability Annotations replacement"
This reverts commit 19d1d3d15d.

Reason for revert: revert it because this is not the root cause.

bug: 316867690
Change-Id: I0f168dbb64044aa720202af7b1040afd4f028c9c
2024-01-10 07:34:01 +00:00
Sunny Shao
19d1d3d15d Revert "Nullability Annotations replacement"
This reverts commit cf0501e4d7.

Reason for revert: b/317462033, it seems a flaky but revert it first.

Change-Id: Ie1d5e279cca6477fc17d8c27c1ecda8d7a6b2553
2023-12-29 02:28:24 +00:00
sunnyshao
cf0501e4d7 Nullability Annotations replacement
-- Replace the android.annotation.Nullable / android.annotation.NonNull
   with androidx.annotation.Nullable / androidx.annotation.NonNull

Bug: 316867690
Test: build pass
Change-Id: I0c1da55dfb09ece855151c47e0492d6f46538621
2023-12-20 08:50:09 +08:00
SongFerng Wang
e4d761254e Fix the isEmbeddedSubscriptionVisible logic
Bug: 314736037
Change-Id: I10ddafbad1590a660735466c0f6d7e9ed8bffcff
Test: local test
2023-12-12 04:26:43 +00:00
SongFerngWang
ec27c60461 Add condition whether esim is visible or not
Bug: 314736037
Test: SubscriptionInfoListViewModelTest pass and build pass
Change-Id: I7dc86ca93691f044d951122c0c669c790b7aef98
2023-12-11 05:47:49 +08:00
SongFerngWang
d21f14a002 Remove the cached display name
If the display name is changed, then the Settings should remove the
cached display name.

Bug: 296157273
Test: [pass] atest SubscriptionUtilTest  [pass]Build and manual test
Change-Id: I3b1297ddddf9f9051dd16523b97fc27255cf3923
2023-09-19 06:25:33 +00:00
tom hsu
0b3da89a91 [Settings] Fix inactive SIM show display name with subectiption id.
- Cached active SIM' display name with last 4 digits phone number to
   avoid that this active SIM change to inactive SIM then show the
   display name with subscription id.

Bug: 271567615
Test: Manual test passed
Test: atest passed
Change-Id: I119d60ab4e92b1f04fb42f96df10bc81aa378a7c
2023-06-30 05:51:40 +00:00
SongFerngWang
4c206e1a11 Fix the IndexOutOfBoundsException
Bug: 276460284
Test: build pass
Change-Id: If70bd4624b9b94aafa0930f0deba106cff5a2212
2023-04-12 19:50:51 +08:00
Zoey Chen
63978e7e52 [Settings] 1. Show default subId SIM page if get an intent with invalid
subId 2. Fix the hotswap UI issue

Bug: 271635200
Bug: 271347499
Test: local test
Change-Id: Iac61a211fce7bcd85da48cb291f46584cf43f5c5
2023-03-13 08:12:20 +00:00
SongFerngWang
d1d1ecc9d3 Using upper case country code
According to the ISO 3166-1, the two letters country code is upper case.

Bug: 271753491
Test: build pass and local test
Change-Id: Ia71cb6de45682407e4d988522c50d83659fe0017
2023-03-07 16:27:36 +08:00
Bonian Chen
c9ace54b03 [Settings] Unified the source of phone number
Route UI access to phone number into a unified util class within
Settings app.

Bug: 265940535
Test: local

Change-Id: Ic747b0044217101d9a6a1e2cd6e59bbdbcd88021
2023-02-13 04:57:18 +00:00
Zoey Chen
31a3bd2e03 [Settings] Change the way in MobileNetworkListFragment for getting the subscription info from room db part3
Bug: 254405469
Test: atest NetworkProviderDownloadedSimListControllerTest, atest NetworkProviderSimListControllerTest
Change-Id: Iec6e17688b260d2fef464a711f92e788fe76fbe7
2022-10-26 12:28:10 +00:00
Bonian Chen
5dae24208b [Settings] configuration for hidding SIM related UI
Add overriable configuration for hidding SIM related UI.

Bug: 240515161
Test: test cases and local testing
Change-Id: I8d7ddd18861a696830da39f040dfb14b9ed46726
2022-10-21 09:21:59 +00: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
Zoey Chen
989dd669b2 [Large Screen] Launch MobileNetworkActivity as a fragment for split mode
Receive intent in MobileNetworkActivity and launch a activity which extend SettingsActivity

Test: atest
Bug: 197609014
Bug: 209606859
Change-Id: Ic07b18b3ea11744f240b25a0986474df763a199b
2021-12-10 08:33:33 +00:00
Bonian Chen
3dfad58897 [Settings] support of getPhoneNumber API
Access to new API for retrieving phone number.

Bug: 208321353
Test: local build pass
Change-Id: I8484f94934670f24c80c95df89e8752420c1f439
2021-11-30 11:04:38 +00:00
sandeepjs
40ffe69a3e eSIM deprecated API test Refactoring
Test: build
Bug: 159354974
Change-Id: Iedeb90f186ab9f82894e2fecef86d339c8989542
2021-11-15 05:44:54 +00:00
Bonian Chen
4c2dfa26e3 [Settings] Correct some typo
Bug: 193026761
Test: build pass
Change-Id: Ic710c84e5aca093381c5e06d4f6e987cf6f729a7
2021-07-07 23:44:04 +08:00
Bonian Chen
75f1450bbf [Settings] Hide subscriptions not existed within device
For non-active subscriptions, the one inserted in slot
but turned off need to be visible to the user. However,
the one un-plugged need to be invisble.

Since SubscriptionUtil#getSelectableSubscriptionInfoList() didn't cover all the cases required. Create this one to fit into the criteria required here.

Bug: 191228344
Test: local
Change-Id: Ia68c23b007164b7520456cb6c7427ca142558b59
2021-07-07 07:02:55 +00:00
Peter Wang
d368e85c2e Use translated name ("SIM") for default profile display name ("CARD")
Bug: 186156909
Test: Local
Change-Id: Icb8e5e7afb64d28e1ff7567882288fb1621dbe9a
2021-06-15 02:59:21 -07:00
Zoey Chen
71fada3af8 [ProviderModel] Use category to separate physical SIM and e-SIM
Mock from UX: https://screenshot.googleplex.com/4kscwJvoQE7vwF3.png

Implementation UI: https://screenshot.googleplex.com/AEeVzLi364KiPGa.png

Bug: 187071119
Test: atest NetworkProviderSimListControllerTest
Test: atest NetworkProviderSimsCategoryControllerTest
Test: atest NetworkProviderDownloadedSimListControllerTest
Test: atest NetworkProviderDownloadedSimsCategoryControllerTest

Change-Id: Ia84bebe6ea431cdbae19f3e4b840f7cd56dc2d6f
2021-05-31 23:59:37 +08:00
Jeremy Goldman
a51780f35d Subscription name has whitespace trimmed to determine uniqueness
For example, if a subscription has the name "subsc" and another has
"subsc    " the extra unique information will be added to the
subscriptions.

Test: atest -c SubscriptionUtilTest
Bug: 183664625
Change-Id: Ia137169f6cdd9804ab04126e5045c9fb61556d54
2021-04-07 16:26:52 +08:00
Bonian Chen
a9a411e3df [Settings] Only display backup calling when more than 1 SIM
Backup calling only available when more than 1 SIM available.

Bug: 179802059
Test: on device
Change-Id: I24e5eb9e1a7064c3ea65389fbb00c0ff2a5852ed
2021-03-02 21:14:53 +08:00
Jeremy Goldman
9e949b1920 Unique display name util uses available, rather than active, subscriptions.
Test: atest -c SettingsUnitTest
Bug: 178560175
Change-Id: Ief035cf3de3ac03fe348095f36bfb78a41f93d2c
(cherry picked from commit c14e3b3115)
Merged-In: Ief035cf3de3ac03fe348095f36bfb78a41f93d2c
2021-02-04 03:15:41 +00:00
Jiashen Wang
428273765b Merge "Slot Change Receiver Migration" into sc-dev 2021-02-01 23:57:09 +00:00
Jeremy Goldman
3dd2878437 SubscriptionUtil checks that SubscriptionInfo is null before accessing.
Test: atest -c SubscriptionUtilTest
Bug: 178707680
Change-Id: I03938405929c3307460107671bbe695ee5e0f6e9
2021-02-01 05:01:49 +00:00
Jiashen Wang
b54d25ee13 Slot Change Receiver Migration
Implemented slot change cases when pSIM is inserted and removed.
Bug: 153811431
Bug: 170508680
Test: Manually tested

Change-Id: Ib0a96da1d7d702f7c64e75b929c73b8548f8e459
2021-01-28 14:15:53 -08:00
Jeremy Goldman
67c75ac102 Helper function to return the unique name for subscription info
Many classes within Settings have access to the subscription info, rather
than only having access to the subscription id. For these classes, it is
more convenient to have a helper method where the whole subscription
info can be passed in, rather than having to call the
getSubscriptionId() helper method in so many locations within the
telephony settings codebase.

Bug: 150370656
Bug: 148303118
Test: atest -c SubscriptionUtilTest
Change-Id: I181960933ab8610d5572b7a7d6671fab8c1dbd22
2021-01-19 09:30:14 +00:00
Jeremy Goldman
3c334cc47f Utility to compute a single subscription's unique display name.
Bug: 150370656
Bug: 148303118
Test: atest -c SubscriptionUtilTest
Change-Id: Id4600dbf038117129c62331f9e00b7035af1c0fd
2021-01-13 22:03:03 +08:00
Jeremy Goldman
2fb7e1bbc4 Return mapping of subscription id to unique display name.
Fallback 1: if display names are the same, use the last 4 digits of a
phone number
Fallback 2: if the phone number cannot be displayed or the last 4 digits
are identical, fallback to use the subscription id

This function depends on DeviceInfoUtils for the phone number
formatting. Because DeviceInfoUtils is within SettingsLib, this function
(at least for now) is located within the Settings codebase itself.

go/unique-sub-display-names

Bug: 148303118
Bug: 150370656
Test: atest -c SubscriptionUtilTest
Change-Id: Id3e26254d4b193c13506df52fb59e97643df7a32
2021-01-13 16:18:00 +08:00
Jiashen Wang
8271561a76 [SIM Dialog Migration] Enable SIM operation dialog in Settings
Change Settings to not call SubscriptionManager#setSubscriptionEnabled.
Instead, make Settings call EuiccManager APIs directly.
Design: https://docs.google.com/document/d/1wb5_hoBkZVbkXGNWHbx4Jf61swjfxsJzkytiTzJosYo/edit?usp=sharing
Bug: 160819390
Test: Manually tested eSIM profile enabling.

Change-Id: I56bbcbb9ccb886b0f9249e67c5a6a6444bb7dd45
2020-12-05 21:48:09 -08:00
Jiashen Wang
ff311a2107 [SIM Dialog Migration] Migrate eSIM erase dialog
Bug: 160819390
Test: Manually tested eSIM profile disabling.
Design: https://docs.google.com/document/d/1wb5_hoBkZVbkXGNWHbx4Jf61swjfxsJzkytiTzJosYo/edit?usp=sharing
Change-Id: I9523ee5dbab5b6a5ea020647a20992ac0b1aea86
2020-10-08 22:31:53 -07:00
Jiashen Wang
d8bd3bb669 Migrate SIM operation dialog from LPA to Settings
In Android R, when users enable, disable, delete, or rename a profile,
Settings calls SubscriptionManager APIs which telephony ends up to send
actions “TOGGLE_SUBSCRIPTION_PRIVILEGED”,
“DELETE_SUBSCRIPTION_PRIVILEGED”, and “RENAME_SUBSCRIPTION_PRIVILEGED”
to EuiccManager. After EuiccUiDispatcher dispatches the action, Google
LPA receives it and starts the corresponding operations and DSDS
dialogs. We can see there some back-and-forth that goes on between LPA
and telephony. In order to improve the current structure, we devided
to move the dialogs to Settings and make it call EuiccManager APIs
directly.

Bug: 160819390
Test: Manually tested eSIM profile disabling.
Design: https://docs.google.com/document/d/1wb5_hoBkZVbkXGNWHbx4Jf61swjfxsJzkytiTzJosYo/edit?usp=sharing
Change-Id: Ib933df42ca3606de2310edc4d64c3e11800a1096
2020-09-28 13:38:10 -07:00
SongFerngWang
5189dc3860 Mainline remove hide api SubscriptionInfo.getCardString
Bug: 147128878
Test: build pass
Change-Id: Idb44af6a01626013339f5ca05486dd11112a5867
2020-01-31 18:48:09 +08:00
changbetty
e30517f9a5 [Mainline] Copy the method getSelectableSubscriptionInfoList from SubscriptionManager to Settings
Bug: 147206736
Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=SubscriptionUtilTest
      make RunSettingsRoboTests -j ROBOTEST_FILTER=MobileDataSliceTest

Change-Id: I6d7e72a656723c0620d579e1e223945e2a3588af
2020-01-21 14:05:14 +08:00
SongFerngWang
affe5406a6 Mainline: removed legacy UI for network selection mode.
This cl base on ag/10098777. Now inserted inactive pSIM
will be included in Telephony's get available and
get selectable subInfo list so that logic is no longer
needed.

Bug: 147128878
Test: build pass
Change-Id: I1a0f431f05268d29afce145c3eb720594cfc57a3
2020-01-16 10:55:46 +00:00
Xiangyu/Malcolm Chen
69a7e054f5 Merge "Remove logic to manually search inactive pSIM." 2020-01-16 04:24:34 +00:00
Malcolm Chen
640e56433f Remove logic to manually search inactive pSIM.
Nowe inserted inactive pSIM will be included in Telephony's get
available and get selectable subInfo list so that logic is no longer
needed.

Bug: 147128878
Test: unittest
Change-Id: Icd131f133e47dae0770a4da71c51de3c2a94b42b
2020-01-15 14:58:07 -08:00
Bonian Chen
ec344c6031 [Settings] Remove null checking for TelephonyManager
1. TelephonyManager#createForSubscriptionId(int) never returns null
   Remove null checking.
2. Adopting context#getSystemService(SubscriptionManager.class)

Bug: None
Test: make
Change-Id: Ie36dea80a4dfabbc34d9d25c50e60e4928b2f936
2020-01-14 01:01:51 +08:00
Bonian Chen
2716dd18bb [Settings] Unable to display disabled SIM
Disabled p(e)SIM should be allowed to display to the user.

Bug: 144172733
Test: Manual
Change-Id: I6825fde8ffb22bc95d6c50a60bdeb8027a2f93b8
2019-12-18 16:44:42 +08:00
Xiangyu/Malcolm Chen
e0f40d5948 Merge "Mainline: remove usage of hiddepn API SubscriptionManager#getPhoneId" 2019-12-17 01:59:43 +00:00
Malcolm Chen
26e5dbdbfd Mainline: remove usage of hiddepn API SubscriptionManager#getPhoneId
Bug: 140908357
Test: build
Change-Id: Idaa206c7659717a269738c0121a31d957f7d90d0
2019-12-16 11:43:00 -08:00
Automerger Merge Worker
107cd136a3 Merge "[Settings] Adopting public API" am: 8ddd0da0a1 am: 40d2a2dd8d am: 11fa77b023
Change-Id: I87282b78a9db6eb3611591f0c4702447b8470db4
2019-12-16 08:31:03 +00:00
Bonian Chen
1247771b88 [Settings] Adopting public API
Replace SubscriptionManager#getActiveSubscriptionInfoList(true) by
SubscriptionManager#getActiveSubscriptionInfoList() since they're
equivalent.

Bug: 146312766
Test: build pass
Change-Id: Iab8a141277e0199f75a3419527e15d63669224fc
2019-12-16 06:35:43 +00:00
Malcolm Chen
e5dcd02f4c Add disable pSIM option in Settings
As we start disabling pSIM option in R, we check that if the feature is
supported, add the "Use SIM" toggle back to pSIM page.

Bug: 141018421
Test: manual test
Change-Id: I1af497ce5ede93f823825718b8136ff8ae0ab49c
2019-12-06 13:20:06 -08:00