Add support to hide LTE+ in UI.

Some carriers may not want LTE_CA to show in status bar/QS
so added a config overlay setting for this.

bug:30394970
Change-Id: I6e318aa9bd5921f76ded477415269f2996e5534c
This commit is contained in:
Robert Greenwalt
2016-07-27 14:54:34 -07:00
parent 9adea2e246
commit 37d34ba893
3 changed files with 19 additions and 3 deletions

View File

@@ -126,6 +126,9 @@
<!-- Should "4G" be shown instead of "LTE" when the network is NETWORK_TYPE_LTE? -->
<bool name="config_show4GForLTE">true</bool>
<!-- Should "LTE"/"4G" be shown instead of "LTE+"/"4G+" when on NETWORK_TYPE_LTE_CA? -->
<bool name="config_hideLtePlus">false</bool>
<!-- milliseconds before the heads up notification auto-dismisses. -->
<integer name="heads_up_notification_decay">5000</integer>

View File

@@ -197,11 +197,22 @@ public class MobileSignalController extends SignalController<
if (mConfig.show4gForLte) {
mNetworkToIconLookup.put(TelephonyManager.NETWORK_TYPE_LTE, TelephonyIcons.FOUR_G);
mNetworkToIconLookup.put(TelephonyManager.NETWORK_TYPE_LTE_CA,
TelephonyIcons.FOUR_G_PLUS);
if (mConfig.hideLtePlus) {
mNetworkToIconLookup.put(TelephonyManager.NETWORK_TYPE_LTE_CA,
TelephonyIcons.FOUR_G);
} else {
mNetworkToIconLookup.put(TelephonyManager.NETWORK_TYPE_LTE_CA,
TelephonyIcons.FOUR_G_PLUS);
}
} else {
mNetworkToIconLookup.put(TelephonyManager.NETWORK_TYPE_LTE, TelephonyIcons.LTE);
mNetworkToIconLookup.put(TelephonyManager.NETWORK_TYPE_LTE_CA, TelephonyIcons.LTE_PLUS);
if (mConfig.hideLtePlus) {
mNetworkToIconLookup.put(TelephonyManager.NETWORK_TYPE_LTE_CA,
TelephonyIcons.LTE);
} else {
mNetworkToIconLookup.put(TelephonyManager.NETWORK_TYPE_LTE_CA,
TelephonyIcons.LTE_PLUS);
}
}
mNetworkToIconLookup.put(TelephonyManager.NETWORK_TYPE_IWLAN, TelephonyIcons.WFC);
}

View File

@@ -852,6 +852,7 @@ public class NetworkControllerImpl extends BroadcastReceiver
boolean showAtLeast3G = false;
boolean alwaysShowCdmaRssi = false;
boolean show4gForLte = false;
boolean hideLtePlus = false;
boolean hspaDataDistinguishable;
static Config readConfig(Context context) {
@@ -864,6 +865,7 @@ public class NetworkControllerImpl extends BroadcastReceiver
config.show4gForLte = res.getBoolean(R.bool.config_show4GForLTE);
config.hspaDataDistinguishable =
res.getBoolean(R.bool.config_hspa_data_distinguishable);
config.hideLtePlus = res.getBoolean(R.bool.config_hideLtePlus);
return config;
}
}