Add extra to the intent for adding additional subscription
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
diff --git a/res/xml/mobile_network_list.xml b/res/xml/mobile_network_list.xml
index 5bffa2f..b72540f 100644
--- a/res/xml/mobile_network_list.xml
+++ b/res/xml/mobile_network_list.xml
@@ -24,7 +24,10 @@
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" />
+ <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>
diff --git a/src/com/android/settings/network/MobileNetworkSummaryController.java b/src/com/android/settings/network/MobileNetworkSummaryController.java
index dd282c6..24f5c31 100644
--- a/src/com/android/settings/network/MobileNetworkSummaryController.java
+++ b/src/com/android/settings/network/MobileNetworkSummaryController.java
@@ -116,6 +116,7 @@
private void startAddSimFlow() {
final Intent intent = new Intent(EuiccManager.ACTION_PROVISION_EMBEDDED_SUBSCRIPTION);
+ intent.putExtra(EuiccManager.EXTRA_FORCE_PROVISION, true);
mContext.startActivity(intent);
}