diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/ActivatableNotificationView.java b/packages/SystemUI/src/com/android/systemui/statusbar/ActivatableNotificationView.java index cc3c7db62d9ec..b5358bfb6f6e1 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/ActivatableNotificationView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/ActivatableNotificationView.java @@ -251,7 +251,7 @@ public abstract class ActivatableNotificationView extends ExpandableOutlineView @Override public boolean onTouchEvent(MotionEvent event) { boolean result; - if (mDimmed && !isTouchExplorationEnabled()) { + if (mDimmed && !isTouchExplorationEnabled() && isInteractive()) { boolean wasActivated = mActivated; result = handleTouchEventDimmed(event); if (wasActivated && result && event.getAction() == MotionEvent.ACTION_UP) { @@ -263,6 +263,13 @@ public abstract class ActivatableNotificationView extends ExpandableOutlineView return result; } + /** + * @return whether this view is interactive and can be double tapped + */ + protected boolean isInteractive() { + return true; + } + @Override public void drawableHotspotChanged(float x, float y) { if (!mDimmed){ diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationShelf.java b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationShelf.java index bc1b9fb89270c..64c49496ee9ce 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationShelf.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationShelf.java @@ -67,6 +67,7 @@ public class NotificationShelf extends ActivatableNotificationView { private int mStatusBarState; private float mMaxShelfEnd; private int mRelativeOffset; + private boolean mInteractive; public NotificationShelf(Context context, AttributeSet attrs) { super(context, attrs); @@ -555,13 +556,18 @@ public class NotificationShelf extends ActivatableNotificationView { } private void updateInteractiveness() { - boolean interactive = mStatusBarState == StatusBarState.KEYGUARD && mHasItemsInStableShelf; - setClickable(interactive); - setFocusable(interactive); - setImportantForAccessibility(interactive ? View.IMPORTANT_FOR_ACCESSIBILITY_YES + mInteractive = mStatusBarState == StatusBarState.KEYGUARD && mHasItemsInStableShelf; + setClickable(mInteractive); + setFocusable(mInteractive); + setImportantForAccessibility(mInteractive ? View.IMPORTANT_FOR_ACCESSIBILITY_YES : View.IMPORTANT_FOR_ACCESSIBILITY_NO); } + @Override + protected boolean isInteractive() { + return mInteractive; + } + public void setMaxShelfEnd(float maxShelfEnd) { mMaxShelfEnd = maxShelfEnd; }