Which unifies whether we should sim settings on some related pages.
Before this change, we check SubscriptionUtil.isSimHardwareVisible()
and / or Utils.isWifiOnly().
After this change, we unified logic to,
canChangeSimSettings() =
packageManager.hasSystemFeature(PackageManager.FEATURE_TELEPHONY) &&
userManager.isAdminUser
Fix: 365924140
Flag: EXEMPT bug fix
Test: manual - check Network & internet
Test: unit tests
Change-Id: Ibf83237e3d0088f78c96a1b39ee8f1e3a9c756ea
Which also avoid calling from main thread.
Bug: 356684993
Flag: EXEMPT bug fix
Test: manual - on SIMs
Test: atest EuiccRepositoryTest
Change-Id: I0b11b0bd1e8a4b5754781e888fd220fa3080a212
- Use sql command to sort subscription info data instead of current.
Bug: 284306899
Test: Manual test
Change-Id: Ie0c5f5614a336771f865f02e7675b4e125ff15bb
1. MobileNetworkSummaryController
- No matter single SIM or multiple SIMs, always launch MobileNetworkListFragment
- Remove the + and |
APM off: https://screenshot.googleplex.com/7M8qzsXFesy3nDi.png
APM on: https://screenshot.googleplex.com/C4ZnbpgUTPzTijL.png
2. Fix the APM mode
Bug: 244786012
Bug: 261810065
Test: make RunSettingsRoboTests ROBOTEST_FILTER=MobileNetworkSummaryControllerTest
Change-Id: I8e5c9b8a58ef13b6deaea284e9793077b2da58f6
MobileNetworkActivity has launchMode singleTask, it makes
the Activity shows in full screen instead of 2-pane.
This change register SplitPairRule for the Activity to show
in 2-pane. However, there are other objects which starts
MobileNetworkActivity, it still needs later CL to refine
and register SplitPairRule for other objects which starts
MobileNetworkActivity.
Bug: 204039043
Test: manual
Settings -> Network & Internet -> SIMs
Change-Id: Ia15c17c88efd46c5bb2b41aa21848293b9ff5610
Disabled SIM are hidden from UI due to the API only check if there's a
SIM with mobile data capability active within device.
Right now, the UI design has been changed. The UI here should be
accessible no mater with or without the support of mobile data.
Bug: 193820245
Bug: 194761536
Test: local
Change-Id: I9c8b8fa16e74cd0fe4419966cc97ad55b5b87b17
(cherry picked from commit 847f326cd4)
(cherry picked from commit a8ce9abde7)
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
If the DISALLOW_CONFIG_MOBILE_NETWORKS admin policy is set, we were
accidentally still allowing access to the flow where you add an eSIM
subscription via the "plus" button on the Network & internet page. While
fixing this, I also noticed that the mobile networks list page (which
only becomes available if you have multiple subscriptions) has a link at
the bottom to start the flow as well, and that wasn't being protected.
The fix for the plus button on the Network & internet page was just to
make sure not to call setEnabled(true) if the preference was already
disabled by admin policy, since that has the effect of overriding the
admin-disabling.
The fix for the mobile networks list page just needed to add the
relevant tags in the layout XML, and then we get it for free.
Fixes: 137627845
Test: make RunSettingsRoboTests
Change-Id: I896ac248f50aaeecc157791938a0a0a98265aa07
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
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
If there is no active subscription and esim is unsupported, disable
this preference.
Bug: 129143739
Test: RunSettingsRoboTests
Change-Id: I5f8b0d95df8764a3a505aae5e26df42e9412c021
It turns out to be more complicated than I had thought to determine if a
device should be considered to support eSIM. But the good news is that
we already had a helper method for this - this CL switches to using it
in some code for DSDS UI.
Fixes: 129061243
Test: make RunSettingsRoboTests
Change-Id: I41e500eb70b6c6b725c0ddf09fe1ca1a69df4563
This changes the behavior for when we show an affordance to add a mobile
subscription via the eSIM manager (if eSIM is supported). On the
Network & internet page, the behavior we now want for the "Mobile
network" pref has several possibilities as detailed below.
No existing subscriptions:
- Summary is "Add a network"
- Tapping on pref leads to the add subscription flow
One existing subscription:
- Summary is the name of the subscription (usually the carrier name)
- Tapping left-hand side of the pref leads to mobile network details
- A "+" button is shown on right of pref, and tapping "+" leads to the
add subscription flow
2 or more existing subscriptions:
- Summary is "<count> SIMs"
- Tapping left-hand side of the pref leads to a new page with the list
of subscriptions
- A "+" button is shown on right of pref, and tapping "+" leads to the
add subscription flow
The existing code controlling the "Mobile network" pref (in
MobileNetworkSummaryController.java) already had behavior similar to
this, but needed to be updated to no longer rely on whether we're in
DSDS mode.
Also, the page with the list of subscriptions that you can go to in the
"2 or more existing subscriptions" case mentioned above has an "Add
more" link at the bottom which leads to the same eSIM manager flow, but
it was always showing this link even if the device doesn't support
eSIM. This CL also fixes that problem.
Bug: 127870567
Test: make RunSettingsRoboTests
Change-Id: Ie8cca47ac81f8992fa6ecf1940bdfed411fd333b
There were two failing tests due to problems in this class:
-PreferenceControllerContractTest
-SettingsSearchIndexablesProviderTest
In one case it was because we weren't checking for a valid Lifecycle,
and in the other it wasn't implementing PreferenceControllerMixin (or
inheriting from BasePreferenceController).
Bug: 127524919
Test: atest SettingsUnitTests
Change-Id: I662e300d68a21c28e1efb3ec9e23c4a882497176
In the places where we have a link to let the user add an additional
mobile network subscription, we need the "fore provision" extra added to
the intent.
Bug: 127532036
Test: manual (enable DSDS mode and the settings_network_internet_v2
feature flag, then go to Settings->Network & internet and try clicking
on the '+' button on the right of the Mobile network preference, or
click through that pref if you have 2+ sims and hit the 'Add more'
link. This should bring you into an 'add sim' flow provided by the eSIM
manager)
Change-Id: I56ab2125938f2df07f756d100a7ac993b1e5ced3
This fixes a few issues with the "Mobile network" preference that shows
on the Network & internet page:
-The pref should not be available at all if the device is wifi-only.
-The pref should be disabled in airplane mode.
-If eSIM support is disabled, we need to disable entry points for adding
a new eSIM subscription (the summary and click handler in single-SIM
mode with no physical SIM, and the 'add' button in dual-SIM mode).
Bug: 116349402
Test: make RunSettingsRoboTests
Change-Id: Ic6fe426e9f890d80b399d48a2c9984d4d8b02a10
On the Network & internet page, we have a "Mobile network" pref that in
single-SIM mode leads to a detail page for the current SIM. In multi-SIM
mode it has more complicated behavior (leading either to details about
the current subscription if there is only one, or a list of
subscriptions if more than one).
One of the things we wanted to add was a shortcut to add another eSIM
subscription. So this CL adds a plus button control on the right of the
preference which leads to a flow to add another mobile subscription via
the eSIM manager.
Bug: 116349402
Test: make RunSettingsRoboTests
Change-Id: I38e0031e3bd603e93c45dcb4557750e7bc1b8b5a
When a device supports simultaneous connection to multiple mobile
networks, we want the "Mobile network" entry on the Network & internet
page to list the number of active SIMs and when clicked, go to a page
that lists them all.
Bug: 116349402
Test: make RunSettingsRoboTests
Change-Id: Ie642d7801cda07dcbbe74d42c234db6605566be4