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:
jinjeong
2024-11-28 01:39:50 +00:00
committed by Jin Jeong
parent 13d90e8024
commit 2e7db438ab
2 changed files with 14 additions and 3 deletions

View File

@@ -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"

View File

@@ -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.")
@@ -611,4 +617,4 @@ class SimOnboardingActivity : SpaBaseDialogActivity() {
CALLBACK_FINISH(5) CALLBACK_FINISH(5)
} }
} }
} }