OSDN Git Service

Fix View#performHapticFeedback() can block UI thread
authorArthur Hung <arthurhung@google.com>
Tue, 19 Feb 2019 03:31:44 +0000 (11:31 +0800)
committerArthur Hung <arthurhung@google.com>
Fri, 22 Feb 2019 04:43:55 +0000 (12:43 +0800)
commita4c520694fee942a6a166bbb6687dcd0ea0e3509
treea7b0f0a0b91fb99cb596510a558558c16cf5b806
parentddc0fa515588f6545f7ffbc4e9d03b55565020f8
Fix View#performHapticFeedback() can block UI thread

Currently, IWindowSession#performHapticFeedback() would first lookup
the WindowState via IWindow token. That would also hold the WMS lock,
so if some function like relayout window is still hold WMS lock,
it may block the function.

Use uid and package name from Session that they already restored.

Bug: 62330939
Test: Open app with autofill edit, type with IME.
Change-Id: I359c106d213b87aa8afee48b0f1ad70011970eab
config/boot-image-profile.txt
config/hiddenapi-greylist.txt
core/java/android/view/IWindowSession.aidl
core/java/android/view/ViewRootImpl.java
services/art-profile
services/core/java/com/android/server/policy/PhoneWindowManager.java
services/core/java/com/android/server/policy/WindowManagerPolicy.java
services/core/java/com/android/server/wm/Session.java
services/tests/wmtests/src/com/android/server/wm/TestWindowManagerPolicy.java