diff options
| author | chaviw <chaviw@google.com> | 2019-02-14 11:00:23 -0800 |
|---|---|---|
| committer | chaviw <chaviw@google.com> | 2019-02-20 14:09:30 -0800 |
| commit | 319cd078608cd7964fbdcf7c7fb407de8050ce0d (patch) | |
| tree | 68a16487df0c5c1a16579bd26ae6b3ec8ad18946 /core/java | |
| parent | b615f565cbbd599f7b39381b27ad55c61443346c (diff) | |
Add synchronous transaction to wait for setInputWindow to complete (5/n)
Added syncInputWindows method to JNI and SurfaceControl.Transaction
This enables the caller to request SF to wait until input windows have
been synced with InputDispatcher.
Bug: 123041491
Test: builds, runs
Change-Id: I2ddaa3f43eded2fb117cc2850ee7c8a20b2b63ec
Diffstat (limited to 'core/java')
| -rw-r--r-- | core/java/android/view/SurfaceControl.java | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/core/java/android/view/SurfaceControl.java b/core/java/android/view/SurfaceControl.java index 1212df0c397a..5227875f40ce 100644 --- a/core/java/android/view/SurfaceControl.java +++ b/core/java/android/view/SurfaceControl.java @@ -189,6 +189,7 @@ public final class SurfaceControl implements Parcelable { IBinder toToken); private static native boolean nativeGetProtectedContentSupport(); private static native void nativeSetMetadata(long transactionObj, int key, Parcel data); + private static native void nativeSyncInputWindows(long transactionObj); private final CloseGuard mCloseGuard = CloseGuard.get(); private String mName; @@ -2105,6 +2106,17 @@ public final class SurfaceControl implements Parcelable { } /** + * Waits until any changes to input windows have been sent from SurfaceFlinger to + * InputFlinger before returning. + * + * @hide + */ + public Transaction syncInputWindows() { + nativeSyncInputWindows(mNativeObject); + return this; + } + + /** * Specify how the buffer assosciated with this Surface is mapped in to the * parent coordinate space. The source frame will be scaled to fit the destination * frame, after being rotated according to the orientation parameter. |
