From 773b0824ee608b5098f85478ed2db84545e9c6d7 Mon Sep 17 00:00:00 2001 From: Nathan Harold Date: Tue, 12 Mar 2019 15:51:42 -0700 Subject: Opportunistic Sub Grouping Keys in CarrierConfig Add two keys to allow new subscriptions to be added into subscription groups before carrier config changes are broadcast. Bug: 123721160 Test: atest SubscriptionInfoUpdaterTest Merged-In: Ib6f811b70e41eba897b9bde0c0aeb0c880169f66 Change-Id: Ib6f811b70e41eba897b9bde0c0aeb0c880169f66 (cherry picked from commit c24e219fc17565c643305d90773d7f71bd168e4e) --- .../android/telephony/CarrierConfigManager.java | 44 ++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/telephony/java/android/telephony/CarrierConfigManager.java b/telephony/java/android/telephony/CarrierConfigManager.java index a567d03850a6..0f8f873b6847 100755 --- a/telephony/java/android/telephony/CarrierConfigManager.java +++ b/telephony/java/android/telephony/CarrierConfigManager.java @@ -2762,6 +2762,48 @@ public class CarrierConfigManager { public static final String KEY_AUTO_CANCEL_CS_REJECT_NOTIFICATION = "carrier_auto_cancel_cs_notification"; + /** + * Passing this value as {@link KEY_SUBSCRIPTION_GROUP_UUID_STRING} will remove the + * subscription from a group instead of adding it to a group. + * + * TODO: Expose in a future release. + * + * @hide + */ + public static final String REMOVE_GROUP_UUID_STRING = "00000000-0000-0000-0000-000000000000"; + + /** + * The UUID of a Group of related subscriptions in which to place the current subscription. + * + * A grouped subscription will behave for billing purposes and other UI purposes as though it + * is a transparent extension of other subscriptions in the group. + * + *

If set to {@link #REMOVE_GROUP_UUID_STRING}, then the subscription will be removed from + * its current group. + * + * TODO: unhide this key. + * + * @hide + */ + public static final String KEY_SUBSCRIPTION_GROUP_UUID_STRING = + "key_subscription_group_uuid_string"; + + /** + * A boolean property indicating whether this subscription should be managed as an opportunistic + * subscription. + * + * If true, then this subscription will be selected based on available coverage and will not be + * available for a user in settings menus for selecting macro network providers. If unset, + * defaults to “false”. + * + * TODO: unhide this key. + * + * @hide + */ + public static final String KEY_IS_OPPORTUNISTIC_SUBSCRIPTION_BOOL = + "key_is_opportunistic_subscription_bool"; + + /** The default value for every variable. */ private final static PersistableBundle sDefaults; @@ -3160,6 +3202,8 @@ public class CarrierConfigManager { sDefaults.putString(KEY_SMART_FORWARDING_CONFIG_COMPONENT_NAME_STRING, ""); sDefaults.putBoolean(KEY_ALWAYS_SHOW_PRIMARY_SIGNAL_BAR_IN_OPPORTUNISTIC_NETWORK_BOOLEAN, false); + sDefaults.putString(KEY_SUBSCRIPTION_GROUP_UUID_STRING, ""); + sDefaults.putBoolean(KEY_IS_OPPORTUNISTIC_SUBSCRIPTION_BOOL, false); } /** -- cgit v1.2.3-59-g8ed1b