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

Commit 84c0117f authored by LuK1337's avatar LuK1337 Committed by Łukasz Patron
Browse files

SystemUI: Hide centered_area when showing heads up

Needed for network traffic monitor.

Change-Id: Ib96a75a936cf4d71e23a575e012741b812ed2aa1
parent 5a28ff76
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -54,6 +54,7 @@ public class HeadsUpAppearanceController implements OnHeadsUpChangedListener,
    private final HeadsUpManagerPhone mHeadsUpManager;
    private final NotificationStackScrollLayout mStackScroller;
    private final HeadsUpStatusBarView mHeadsUpStatusBarView;
    private final View mCenteredView;
    private final View mCenteredIconView;
    private final ClockController mClockController;
    private final View mOperatorNameView;
@@ -108,6 +109,7 @@ public class HeadsUpAppearanceController implements OnHeadsUpChangedListener,
                statusBarView.findViewById(R.id.clock),
                new ClockController(statusBarView.getContext(), statusBarView),
                statusBarView.findViewById(R.id.operator_name_frame),
                statusBarView.findViewById(R.id.centered_area),
                statusBarView.findViewById(R.id.centered_icon_area));
    }

@@ -126,11 +128,13 @@ public class HeadsUpAppearanceController implements OnHeadsUpChangedListener,
            View clockView,
            ClockController clockController,
            View operatorNameView,
            View centeredView,
            View centeredIconView) {
        mNotificationIconAreaController = notificationIconAreaController;
        mHeadsUpManager = headsUpManager;
        mHeadsUpManager.addListener(this);
        mHeadsUpStatusBarView = headsUpStatusBarView;
        mCenteredView = centeredView;
        mCenteredIconView = centeredIconView;
        headsUpStatusBarView.setOnDrawingRectChangedListener(
                () -> updateIsolatedIconLocation(true /* requireUpdate */));
@@ -287,6 +291,9 @@ public class HeadsUpAppearanceController implements OnHeadsUpChangedListener,
                if (!isRightClock) {
                    hide(clockView, View.INVISIBLE);
                }
                if (mCenteredView.getVisibility() != View.GONE) {
                    hide(mCenteredView, View.INVISIBLE);
                }
                if (mCenteredIconView.getVisibility() != View.GONE) {
                    hide(mCenteredIconView, View.INVISIBLE);
                }
@@ -297,6 +304,9 @@ public class HeadsUpAppearanceController implements OnHeadsUpChangedListener,
                if (!isRightClock) {
                    show(clockView);
                }
                if (mCenteredView.getVisibility() != View.GONE) {
                    show(mCenteredView);
                }
                if (mCenteredIconView.getVisibility() != View.GONE) {
                    show(mCenteredIconView);
                }
+2 −0
Original line number Diff line number Diff line
@@ -100,6 +100,7 @@ public class HeadsUpAppearanceControllerTest extends SysuiTestCase {
                new View(mContext),
                mock(ClockController.class),
                mOperatorNameView,
                new View(mContext),
                new View(mContext));
        mHeadsUpAppearanceController.setAppearFraction(0.0f, 0.0f);
    }
@@ -180,6 +181,7 @@ public class HeadsUpAppearanceControllerTest extends SysuiTestCase {
                new View(mContext),
                mock(ClockController.class),
                new View(mContext),
                new View(mContext),
                new View(mContext));
        newController.readFrom(mHeadsUpAppearanceController);