Merge "Add MOBILE_DATA_POLICY_AUTO_DATA_SWITCH" into tm-qpr-dev am: 44a29abfc0
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20145980
Change-Id: I339f628c0860d916ebead150ab67968702448a89
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java
index a081bc3..1203717 100644
--- a/telephony/java/android/telephony/TelephonyManager.java
+++ b/telephony/java/android/telephony/TelephonyManager.java
@@ -15394,11 +15394,28 @@
public static final int MOBILE_DATA_POLICY_MMS_ALWAYS_ALLOWED = 2;
/**
+ * Allow switching mobile data to the non-default SIM if the non-default SIM has better
+ * availability.
+ *
+ * This is used for temporarily allowing data on the non-default data SIM when on-default SIM
+ * has better availability on DSDS devices, where better availability means strong
+ * signal/connectivity.
+ * If this policy is enabled, data will be temporarily enabled on the non-default data SIM,
+ * including during any voice calls(equivalent to enabling
+ * {@link #MOBILE_DATA_POLICY_DATA_ON_NON_DEFAULT_DURING_VOICE_CALL}).
+ *
+ * This policy can be enabled and disabled via {@link #setMobileDataPolicyEnabled}.
+ * @hide
+ */
+ public static final int MOBILE_DATA_POLICY_AUTO_DATA_SWITCH = 3;
+
+ /**
* @hide
*/
@IntDef(prefix = { "MOBILE_DATA_POLICY_" }, value = {
MOBILE_DATA_POLICY_DATA_ON_NON_DEFAULT_DURING_VOICE_CALL,
MOBILE_DATA_POLICY_MMS_ALWAYS_ALLOWED,
+ MOBILE_DATA_POLICY_AUTO_DATA_SWITCH,
})
@Retention(RetentionPolicy.SOURCE)
public @interface MobileDataPolicy { }