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

Commit 059a49f8 authored by Selim Cinek's avatar Selim Cinek Committed by Android (Google) Code Review
Browse files

Merge "Reset the notification expanded states on screen off" into lmp-dev

parents 1806b1fc ccd14fbc
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -152,6 +152,11 @@ public class ExpandableNotificationRow extends ActivatableNotificationView {
        logExpansionEvent(true, wasExpanded);
    }

    public void resetUserExpansion() {
        mHasUserChangedExpansion = false;
        mUserExpanded = false;
    }

    public boolean isUserLocked() {
        return mUserLocked;
    }
+12 −1
Original line number Diff line number Diff line
@@ -113,7 +113,6 @@ import com.android.systemui.R;
import com.android.systemui.doze.DozeService;
import com.android.systemui.keyguard.KeyguardViewMediator;
import com.android.systemui.qs.QSPanel;
import com.android.systemui.qs.QSTile;
import com.android.systemui.statusbar.ActivatableNotificationView;
import com.android.systemui.statusbar.BaseStatusBar;
import com.android.systemui.statusbar.CommandQueue;
@@ -2928,6 +2927,7 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
                notifyHeadsUpScreenOn(false);
                finishBarAnimations();
                stopNotificationLogging();
                resetUserExpandedStates();
            }
            else if (Intent.ACTION_SCREEN_ON.equals(action)) {
                mScreenOn = true;
@@ -2956,6 +2956,17 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
        }
    };

    private void resetUserExpandedStates() {
        ArrayList<Entry> activeNotifications = mNotificationData.getActiveNotifications();
        final int notificationCount = activeNotifications.size();
        for (int i = 0; i < notificationCount; i++) {
            NotificationData.Entry entry = activeNotifications.get(i);
            if (entry.row != null) {
                entry.row.resetUserExpansion();
            }
        }
    }

    @Override
    protected void dismissKeyguardThenExecute(final OnDismissAction action) {
        if (mStatusBarKeyguardViewManager.isShowing()) {