diff options
| author | Tiger Huang <tigerhuang@google.com> | 2018-11-26 23:01:07 +0800 |
|---|---|---|
| committer | Tiger Huang <tigerhuang@google.com> | 2018-11-26 23:19:30 +0800 |
| commit | b9be295a359de62483854523a0ed292eb92d635f (patch) | |
| tree | 052fee9954131d226ce3be84f404036cdb3a1717 /core/java | |
| parent | 1215943a5590267077650a818545a2230478601a (diff) | |
Prevent the focus state from getting cleared
Before this CL, if the ViewRootImpl receives an input event after
adding the window to display before performing its first traversal,
mAttachInfo.mHasWindowFocus would be set to true in
handleWindowFocusChanged called by deliverInputEvent. And then, when
ViewRootImpl is performing its first traversal,
mAttachInfo.mHasWindowFocus would be cleared, which would make the
ViewRootImpl drop all the key events.
This CL removes the redundant logic about clearing
mAttachInfo.mHasWindowFocus during the first traversal.
Bug: 119700105
Test: atest WindowFocusTests
Change-Id: Ic35752f8e0d7cd7899f238e184bfbca3c8f7ad08
Diffstat (limited to 'core/java')
| -rw-r--r-- | core/java/android/view/ViewRootImpl.java | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/core/java/android/view/ViewRootImpl.java b/core/java/android/view/ViewRootImpl.java index 484c6f38e962..4b4e03ae10a3 100644 --- a/core/java/android/view/ViewRootImpl.java +++ b/core/java/android/view/ViewRootImpl.java @@ -1916,7 +1916,6 @@ public final class ViewRootImpl implements ViewParent, // PixelFormat.hasAlpha(lp.format) || lp.format == PixelFormat.RGBX_8888 // However, windows are now always 32 bits by default, so choose 32 bits mAttachInfo.mUse32BitDrawingCache = true; - mAttachInfo.mHasWindowFocus = false; mAttachInfo.mWindowVisibility = viewVisibility; mAttachInfo.mRecomputeGlobalAttributes = false; mLastConfigurationFromResources.setTo(config); |
