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

Commit bf393790 authored by Jordan Demeulenaere's avatar Jordan Demeulenaere Committed by Automerger Merge Worker
Browse files

Merge "Do not collapse the shade when clicking the last notification." into sc-dev am: 56b48b17

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13948526

Change-Id: Ife248f74c39bbae14df170419d3035a5bcea3e6d
parents 97f611b4 56b48b17
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -24,6 +24,7 @@ import android.app.KeyguardManager;
import android.content.Context;
import android.os.RemoteException;
import android.os.ServiceManager;
import android.service.notification.NotificationListenerService;
import android.service.notification.StatusBarNotification;
import android.service.vr.IVrManager;
import android.service.vr.IVrStateCallbacks;
@@ -187,7 +188,7 @@ public class StatusBarNotificationPresenter implements NotificationPresenter,
                        boolean removedByUser,
                        int reason) {
                    StatusBarNotificationPresenter.this.onNotificationRemoved(
                            entry.getKey(), entry.getSbn());
                            entry.getKey(), entry.getSbn(), reason);
                    if (removedByUser) {
                        maybeEndAmbientPulse();
                    }
@@ -301,13 +302,14 @@ public class StatusBarNotificationPresenter implements NotificationPresenter,
        mNotificationPanel.updateNotificationViews(reason);
    }

    public void onNotificationRemoved(String key, StatusBarNotification old) {
    private void onNotificationRemoved(String key, StatusBarNotification old, int reason) {
        if (SPEW) Log.d(TAG, "removeNotification key=" + key + " old=" + old);

        if (old != null) {
            if (CLOSE_PANEL_WHEN_EMPTIED && !hasActiveNotifications()
                    && !mNotificationPanel.isTracking() && !mNotificationPanel.isQsExpanded()) {
                if (mStatusBarStateController.getState() == StatusBarState.SHADE) {
                if (mStatusBarStateController.getState() == StatusBarState.SHADE
                        && reason != NotificationListenerService.REASON_CLICK) {
                    mCommandQueue.animateCollapsePanels();
                } else if (mStatusBarStateController.getState() == StatusBarState.SHADE_LOCKED
                        && !isCollapsing()) {