Add support to hide LTE+ in UI. am: 37d34ba893

am: 4dace686d9

Change-Id: Ie7768d4184f50da049b982aa8f7e2ab817b9e080
This commit is contained in:
Robert Greenwalt
2016-07-28 19:40:03 +00:00
committed by android-build-merger
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? --> <!-- Should "4G" be shown instead of "LTE" when the network is NETWORK_TYPE_LTE? -->
<bool name="config_show4GForLTE">true</bool> <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. --> <!-- milliseconds before the heads up notification auto-dismisses. -->
<integer name="heads_up_notification_decay">5000</integer> <integer name="heads_up_notification_decay">5000</integer>

View File

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

View File

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