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

Commit 33e21fcc authored by John Wang's avatar John Wang
Browse files

Control H icon display in Status bar.

Bug 2138275. Add a config setting to control if status bar
should show different icons for UMTS and HSPA connnection.
parent 3b36ed09
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -158,4 +158,6 @@
    <!-- Allow the menu hard key to be disabled in LockScreen on some devices -->
    <bool name="config_disableMenuKeyInLockScreen">false</bool>

    <!-- Control whether status bar should distinguish HSPA data icon form UMTS data icon on devices -->
    <bool name="config_hspa_data_distinguishable">false</bool>
</resources>
+14 −1
Original line number Diff line number Diff line
@@ -272,6 +272,7 @@ public class StatusBarPolicy {
    private IBinder mDataIcon;
    private IconData mDataData;
    private boolean mDataIconVisible;
    private boolean mHspaDataDistinguishable;

    // ringer volume
    private IBinder mVolumeIcon;
@@ -517,6 +518,14 @@ public class StatusBarPolicy {
        filter.addAction(TelephonyIntents.ACTION_SIM_STATE_CHANGED);
        filter.addAction(TtyIntent.TTY_ENABLED_CHANGE_ACTION);
        mContext.registerReceiver(mIntentReceiver, filter, null, mHandler);

        // load config to determine if to distinguish Hspa data icon
        try {
            mHspaDataDistinguishable = mContext.getResources().getBoolean(
                    com.android.internal.R.bool.config_hspa_data_distinguishable);
        } catch (Exception e) {
            mHspaDataDistinguishable = false;
        }
    }

    public static void installIcons(Context context, StatusBarService service) {
@@ -960,7 +969,11 @@ public class StatusBarPolicy {
        case TelephonyManager.NETWORK_TYPE_HSDPA:
        case TelephonyManager.NETWORK_TYPE_HSUPA:
        case TelephonyManager.NETWORK_TYPE_HSPA:
            if (mHspaDataDistinguishable) {
                mDataIconList = sDataNetType_h;
            } else {
                mDataIconList = sDataNetType_3g;
            }
            break;
        case TelephonyManager.NETWORK_TYPE_CDMA:
            // display 1xRTT for IS95A/B