diff options
author | chaviw <chaviw@google.com> | 2019-09-03 12:40:22 -0700 |
---|---|---|
committer | chaviw <chaviw@google.com> | 2019-09-06 16:42:13 -0700 |
commit | b34c911a8bd37e773290261dc7e9969dbe8dabef (patch) | |
tree | a4d323f333634ea7a88e3faecb755a6ed800420b | |
parent | d6536aa908a82d909b99d81012fd3b258faf0d84 (diff) | |
download | native-b34c911a8bd37e773290261dc7e9969dbe8dabef.tar.gz |
Use getLayerStack() instead of layerStack for input info
When there's no displayId, the layerStack should be used. The current
code was using mDrawingState.layerStack which is incorrect because only
the layerStack for the root of the tree is correct. Instead, use
getLayerStack() which traverses the hierarchy to find the root's
layerStack.
Test: Uses correct layerStack instead of 0 for input with unset displayIds
Fixes: 140312942
Change-Id: Ic8a06c562e970b0f328c539edfa51e206734934f
Merged-in: Ic8a06c562e970b0f328c539edfa51e206734934f
-rw-r--r-- | services/surfaceflinger/Layer.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/services/surfaceflinger/Layer.cpp b/services/surfaceflinger/Layer.cpp index d6e86eb0e5..fdf9da342f 100644 --- a/services/surfaceflinger/Layer.cpp +++ b/services/surfaceflinger/Layer.cpp @@ -2048,7 +2048,7 @@ InputWindowInfo Layer::fillInputInfo() { InputWindowInfo info = mDrawingState.inputInfo; if (info.displayId == ADISPLAY_ID_NONE) { - info.displayId = mDrawingState.layerStack; + info.displayId = getLayerStack(); } ui::Transform t = getTransform(); |