diff options
| author | 2016-01-22 07:11:49 -0800 | |
|---|---|---|
| committer | 2016-01-27 14:19:44 -0800 | |
| commit | 7528f57c4ddbde1c6d0a2a352bd8a1af43711013 (patch) | |
| tree | 7c675e70a719a985b1a122b489029634c6ebef7f | |
| parent | 907108ca0f4e69dd170a507c5830591712ec5967 (diff) | |
[DO NOT MERGE ANYWHERE]: Allow button events in ambient.
See thread: "key presses & Ambient"
BUG: 25964771
BUG: 26524301
Change-Id: I914edd447c38678a06d27677be4597c0ee384635
| -rw-r--r-- | core/java/android/view/ViewRootImpl.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/core/java/android/view/ViewRootImpl.java b/core/java/android/view/ViewRootImpl.java index 9569422f880c..8adbace3bd69 100644 --- a/core/java/android/view/ViewRootImpl.java +++ b/core/java/android/view/ViewRootImpl.java @@ -3712,7 +3712,8 @@ public final class ViewRootImpl implements ViewParent, return true; } else if ((!mAttachInfo.mHasWindowFocus && !q.mEvent.isFromSource(InputDevice.SOURCE_CLASS_POINTER)) || mStopped - || mIsAmbientMode || (mPausedForTransition && !isBack(q.mEvent))) { + || (mIsAmbientMode && !q.mEvent.isFromSource(InputDevice.SOURCE_CLASS_BUTTON)) + || (mPausedForTransition && !isBack(q.mEvent))) { // This is a focus event and the window doesn't currently have input focus or // has stopped. This could be an event that came back from the previous stage // but the window has lost focus or stopped in the meantime. |