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

Commit 37aabda1 authored by Jay Aliomer's avatar Jay Aliomer Committed by Automerger Merge Worker
Browse files

Merge "Remove notification actions when snoozed" into sc-dev am: 3e91bbac...

Merge "Remove notification actions when snoozed" into sc-dev am: 3e91bbac am: e2577aa9 am: ba5cf336

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

Change-Id: Icfd938a0b9e68a34c0acde934a237e3455776d03
parents 27f2a016 ba5cf336
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -134,6 +134,7 @@ public class ExpandableNotificationRow extends ActivatableNotificationView

    private boolean mUpdateBackgroundOnUpdate;
    private boolean mNotificationTranslationFinished = false;
    private ArrayList<MenuItem> mSnoozedMenuItems;

    /**
     * Listener for when {@link ExpandableNotificationRow} is laid out.
@@ -1103,6 +1104,8 @@ public class ExpandableNotificationRow extends ActivatableNotificationView
    public View.OnClickListener getSnoozeClickListener(MenuItem item) {
        return v -> {
            mNotificationGutsManager.openGuts(this, 0, 0, item);
            mSnoozedMenuItems = mMenuRow.getMenuItems(mMenuRow.getMenuView().getContext());
            mMenuRow.resetMenu();
        };
    }

@@ -1821,6 +1824,10 @@ public class ExpandableNotificationRow extends ActivatableNotificationView

    void onGutsClosed() {
        updateContentAccessibilityImportanceForGuts(true /* isEnabled */);
        if (mSnoozedMenuItems != null && mSnoozedMenuItems.size() > 0) {
            mMenuRow.setMenuItems(mSnoozedMenuItems);
            mSnoozedMenuItems = null;
        }
    }

    /**