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

Commit a726442a 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

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

Change-Id: Id5ea34bac760bfafd29e630b81678162e9aa02fd
parents 8e3d8328 3e91bbac
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;
        }
    }

    /**