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

Commit 3e91bbac authored by Jay Aliomer's avatar Jay Aliomer Committed by Android (Google) Code Review
Browse files

Merge "Remove notification actions when snoozed" into sc-dev

parents e2e22284 9cbaf44b
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;
        }
    }

    /**