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

Commit 59ec304e authored by Jorim Jaggi's avatar Jorim Jaggi
Browse files

Don't invert legacy notifications

Bug: 19130917
Change-Id: Id06fcf8fb11b783360a86534e024164b230e84a4
parent 7b5e6c88
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -903,12 +903,18 @@ public class ExpandableNotificationRow extends ActivatableNotificationView {
        return mShowingPublic ? mPublicLayout : mPrivateLayout;
    }

    @Override
    public void setShowingLegacyBackground(boolean showing) {
        super.setShowingLegacyBackground(showing);
        mPrivateLayout.setShowingLegacyBackground(showing);
        mPublicLayout.setShowingLegacyBackground(showing);
    }

    public void setExpansionLogger(ExpansionLogger logger, String key) {
        mLogger = logger;
        mLoggingKey = key;
    }


    private void logExpansionEvent(boolean userAction, boolean wasExpanded) {
        final boolean nowExpanded = isExpanded();
        if (wasExpanded != nowExpanded && mLogger != null) {
+7 −1
Original line number Diff line number Diff line
@@ -67,6 +67,8 @@ public class NotificationContentView extends FrameLayout {
    private final Paint mFadePaint = new Paint();
    private boolean mAnimate;
    private boolean mIsHeadsUp;
    private boolean mShowingLegacyBackground;

    private final ViewTreeObserver.OnPreDrawListener mEnableAnimationPredrawListener
            = new ViewTreeObserver.OnPreDrawListener() {
        @Override
@@ -421,7 +423,7 @@ public class NotificationContentView extends FrameLayout {
    public void setDark(boolean dark, boolean fade, long delay) {
        if (mDark == dark || mContractedChild == null) return;
        mDark = dark;
        mContractedWrapper.setDark(dark, fade, delay);
        mContractedWrapper.setDark(dark && !mShowingLegacyBackground, fade, delay);
    }

    public void setHeadsUp(boolean headsUp) {
@@ -436,4 +438,8 @@ public class NotificationContentView extends FrameLayout {
        // layout, and saves us some layers.
        return false;
    }

    public void setShowingLegacyBackground(boolean showing) {
        mShowingLegacyBackground = showing;
    }
}