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

Commit 476d1dc6 authored by Adrian Roos's avatar Adrian Roos Committed by android-build-merger
Browse files

Merge "Keeping notifications around that show guts" into oc-dr1-dev

am: ea2cbdec

Change-Id: Ib74148ab149d4158b985c7813542b63e8e6c61f4
parents dd141955 ea2cbdec
Loading
Loading
Loading
Loading
+21 −3
Original line number Original line Diff line number Diff line
@@ -736,6 +736,7 @@ public class StatusBar extends SystemUI implements DemoMode,
    private HashMap<String, Entry> mPendingNotifications = new HashMap<>();
    private HashMap<String, Entry> mPendingNotifications = new HashMap<>();
    private boolean mClearAllEnabled;
    private boolean mClearAllEnabled;
    @Nullable private View mAmbientIndicationContainer;
    @Nullable private View mAmbientIndicationContainer;
    private String mKeyToRemoveOnGutsClosed;
    private SysuiColorExtractor mColorExtractor;
    private SysuiColorExtractor mColorExtractor;
    private ForegroundServiceController mForegroundServiceController;
    private ForegroundServiceController mForegroundServiceController;


@@ -1789,6 +1790,13 @@ public class StatusBar extends SystemUI implements DemoMode,
            mRemoteInputEntriesToRemoveOnCollapse.add(entry);
            mRemoteInputEntriesToRemoveOnCollapse.add(entry);
            return;
            return;
        }
        }
        if (entry != null && mNotificationGutsExposed != null
                && mNotificationGutsExposed == entry.row.getGuts()) {
            Log.w(TAG, "Keeping notification because it's showing guts. " + key);
            mLatestRankingMap = ranking;
            mKeyToRemoveOnGutsClosed = key;
            return;
        }


        if (entry != null) {
        if (entry != null) {
            mForegroundServiceController.removeNotification(entry.notification);
            mForegroundServiceController.removeNotification(entry.notification);
@@ -3465,6 +3473,8 @@ public class StatusBar extends SystemUI implements DemoMode,
        pw.println(Settings.Global.zenModeToString(mZenMode));
        pw.println(Settings.Global.zenModeToString(mZenMode));
        pw.print("  mUseHeadsUp=");
        pw.print("  mUseHeadsUp=");
        pw.println(mUseHeadsUp);
        pw.println(mUseHeadsUp);
        pw.print("  mKeyToRemoveOnGutsClosed=");
        pw.println(mKeyToRemoveOnGutsClosed);
        if (mStatusBarView != null) {
        if (mStatusBarView != null) {
            dumpBarTransitions(pw, "mStatusBarView", mStatusBarView.getBarTransitions());
            dumpBarTransitions(pw, "mStatusBarView", mStatusBarView.getBarTransitions());
        }
        }
@@ -6130,6 +6140,11 @@ public class StatusBar extends SystemUI implements DemoMode,
                mNotificationGutsExposed = null;
                mNotificationGutsExposed = null;
                mGutsMenuItem = null;
                mGutsMenuItem = null;
            }
            }
            String key = sbn.getKey();
            if (key.equals(mKeyToRemoveOnGutsClosed)) {
                mKeyToRemoveOnGutsClosed = null;
                removeNotification(key, mLatestRankingMap);
            }
        });
        });


        View gutsView = item.getGutsView();
        View gutsView = item.getGutsView();
@@ -7088,9 +7103,12 @@ public class StatusBar extends SystemUI implements DemoMode,
        Entry entry = mNotificationData.get(key);
        Entry entry = mNotificationData.get(key);
        if (entry == null) {
        if (entry == null) {
            return;
            return;
        } else {
        }
        mHeadsUpEntriesToRemoveOnSwitch.remove(entry);
        mHeadsUpEntriesToRemoveOnSwitch.remove(entry);
        mRemoteInputEntriesToRemoveOnCollapse.remove(entry);
        mRemoteInputEntriesToRemoveOnCollapse.remove(entry);
        if (key.equals(mKeyToRemoveOnGutsClosed)) {
            mKeyToRemoveOnGutsClosed = null;
            Log.w(TAG, "Notification that was kept for guts was updated. " + key);
        }
        }


        Notification n = notification.getNotification();
        Notification n = notification.getNotification();