Correct name of PRIMARY_SUBSCRIPTION_LIST_CHANGED.
Correct name of PRIMARY_SUBSCRIPTION_LIST_CHANGED in manifest.
Also, make sure SimSelectNotification only listens to that intent.
Bug: 128645056
Test: manual
Change-Id: I008e5346ff1e015d1aa57ca31844426e33bd99b8
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 9f6cdb5..95fe918 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -2566,7 +2566,7 @@
<receiver android:name=".sim.SimSelectNotification">
<intent-filter>
- <action android:name="android.intent.action.PRIMARY_SUBSCRIPTION_LIST_CHANGED"/>
+ <action android:name="android.telephony.action.PRIMARY_SUBSCRIPTION_LIST_CHANGED"/>
</intent-filter>
</receiver>
diff --git a/src/com/android/settings/sim/SimSelectNotification.java b/src/com/android/settings/sim/SimSelectNotification.java
index 4f3b9bc..a1e942a 100644
--- a/src/com/android/settings/sim/SimSelectNotification.java
+++ b/src/com/android/settings/sim/SimSelectNotification.java
@@ -30,6 +30,7 @@
import android.content.Intent;
import android.content.res.Resources;
import android.telephony.SubscriptionManager;
+import android.telephony.TelephonyManager;
import com.android.settings.R;
import com.android.settings.Settings.SimSettingsActivity;
@@ -45,6 +46,9 @@
@Override
public void onReceive(Context context, Intent intent) {
+ if (!TelephonyManager.ACTION_PRIMARY_SUBSCRIPTION_LIST_CHANGED.equals(intent.getAction())) {
+ return;
+ }
// Cancel any previous notifications
cancelNotification(context);
// Create a notification to tell the user that some defaults are missing