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

Commit 2326e5ea authored by Jay Aliomer's avatar Jay Aliomer Committed by Automerger Merge Worker
Browse files

Merge "No ally notification action when snoozed" into sc-dev am: 98efbe8a

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

Change-Id: Ib65317ae78de3a6894209e7fec8cbd3bfb086dc8
parents d47164e0 98efbe8a
Loading
Loading
Loading
Loading
+5 −9
Original line number Diff line number Diff line
@@ -133,7 +133,7 @@ public class ExpandableNotificationRow extends ActivatableNotificationView

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

    /**
     * Listener for when {@link ExpandableNotificationRow} is laid out.
@@ -1105,8 +1105,7 @@ public class ExpandableNotificationRow extends ActivatableNotificationView
                    false /* force */, false /* removeControls */, -1 /* x */, -1 /* y */,
                    false /* resetMenu */);
            mNotificationGutsManager.openGuts(this, 0, 0, item);
            mSnoozedMenuItems = mMenuRow.getMenuItems(mMenuRow.getMenuView().getContext());
            mMenuRow.resetMenu();
            mIsSnoozed = true;
        };
    }

@@ -1821,10 +1820,7 @@ public class ExpandableNotificationRow extends ActivatableNotificationView

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

    /**
@@ -2981,7 +2977,7 @@ public class ExpandableNotificationRow extends ActivatableNotificationView
    public void onInitializeAccessibilityNodeInfoInternal(AccessibilityNodeInfo info) {
        super.onInitializeAccessibilityNodeInfoInternal(info);
        info.addAction(AccessibilityNodeInfo.AccessibilityAction.ACTION_LONG_CLICK);
        if (canViewBeDismissed()) {
        if (canViewBeDismissed() && !mIsSnoozed) {
            info.addAction(AccessibilityNodeInfo.AccessibilityAction.ACTION_DISMISS);
        }
        boolean expandable = shouldShowPublic();
@@ -2997,7 +2993,7 @@ public class ExpandableNotificationRow extends ActivatableNotificationView
                isExpanded = isExpanded();
            }
        }
        if (expandable) {
        if (expandable && !mIsSnoozed) {
            if (isExpanded) {
                info.addAction(AccessibilityNodeInfo.AccessibilityAction.ACTION_COLLAPSE);
            } else {