Add overriable configuration for hidding SIM related UI.
Bug: 240515161
Test: test cases and local testing
Merged-In: I8d7ddd18861a696830da39f040dfb14b9ed46726
Change-Id: I709a8007362b09dbb1ec1bd5d32c68d23ed0cfa9
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
Receive intent in MobileNetworkActivity and launch a activity which extend SettingsActivity
Test: atest
Bug: 197609014
Bug: 209606859
Change-Id: Ic07b18b3ea11744f240b25a0986474df763a199b
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
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
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
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
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
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
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
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
Our original design for mobile network subscription management included
having an on/off toggle for both eSIMs and physical SIMs. However, it
turns out that our current telephony stack has some problems with
disabling physical SIMs, so for now we're removing the on/off
toggle. Because of this, we've added a footer to the SIM details page
for physical SIMS letting users know that to disable them you need to
remove them from the device.
Even though we're removing the on/off toggle for pSIMs, there are still
a few edge cases where you could end up with a disabled one (eg having
two SIMs in single-SIM mode where the eSIM is active and then you erased
the eSIM). In order to have a way to re-enable the pSIM in these cases,
this CL changes the relevant pref's summary to "Tap to activate <name>"
and makes the tap action begin the re-enabling. This can affect either
the Mobile network pref on the Network & internet main page (if this
disabled pSIM is the only SIM), or an entry in the Mobile networks list
page (if there are still multiple SIMs present).
Finally, this also fixes a problem where we weren't showing the on/off
toggle for eSIMs if you only had one SIM total; we actually always want
to show it for eSIMs.
Bug: 132921553
Test: make RunSettingsRoboTests
Change-Id: Id0750ebd5bed46dc2450b65b53cc81847ef09b82
Sometimes we get null sub info which causes a crash. This just
makes it so that if we see that we treat it as inactive since
there isn't really a world where an active null sub info makes
sense.
Test: atest SubscriptionUtilTest
Bug: 131603073
Change-Id: Id5ecbecf011e19ff02d9465e0571b1d17c83de9a
During the early phase of work on DSDS, we found that a hacky solution
to seeing duplicate subscriptions that are part of a logical group (eg
Google Fi) was to filter out the entries with empty MNC strings. It
turns out this breaks things for some legitimate eSIM subsctiptions, and
isn't needed anymore because of the fixes that landed for b/127833821.
Fixes: 130706446
Test: make RunSettingsRoboTests
Change-Id: Ic4472c1de3c3e2449139b3e2ffb20d11a0058e8a
In single-sim mode, you can have both an eSIM subscription and a pSIM
inserted into the device, and only one of them can be enabled. It turns
out that if the pSIM is the disabled one, we would not show it in the
settings UI; this CL fixes that.
It also fixes a somewhat related problem that I noticed while testing
this, that if you have only one subscription that happens to be
disabled, we were not showing the on/off switch at the top of the page,
which would leave you with no way to enable it.
Bug: 129864878
Test: make RunSettingsRoboTests
Change-Id: I4214ad34c59ac2df429772c066c51a9318f5baa7
In a couple of places we were showing DSDS UI using the list of
*available* subscriptions instead of the list of *active* ones. This
difference is relevant for instance if you have multiple eSIM profiles -
in typical hardware only one of those can be active at one time. This CL
fixes that problem in two places:
1) The header at the top of the Network & internet page
2) The ListPreference's on the mobile network detail page for selecting
the default subscription for Calls / SMS.
Fixes: 129673046
Test: make RunSettingsRoboTests
Change-Id: I891c856bdd4516286fcee1067684d9161ceaca80
Replace getAvailableSubscriptionInfoList with getSelectableSubscriptionInfoList
so that hidden subscriptions won't show up.
Bug: 121396526
Test: manual
Change-Id: I73c41a6605b68011ba5b619f9d6e8d41d18a9dcd
This adds prefs to the the details page for mobile network subscriptions
that appear in multi-SIM mode. They show which subscription is set as
the default for calls and SMS respectively, and let the user change what
the default is for each. They can be set to either a specific
subscription, or set to "Ask every time".
Bug: 122670283
Test: make RunSettingsRoboTests
Change-Id: Id2b23e4b5c3d1b5c04b5766e73fc8202c05d8f75
The new UX for showing multiple active mobile plan subscriptions (SIMs,
eSIMs, etc.) needs a header at the top of the Network & internet page
that shows wifi status and a list of active mobile subscriptions in the
form of one Preference per subscription.
This CL adds display of the mobile subscriptions to this header. It does
not yet show the correct summary text or do anything when you tap on
them - that will be coming in subsequent CLs. Also, since adding a
variable number of items to the top of the page messes up our current
strategy of having a fixed number of hidden items at the bottom based on
overall item count, this CL just makes all items visible. Subsequent CLs
can restore this behavior with dynamic adjustment.
Bug: 116349402
Test: make RunSettingsRoboTests
Change-Id: Ibfadf8cb61f6f5aff6ce38b7974267b1e4ddc719
In several places implementing the new changes for better UX with
multiple mobile subscriptions, we need a bit of code that filters the
results coming from the SubscriptionManager. This CL adds that common
code in a util class that will be used in later CLs.
Bug: 116349402
Test: RunSettingsRoboTests
Change-Id: Ie9376629604ac2c4a2f15123edc380c5999f2f83