Merge "Remove notification actions when snoozed" into sc-dev
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user