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

Commit 70d26c2d authored by Christoph Studer's avatar Christoph Studer Committed by Android (Google) Code Review
Browse files

Merge "SysUI: Respect "no notifs on lockscreen" setting" into lmp-dev

parents 61d37f6d 1529e019
Loading
Loading
Loading
Loading
+3 −6
Original line number Diff line number Diff line
@@ -220,7 +220,7 @@ public abstract class BaseStatusBar extends SystemUI implements
            setZenMode(mode);
            final boolean show = Settings.Global.getInt(mContext.getContentResolver(),
                    Settings.Global.LOCK_SCREEN_SHOW_NOTIFICATIONS, 1) != 0;
            setShowLockscreenNotifications(show);
            mShowLockscreenNotifications = show;
        }
    };

@@ -1423,7 +1423,8 @@ public abstract class BaseStatusBar extends SystemUI implements
    }

    private boolean shouldShowOnKeyguard(StatusBarNotification sbn) {
        return sbn.getNotification().priority >= Notification.PRIORITY_LOW;
        return mShowLockscreenNotifications &&
                sbn.getNotification().priority >= Notification.PRIORITY_LOW;
    }

    protected void setZenMode(int mode) {
@@ -1432,10 +1433,6 @@ public abstract class BaseStatusBar extends SystemUI implements
        updateNotifications();
    }

    protected void setShowLockscreenNotifications(boolean show) {
        mShowLockscreenNotifications = show;
    }

    protected abstract void haltTicker();
    protected abstract void setAreThereNotifications();
    protected abstract void updateNotifications();
+0 −8
Original line number Diff line number Diff line
@@ -536,12 +536,6 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
        }
    };

    @Override
    protected void setShowLockscreenNotifications(boolean show) {
        super.setShowLockscreenNotifications(show);
        updateStackScrollerState();
    }

    @Override
    public void start() {
        mDisplay = ((WindowManager)mContext.getSystemService(Context.WINDOW_SERVICE))
@@ -3435,8 +3429,6 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
        if (mStackScroller == null) return;
        boolean onKeyguard = mState == StatusBarState.KEYGUARD;
        mStackScroller.setDimmed(onKeyguard, false /* animate */);
        mStackScroller.setVisibility(!mShowLockscreenNotifications && onKeyguard
                ? View.INVISIBLE : View.VISIBLE);
        mStackScroller.setExpandingEnabled(!onKeyguard);
        ActivatableNotificationView activatedChild = mStackScroller.getActivatedChild();
        mStackScroller.setActivatedChild(null);