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

Commit 4bb59349 authored by Selim Cinek's avatar Selim Cinek
Browse files

Fixed a bug with the overflow number

The number didn't apply the contrast computations
and wasn't scaling when density changed.

Change-Id: Ibde116f176c3a8d20de28ab432a80d9219f75581
Fixes: 28073460
parent 964db75d
Loading
Loading
Loading
Loading
+9 −5
Original line number Diff line number Diff line
@@ -41,6 +41,7 @@ import android.widget.Chronometer;
import android.widget.ImageView;
import android.widget.RemoteViews;

import com.android.internal.util.NotificationColorUtil;
import com.android.systemui.R;
import com.android.systemui.classifier.FalsingManager;
import com.android.systemui.statusbar.notification.HybridNotificationView;
@@ -103,6 +104,7 @@ public class ExpandableNotificationRow extends ActivatableNotificationView {
    private int mMaxExpandHeight;
    private int mHeadsUpHeight;
    private View mVetoButton;
    private int mNotificationColor;
    private boolean mClearable;
    private ExpansionLogger mLogger;
    private String mLoggingKey;
@@ -226,6 +228,7 @@ public class ExpandableNotificationRow extends ActivatableNotificationView {
        mPrivateLayout.onNotificationUpdated(entry);
        mPublicLayout.onNotificationUpdated(entry);
        mShowingPublicInitialized = false;
        updateNotificationColor();
        updateClearability();
        if (mIsSummaryWithChildren) {
            recreateNotificationHeader();
@@ -603,11 +606,12 @@ public class ExpandableNotificationRow extends ActivatableNotificationView {
    }

    public int getNotificationColor() {
        int color = getStatusBarNotification().getNotification().color;
        if (color == Notification.COLOR_DEFAULT) {
            return mContext.getColor(com.android.internal.R.color.notification_icon_default_color);
        return mNotificationColor;
    }
        return color;

    private void updateNotificationColor() {
        mNotificationColor = NotificationColorUtil.resolveContrastColor(mContext,
                getStatusBarNotification().getNotification().color);
    }

    public HybridNotificationView getSingleLineView() {
+5 −0
Original line number Diff line number Diff line
@@ -663,6 +663,11 @@ public class NotificationChildrenContainer extends ViewGroup {
            addView(divider, index);
            mDividers.set(i, divider);
        }
        removeView(mOverflowNumber);
        mOverflowNumber = null;
        mOverflowInvertHelper = null;
        mGroupOverFlowState = null;
        updateGroupOverflow();
    }

    public void setUserLocked(boolean userLocked) {