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
36 lines
1.4 KiB
XML
36 lines
1.4 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- Copyright (C) 2019 The Android Open Source Project
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
you may not use this file except in compliance with the License.
|
|
You may obtain a copy of the License at
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
See the License for the specific language governing permissions and
|
|
limitations under the License.
|
|
-->
|
|
|
|
<PreferenceScreen
|
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
xmlns:settings="http://schemas.android.com/apk/res-auto"
|
|
android:key="mobile_network_list_screen"
|
|
android:title="@string/network_settings_title">
|
|
|
|
<Preference
|
|
android:key="add_more"
|
|
settings:isPreferenceVisible="false"
|
|
android:title="@string/mobile_network_list_add_more"
|
|
android:icon="@drawable/ic_menu_add"
|
|
android:order="100" >
|
|
<intent android:action="android.telephony.euicc.action.PROVISION_EMBEDDED_SUBSCRIPTION">
|
|
<extra android:name="android.telephony.euicc.extra.FORCE_PROVISION"
|
|
android:value="true"/>
|
|
</intent>
|
|
</Preference>
|
|
|
|
</PreferenceScreen>
|