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

Commit 4b700924 authored by Ibrahim Yilmaz's avatar Ibrahim Yilmaz Committed by Android (Google) Code Review
Browse files

Merge "[SwipeHelper] remove not swiped out notification from swiped out list" into main

parents 403fec9e 47128c21
Loading
Loading
Loading
Loading
+12 −0
Original line number Original line Diff line number Diff line
@@ -6084,6 +6084,18 @@ public class NotificationStackScrollLayout
        }
        }
    }
    }


    void removeSwipedOutView(View v) {
        logRemoveSwipedOutView(v);
        mSwipedOutViews.remove(v);
    }

    private void logRemoveSwipedOutView(View v) {
        if (mLogger != null && v instanceof ExpandableNotificationRow row) {
            mLogger.logRemoveSwipedOutView(row.getLoggingKey(), mClearAllInProgress);
        }
    }


    void onSwipeBegin(View viewSwiped) {
    void onSwipeBegin(View viewSwiped) {
        if (!(viewSwiped instanceof ExpandableNotificationRow)) {
        if (!(viewSwiped instanceof ExpandableNotificationRow)) {
            return;
            return;
+3 −0
Original line number Original line Diff line number Diff line
@@ -710,6 +710,9 @@ public class NotificationStackScrollLayoutController implements Dumpable {
                public void onChildNotDismissed(View v, boolean animationCancelled,
                public void onChildNotDismissed(View v, boolean animationCancelled,
                        boolean viewWasRemoved) {
                        boolean viewWasRemoved) {
                    logOnChildNotDismissed(v, animationCancelled, viewWasRemoved);
                    logOnChildNotDismissed(v, animationCancelled, viewWasRemoved);
                    if (!viewWasRemoved) {
                        mView.removeSwipedOutView(v);
                    }
                }
                }


                private void logOnChildNotDismissed(View v, boolean animationCancelled,
                private void logOnChildNotDismissed(View v, boolean animationCancelled,
+12 −0
Original line number Original line Diff line number Diff line
@@ -246,6 +246,18 @@ constructor(
        )
        )
    }
    }


    fun logRemoveSwipedOutView(loggingKey: String, clearAllInProgress: Boolean) {
        notificationRenderBuffer.log(
            TAG,
            INFO,
            {
                str1 = loggingKey
                bool1 = clearAllInProgress
            },
            { "removeSwipedOutView from NSSL: childKey = $str1 -- clearAllInProgress:$bool1" },
        )
    }

    fun logOnChildDismissed(loggingKey: String, clearAllInProgress: Boolean) {
    fun logOnChildDismissed(loggingKey: String, clearAllInProgress: Boolean) {
        notificationRenderBuffer.log(
        notificationRenderBuffer.log(
            TAG,
            TAG,