New System API to launch SIM Preference in Setting
Bug: b/381319469 Test: Manual FLAG: com.android.internal.telephony.flags.action_sim_preference_settings Change-Id: I91815464a2462820de4f3db1bd59e6987910089d
This commit is contained in:
@@ -852,10 +852,15 @@
|
|||||||
</activity>
|
</activity>
|
||||||
|
|
||||||
<activity android:name=".network.SimOnboardingActivity"
|
<activity android:name=".network.SimOnboardingActivity"
|
||||||
android:exported="false"
|
android:exported="true"
|
||||||
android:configChanges="orientation|keyboard|keyboardHidden|screenSize|screenLayout|smallestScreenSize"
|
android:configChanges="orientation|keyboard|keyboardHidden|screenSize|screenLayout|smallestScreenSize"
|
||||||
android:permission="android.permission.WRITE_EMBEDDED_SUBSCRIPTIONS"
|
android:permission="android.permission.WRITE_EMBEDDED_SUBSCRIPTIONS"
|
||||||
android:theme="@style/Theme.SpaLib.BottomSheetDialog"/>
|
android:theme="@style/Theme.SpaLib.BottomSheetDialog">
|
||||||
|
<intent-filter android:priority="1">
|
||||||
|
<action android:name="android.settings.SIM_PREFERENCE_SETTINGS" />
|
||||||
|
<category android:name="android.intent.category.DEFAULT" />
|
||||||
|
</intent-filter>
|
||||||
|
</activity>
|
||||||
|
|
||||||
<activity android:name=".network.telephony.ToggleSubscriptionDialogActivity"
|
<activity android:name=".network.telephony.ToggleSubscriptionDialogActivity"
|
||||||
android:exported="false"
|
android:exported="false"
|
||||||
|
@@ -106,6 +106,12 @@ class SimOnboardingActivity : SpaBaseDialogActivity() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var targetSubId = intent.getIntExtra(SUB_ID,SubscriptionManager.INVALID_SUBSCRIPTION_ID)
|
var targetSubId = intent.getIntExtra(SUB_ID,SubscriptionManager.INVALID_SUBSCRIPTION_ID)
|
||||||
|
if (targetSubId == SubscriptionManager.INVALID_SUBSCRIPTION_ID) {
|
||||||
|
targetSubId = intent.getIntExtra(
|
||||||
|
Settings.EXTRA_SUB_ID,
|
||||||
|
SubscriptionManager.INVALID_SUBSCRIPTION_ID
|
||||||
|
)
|
||||||
|
}
|
||||||
initServiceData(this, targetSubId, callbackListener)
|
initServiceData(this, targetSubId, callbackListener)
|
||||||
if (!onboardingService.isUsableTargetSubscriptionId) {
|
if (!onboardingService.isUsableTargetSubscriptionId) {
|
||||||
Log.e(TAG, "The subscription id is not usable.")
|
Log.e(TAG, "The subscription id is not usable.")
|
||||||
|
Reference in New Issue
Block a user