summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Sarah Chin <sarahchin@google.com> 2020-04-28 17:22:17 +0000
committer Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> 2020-04-28 17:22:17 +0000
commitc30061fd5f50e3768db725b160d64a9da95596b6 (patch)
tree82f83674bb9c4e988bead506cdc82dcc7b2e7757
parent2d27c6a41c0169b1a2a757022b3b1f1e598f483b (diff)
parent55caa6f60fb25d757359479f967ab818deb33b3c (diff)
Merge changes from topics "displayinfocontroller", "remove_displayinfo" into rvc-dev am: 5227e8441d am: 88e7e04e61 am: 55caa6f60f
Change-Id: I176552be1453ed88b9c6da1f8c9b3256e46fda83
-rwxr-xr-xtelephony/java/android/telephony/CarrierConfigManager.java95
-rw-r--r--telephony/java/com/android/internal/telephony/DctConstants.java9
2 files changed, 89 insertions, 15 deletions
diff --git a/telephony/java/android/telephony/CarrierConfigManager.java b/telephony/java/android/telephony/CarrierConfigManager.java
index d2de19aaf89a..6b285d747854 100755
--- a/telephony/java/android/telephony/CarrierConfigManager.java
+++ b/telephony/java/android/telephony/CarrierConfigManager.java
@@ -3050,19 +3050,93 @@ public class CarrierConfigManager {
public static final String KEY_5G_ICON_CONFIGURATION_STRING = "5g_icon_configuration_string";
/**
- * Timeout in seconds for displaying 5G icon, default value is 0 which means the timer is
- * disabled.
+ * This configuration allows the system UI to determine how long to continue to display 5G icons
+ * when the device switches between different 5G scenarios.
+ *
+ * There are six 5G scenarios:
+ * 1. connected_mmwave: device currently connected to 5G cell as the secondary cell and using
+ * millimeter wave.
+ * 2. connected: device currently connected to 5G cell as the secondary cell but not using
+ * millimeter wave.
+ * 3. not_restricted_rrc_idle: device camped on a network that has 5G capability(not necessary
+ * to connect a 5G cell as a secondary cell) and the use of 5G is not restricted and RRC
+ * currently in IDLE state.
+ * 4. not_restricted_rrc_con: device camped on a network that has 5G capability(not necessary
+ * to connect a 5G cell as a secondary cell) and the use of 5G is not restricted and RRC
+ * currently in CONNECTED state.
+ * 5. restricted: device camped on a network that has 5G capability(not necessary to connect a
+ * 5G cell as a secondary cell) but the use of 5G is restricted.
+ * 6. any: any of the above scenarios, as well as none (not connected to 5G)
+ *
+ * The configured string contains various timer rules separated by a semicolon.
+ * Each rule will have three items: prior 5G scenario, current 5G scenario, and grace period
+ * in seconds before changing the icon. When the 5G state changes from the prior to the current
+ * 5G scenario, the system UI will continue to show the icon for the prior 5G scenario (defined
+ * in {@link #KEY_5G_ICON_CONFIGURATION_STRING}) for the amount of time specified by the grace
+ * period. If the prior 5G scenario is reestablished, the timer will reset and start again if
+ * the UE changes 5G scenarios again. Defined states (5G scenarios #1-5) take precedence over
+ * 'any' (5G scenario #6), and unspecified transitions have a default grace period of 0.
+ * The order of rules in the configuration determines the priority (the first applicable timer
+ * rule will be used).
+ *
+ * Here is an example: "connected_mmwave,connected,30;connected_mmwave,any,10;connected,any,10"
+ * This configuration defines 3 timers:
+ * 1. When UE goes from 'connected_mmwave' to 'connected', system UI will continue to display
+ * the 5G icon for 'connected_mmwave' for 30 seconds.
+ * 2. When UE goes from 'connected_mmwave' to any other state (except for connected, since
+ * rule 1 would be used instead), system UI will continue to display the 5G icon for
+ * 'connected_mmwave' for 10 seconds.
+ * 3. When UE goes from 'connected' to any other state, system UI will continue to display the
+ * 5G icon for 'connected' for 10 seconds.
+ *
+ * @hide
+ */
+ public static final String KEY_5G_ICON_DISPLAY_GRACE_PERIOD_STRING =
+ "5g_icon_display_grace_period_string";
+
+ /**
+ * This configuration extends {@link #KEY_5G_ICON_DISPLAY_GRACE_PERIOD_STRING} to allow the
+ * system UI to continue displaying 5G icons after the initial timer expires.
+ *
+ * There are six 5G scenarios:
+ * 1. connected_mmwave: device currently connected to 5G cell as the secondary cell and using
+ * millimeter wave.
+ * 2. connected: device currently connected to 5G cell as the secondary cell but not using
+ * millimeter wave.
+ * 3. not_restricted_rrc_idle: device camped on a network that has 5G capability(not necessary
+ * to connect a 5G cell as a secondary cell) and the use of 5G is not restricted and RRC
+ * currently in IDLE state.
+ * 4. not_restricted_rrc_con: device camped on a network that has 5G capability(not necessary
+ * to connect a 5G cell as a secondary cell) and the use of 5G is not restricted and RRC
+ * currently in CONNECTED state.
+ * 5. restricted: device camped on a network that has 5G capability(not necessary to connect a
+ * 5G cell as a secondary cell) but the use of 5G is restricted.
+ * 6. any: any of the above scenarios, as well as none (not connected to 5G)
+ *
+ * The configured string contains various timer rules separated by a semicolon.
+ * Each rule will have three items: primary 5G scenario, secondary 5G scenario, and
+ * grace period in seconds before changing the icon. When the timer for the primary 5G timer
+ * expires, the system UI will continue to show the icon for the primary 5G scenario (defined
+ * in {@link #KEY_5G_ICON_CONFIGURATION_STRING}) for the amount of time specified by the grace
+ * period. If the primary 5G scenario is reestablished, the timers will reset and the system UI
+ * will continue to display the icon for the primary 5G scenario without interruption. If the
+ * secondary 5G scenario is lost, the timer will reset and the icon will reflect the true state.
+ * Defined states (5G scenarios #1-5) take precedence over 'any' (5G scenario #6), and
+ * unspecified transitions have a default grace period of 0. The order of rules in the
+ * configuration determines the priority (the first applicable timer rule will be used).
*
- * System UI will show the 5G icon and start a timer with the timeout from this config when the
- * device connects to a 5G cell. System UI stops displaying 5G icon when both the device
- * disconnects from 5G cell and the timer is expired.
+ * Here is an example: "connected,not_restricted_rrc_idle,30"
+ * This configuration defines a secondary timer that extends the primary 'connected' timer.
+ * When the primary 'connected' timer expires while the UE is in the 'not_restricted_rrc_idle'
+ * 5G state, system UI will continue to display the 5G icon for 'connected' for 30 seconds.
+ * If the 5G state returns to 'connected', the timer will be reset without change to the icon,
+ * and if the 5G state changes to neither 'connected' not 'not_restricted_rrc_idle', the icon
+ * will change to reflect the true state.
*
- * If 5G is reacquired during this timer, the timer is canceled and restarted when 5G is next
- * lost. Allows us to momentarily lose 5G without blinking the icon.
* @hide
*/
- public static final String KEY_5G_ICON_DISPLAY_GRACE_PERIOD_SEC_INT =
- "5g_icon_display_grace_period_sec_int";
+ public static final String KEY_5G_ICON_DISPLAY_SECONDARY_GRACE_PERIOD_STRING =
+ "5g_icon_display_secondary_grace_period_string";
/**
* Controls time in milliseconds until DcTracker reevaluates 5G connection state.
@@ -4148,7 +4222,8 @@ public class CarrierConfigManager {
sDefaults.putString(KEY_5G_ICON_CONFIGURATION_STRING,
"connected_mmwave:5G,connected:5G,not_restricted_rrc_idle:5G,"
+ "not_restricted_rrc_con:5G");
- sDefaults.putInt(KEY_5G_ICON_DISPLAY_GRACE_PERIOD_SEC_INT, 0);
+ sDefaults.putString(KEY_5G_ICON_DISPLAY_GRACE_PERIOD_STRING, "");
+ sDefaults.putString(KEY_5G_ICON_DISPLAY_SECONDARY_GRACE_PERIOD_STRING, "");
/* Default value is 1 hour. */
sDefaults.putLong(KEY_5G_WATCHDOG_TIME_MS_LONG, 3600000);
sDefaults.putBoolean(KEY_UNMETERED_NR_NSA_BOOL, false);
diff --git a/telephony/java/com/android/internal/telephony/DctConstants.java b/telephony/java/com/android/internal/telephony/DctConstants.java
index 18e25921555a..76fc4f7d0519 100644
--- a/telephony/java/com/android/internal/telephony/DctConstants.java
+++ b/telephony/java/com/android/internal/telephony/DctConstants.java
@@ -109,11 +109,10 @@ public class DctConstants {
public static final int EVENT_DATA_SERVICE_BINDING_CHANGED = BASE + 49;
public static final int EVENT_DEVICE_PROVISIONED_CHANGE = BASE + 50;
public static final int EVENT_DATA_ENABLED_OVERRIDE_RULES_CHANGED = BASE + 51;
- public static final int EVENT_SERVICE_STATE_CHANGED = BASE + 52;
- public static final int EVENT_5G_TIMER_HYSTERESIS = BASE + 53;
- public static final int EVENT_5G_TIMER_WATCHDOG = BASE + 54;
- public static final int EVENT_CARRIER_CONFIG_CHANGED = BASE + 55;
- public static final int EVENT_SIM_STATE_UPDATED = BASE + 56;
+ public static final int EVENT_TELEPHONY_DISPLAY_INFO_CHANGED = BASE + 52;
+ public static final int EVENT_NR_TIMER_WATCHDOG = BASE + 53;
+ public static final int EVENT_CARRIER_CONFIG_CHANGED = BASE + 54;
+ public static final int EVENT_SIM_STATE_UPDATED = BASE + 55;
/***** Constants *****/