summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Malcolm Chen <refuhoo@google.com> 2019-05-31 17:37:49 -0700
committer Malcolm Chen <refuhoo@google.com> 2019-05-31 17:39:53 -0700
commit034cb343a10ea748f24bf5c17e7f50d53e464725 (patch)
treeccbbe661ca480dc821b5e842388fbdd7b365fa2f
parent3fce56e79c5004d5f33ce3ec9b580c1e2364c672 (diff)
Triggering notifications when dual CDMA SIM combinations are detected
Define dual CDMA SIM combination extras. Bug: 132631355 Test: manual - have two cdma capable subscriptions active, make sure the notification is sent, and tapping on it leads to the helper page. Change-Id: I5caf39478dd0814aa1b2def801b1c3a107355682
-rw-r--r--telephony/java/android/telephony/TelephonyManager.java46
1 files changed, 44 insertions, 2 deletions
diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java
index 6f3e97a87bb1..0194ebd43aa2 100644
--- a/telephony/java/android/telephony/TelephonyManager.java
+++ b/telephony/java/android/telephony/TelephonyManager.java
@@ -93,6 +93,8 @@ import com.android.internal.telephony.PhoneConstants;
import com.android.internal.telephony.RILConstants;
import com.android.internal.telephony.TelephonyProperties;
+import dalvik.system.VMRuntime;
+
import java.io.FileInputStream;
import java.io.IOException;
import java.lang.annotation.Retention;
@@ -108,8 +110,6 @@ import java.util.function.Consumer;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
-import dalvik.system.VMRuntime;
-
/**
* Provides access to information about the telephony services on
* the device. Applications can use the methods in this class to
@@ -1497,6 +1497,48 @@ public class TelephonyManager {
*/
public static final int EXTRA_DEFAULT_SUBSCRIPTION_SELECT_TYPE_ALL = 4;
+ /**
+ * Integer intent extra to be used with {@link #ACTION_PRIMARY_SUBSCRIPTION_LIST_CHANGED}
+ * to indicate if the SIM combination in DSDS has limitation or compatible issue.
+ * e.g. two CDMA SIMs may disrupt each other's voice call in certain scenarios.
+ *
+ * @hide
+ */
+ public static final String EXTRA_SIM_COMBINATION_WARNING_TYPE =
+ "android.telephony.extra.SIM_COMBINATION_WARNING_TYPE";
+
+ /** @hide */
+ @IntDef({
+ EXTRA_SIM_COMBINATION_WARNING_TYPE_NONE,
+ EXTRA_SIM_COMBINATION_WARNING_TYPE_DUAL_CDMA
+ })
+ @Retention(RetentionPolicy.SOURCE)
+ public @interface SimCombinationWarningType{}
+
+ /**
+ * Used as an int value for {@link #EXTRA_DEFAULT_SUBSCRIPTION_SELECT_TYPE}
+ * to indicate there's no SIM combination warning.
+ * @hide
+ */
+ public static final int EXTRA_SIM_COMBINATION_WARNING_TYPE_NONE = 0;
+
+ /**
+ * Used as an int value for {@link #EXTRA_DEFAULT_SUBSCRIPTION_SELECT_TYPE}
+ * to indicate two active SIMs are both CDMA hence there might be functional limitation.
+ * @hide
+ */
+ public static final int EXTRA_SIM_COMBINATION_WARNING_TYPE_DUAL_CDMA = 1;
+
+ /**
+ * String intent extra to be used with {@link #ACTION_PRIMARY_SUBSCRIPTION_LIST_CHANGED}
+ * to indicate what's the name of SIM combination it has limitation or compatible issue.
+ * e.g. two CDMA SIMs may disrupt each other's voice call in certain scenarios, and the
+ * name will be "operator1 & operator2".
+ *
+ * @hide
+ */
+ public static final String EXTRA_SIM_COMBINATION_NAMES =
+ "android.telephony.extra.SIM_COMBINATION_NAMES";
//
//
// Device Info