Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4dace686 authored by Robert Greenwalt's avatar Robert Greenwalt Committed by android-build-merger
Browse files

Add support to hide LTE+ in UI.

am: 37d34ba8

Change-Id: I7dd6b924f67e540159a9d5a72cdf72d5d1b3caef
parents c8a5f377 37d34ba8
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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>

+14 −3
Original line number Diff line number Diff line
@@ -197,11 +197,22 @@ public class MobileSignalController extends SignalController<

        if (mConfig.show4gForLte) {
            mNetworkToIconLookup.put(TelephonyManager.NETWORK_TYPE_LTE, TelephonyIcons.FOUR_G);
            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);
    }
+2 −0
Original line number Diff line number Diff line
@@ -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;
        }
    }