Loading core/java/android/view/SurfaceControl.java +12 −0 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -2108,6 +2109,17 @@ public final class SurfaceControl implements Parcelable { return this; } /** * 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 Loading core/jni/android_view_SurfaceControl.cpp +8 −1 Original line number Diff line number Diff line Loading @@ -406,6 +406,11 @@ static void nativeTransferTouchFocus(JNIEnv* env, jclass clazz, jlong transactio transaction->transferTouchFocus(fromToken, toToken); } static void nativeSyncInputWindows(JNIEnv* env, jclass clazz, jlong transactionObj) { auto transaction = reinterpret_cast<SurfaceComposerClient::Transaction*>(transactionObj); transaction->syncInputWindows(); } static void nativeSetMetadata(JNIEnv* env, jclass clazz, jlong transactionObj, jlong nativeObject, jint id, jobject parcelObj) { Parcel* parcel = parcelForJavaObject(env, parcelObj); Loading Loading @@ -1246,7 +1251,9 @@ static const JNINativeMethod sSurfaceControlMethods[] = { "(Landroid/os/IBinder;JJ)Landroid/hardware/display/DisplayedContentSample;", (void*)nativeGetDisplayedContentSample }, {"nativeSetGeometry", "(JJLandroid/graphics/Rect;Landroid/graphics/Rect;J)V", (void*)nativeSetGeometry } (void*)nativeSetGeometry }, {"nativeSyncInputWindows", "(J)V", (void*)nativeSyncInputWindows } }; int register_android_view_SurfaceControl(JNIEnv* env) Loading Loading
core/java/android/view/SurfaceControl.java +12 −0 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -2108,6 +2109,17 @@ public final class SurfaceControl implements Parcelable { return this; } /** * 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 Loading
core/jni/android_view_SurfaceControl.cpp +8 −1 Original line number Diff line number Diff line Loading @@ -406,6 +406,11 @@ static void nativeTransferTouchFocus(JNIEnv* env, jclass clazz, jlong transactio transaction->transferTouchFocus(fromToken, toToken); } static void nativeSyncInputWindows(JNIEnv* env, jclass clazz, jlong transactionObj) { auto transaction = reinterpret_cast<SurfaceComposerClient::Transaction*>(transactionObj); transaction->syncInputWindows(); } static void nativeSetMetadata(JNIEnv* env, jclass clazz, jlong transactionObj, jlong nativeObject, jint id, jobject parcelObj) { Parcel* parcel = parcelForJavaObject(env, parcelObj); Loading Loading @@ -1246,7 +1251,9 @@ static const JNINativeMethod sSurfaceControlMethods[] = { "(Landroid/os/IBinder;JJ)Landroid/hardware/display/DisplayedContentSample;", (void*)nativeGetDisplayedContentSample }, {"nativeSetGeometry", "(JJLandroid/graphics/Rect;Landroid/graphics/Rect;J)V", (void*)nativeSetGeometry } (void*)nativeSetGeometry }, {"nativeSyncInputWindows", "(J)V", (void*)nativeSyncInputWindows } }; int register_android_view_SurfaceControl(JNIEnv* env) Loading