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

Commit 8565a06e authored by kaiyiz's avatar kaiyiz
Browse files

SystemUI: Fix the issue that carrier information not shown

Make carrier information always show when pull down status bar.

CRs-Fixed: 743495

Change-Id: Ia93c69a71ce8b3d129506e90daa0cc5b0844047a
parent 043295a2
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -145,6 +145,7 @@
    <!-- Show emergency call label only without carrier label on expanded notification area -->
    <bool name="config_showEmergencyCallLabelOnly">true</bool>
    <bool name="config_showDataConnectionView">true</bool>
    <bool name="config_forceShowCarrierLabel">false</bool>
    <bool name="config_disableWifiAndBluetooth">false</bool>

    <!-- style of status bar:
+12 −16
Original line number Diff line number Diff line
@@ -1733,24 +1733,20 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
        // Emergency calls only is shown in the expanded header now.
        final boolean emergencyCallsShownElsewhere = mContext.getResources().getBoolean(
                R.bool.config_showEmergencyCallLabelOnly);

        final boolean makeVisible ;
        final boolean forceShowCarrierLabel = mContext.getResources().getBoolean(
                R.bool.config_forceShowCarrierLabel);
        final boolean isEmergencyOnly;
        if (isMSim()) {
            makeVisible =
            !(emergencyCallsShownElsewhere && mMSimNetworkController.isEmergencyOnly())
            && mStackScroller.getHeight() < (mNotificationPanel.getHeight()
                    - mCarrierLabelHeight - mStatusBarHeaderHeight)
            && mStackScroller.getVisibility() == View.VISIBLE
            && mState != StatusBarState.KEYGUARD;
            isEmergencyOnly = mMSimNetworkController.isEmergencyOnly();
        } else {
            makeVisible =
            !(emergencyCallsShownElsewhere && mNetworkController.isEmergencyOnly())
            && mStackScroller.getHeight() < (mNotificationPanel.getHeight()
                    - mCarrierLabelHeight - mStatusBarHeaderHeight)
            isEmergencyOnly = mNetworkController.isEmergencyOnly();
        }
        final boolean makeVisible =
                !(emergencyCallsShownElsewhere && isEmergencyOnly)
                && (forceShowCarrierLabel || mStackScroller.getHeight() < (mNotificationPanel
                        .getHeight() - mCarrierLabelHeight - mStatusBarHeaderHeight))
                && mStackScroller.getVisibility() == View.VISIBLE
                && mState != StatusBarState.KEYGUARD;
        }


        if (force || mCarrierLabelVisible != makeVisible) {
            mCarrierLabelVisible = makeVisible;