From 60551b68378c294c9d126b24b3b4fea1970ec83e Mon Sep 17 00:00:00 2001 From: Robert Greenwalt Date: Thu, 9 Jun 2016 16:28:40 -0700 Subject: [PATCH] Add a Carrier-config specific ratcheter of RATs. Only reports transitions to higher RATs within a given family. Reset when we move to a new cell. Avoids costly propogation of RAT flapping within the family, for example every outgoing data pops us into a higher RAT and idle time pops us back down. bug:27360321 Change-Id: I549d79c1c74325981bee284cef452bd096184d86 --- .../android/telephony/CarrierConfigManager.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/telephony/java/android/telephony/CarrierConfigManager.java b/telephony/java/android/telephony/CarrierConfigManager.java index 44d89c14486b8..e0de2611cf2d6 100644 --- a/telephony/java/android/telephony/CarrierConfigManager.java +++ b/telephony/java/android/telephony/CarrierConfigManager.java @@ -777,6 +777,16 @@ public class CarrierConfigManager { /** @hide */ public static final int CDMA_ROAMING_MODE_ANY = 2; + /** + * The families of Radio Access Technologies that will get clustered and ratcheted, + * ie, we will report transitions up within the family, but not down until we change + * cells. This prevents flapping between base technologies and higher techs that are + * granted on demand within the cell. + * @hide + */ + public static final String KEY_RATCHET_RAT_FAMILIES = + "ratchet_rat_families"; + /** The default value for every variable. */ private final static PersistableBundle sDefaults; @@ -922,6 +932,11 @@ public class CarrierConfigManager { sDefaults.putStringArray(KEY_SIGNAL_DCFAILURE_RECEIVER_STRING_ARRAY, null); sDefaults.putStringArray(KEY_SIGNAL_PCO_RECEIVER_STRING_ARRAY, null); sDefaults.putString(KEY_CARRIER_SETUP_APP_STRING, ""); + + // Rat families: {GPRS, EDGE}, {EVDO, EVDO_A, EVDO_B}, {UMTS, HSPA, HSDPA, HSUPA, HSPAP} + // Order is important - lowest precidence first + sDefaults.putStringArray(KEY_RATCHET_RAT_FAMILIES, + new String[]{"1,2","7,8,12","3,11,9,10,15"}); } /**