Loading core/java/android/view/SurfaceControl.java +15 −2 Original line number Diff line number Diff line Loading @@ -42,6 +42,7 @@ import android.graphics.PixelFormat; import android.graphics.Point; import android.graphics.Rect; import android.graphics.Region; import android.gui.DropInputMode; import android.hardware.HardwareBuffer; import android.hardware.display.DeviceProductInfo; import android.hardware.display.DisplayedContentSample; Loading Loading @@ -151,7 +152,8 @@ public final class SurfaceControl implements Parcelable { float childRelativeTop, float childRelativeRight, float childRelativeBottom); private static native void nativeSetTrustedOverlay(long transactionObj, long nativeObject, boolean isTrustedOverlay); private static native void nativeSetDropInputMode( long transactionObj, long nativeObject, int flags); private static native boolean nativeClearContentFrameStats(long nativeObject); private static native boolean nativeGetContentFrameStats(long nativeObject, WindowContentFrameStats outStats); private static native boolean nativeClearAnimationFrameStats(); Loading Loading @@ -3444,6 +3446,17 @@ public final class SurfaceControl implements Parcelable { return this; } /** * Sets the input event drop mode on this SurfaceControl and its children. The caller must * hold the ACCESS_SURFACE_FLINGER permission. See {@code InputEventDropMode}. * @hide */ public Transaction setDropInputMode(SurfaceControl sc, @DropInputMode int mode) { checkPreconditions(sc); nativeSetDropInputMode(mNativeObject, sc.mNativeObject, mode); return this; } /** * Merge the other transaction into this transaction, clearing the * other transaction as if it had been applied. Loading core/jni/android_view_SurfaceControl.cpp +9 −0 Original line number Diff line number Diff line Loading @@ -870,6 +870,13 @@ static void nativeSetFixedTransformHint(JNIEnv* env, jclass clazz, jlong transac transaction->setFixedTransformHint(ctrl, transformHint); } static void nativeSetDropInputMode(JNIEnv* env, jclass clazz, jlong transactionObj, jlong nativeObject, jint mode) { auto transaction = reinterpret_cast<SurfaceComposerClient::Transaction*>(transactionObj); SurfaceControl* const ctrl = reinterpret_cast<SurfaceControl*>(nativeObject); transaction->setDropInputMode(ctrl, static_cast<gui::DropInputMode>(mode)); } static jlongArray nativeGetPhysicalDisplayIds(JNIEnv* env, jclass clazz) { const auto displayIds = SurfaceComposerClient::getPhysicalDisplayIds(); jlongArray array = env->NewLongArray(displayIds.size()); Loading Loading @@ -2018,6 +2025,8 @@ static const JNINativeMethod sSurfaceControlMethods[] = { (void*)nativeSetTrustedOverlay }, {"nativeGetLayerId", "(J)I", (void*)nativeGetLayerId }, {"nativeSetDropInputMode", "(JJI)V", (void*)nativeSetDropInputMode }, // clang-format on }; Loading services/core/Android.bp +0 −1 Original line number Diff line number Diff line Loading @@ -108,7 +108,6 @@ java_library_static { ":display-device-config", ":display-layout-config", ":device-state-config", ":guiconstants_aidl", "java/com/android/server/EventLogTags.logtags", "java/com/android/server/am/EventLogTags.logtags", "java/com/android/server/wm/EventLogTags.logtags", Loading Loading
core/java/android/view/SurfaceControl.java +15 −2 Original line number Diff line number Diff line Loading @@ -42,6 +42,7 @@ import android.graphics.PixelFormat; import android.graphics.Point; import android.graphics.Rect; import android.graphics.Region; import android.gui.DropInputMode; import android.hardware.HardwareBuffer; import android.hardware.display.DeviceProductInfo; import android.hardware.display.DisplayedContentSample; Loading Loading @@ -151,7 +152,8 @@ public final class SurfaceControl implements Parcelable { float childRelativeTop, float childRelativeRight, float childRelativeBottom); private static native void nativeSetTrustedOverlay(long transactionObj, long nativeObject, boolean isTrustedOverlay); private static native void nativeSetDropInputMode( long transactionObj, long nativeObject, int flags); private static native boolean nativeClearContentFrameStats(long nativeObject); private static native boolean nativeGetContentFrameStats(long nativeObject, WindowContentFrameStats outStats); private static native boolean nativeClearAnimationFrameStats(); Loading Loading @@ -3444,6 +3446,17 @@ public final class SurfaceControl implements Parcelable { return this; } /** * Sets the input event drop mode on this SurfaceControl and its children. The caller must * hold the ACCESS_SURFACE_FLINGER permission. See {@code InputEventDropMode}. * @hide */ public Transaction setDropInputMode(SurfaceControl sc, @DropInputMode int mode) { checkPreconditions(sc); nativeSetDropInputMode(mNativeObject, sc.mNativeObject, mode); return this; } /** * Merge the other transaction into this transaction, clearing the * other transaction as if it had been applied. Loading
core/jni/android_view_SurfaceControl.cpp +9 −0 Original line number Diff line number Diff line Loading @@ -870,6 +870,13 @@ static void nativeSetFixedTransformHint(JNIEnv* env, jclass clazz, jlong transac transaction->setFixedTransformHint(ctrl, transformHint); } static void nativeSetDropInputMode(JNIEnv* env, jclass clazz, jlong transactionObj, jlong nativeObject, jint mode) { auto transaction = reinterpret_cast<SurfaceComposerClient::Transaction*>(transactionObj); SurfaceControl* const ctrl = reinterpret_cast<SurfaceControl*>(nativeObject); transaction->setDropInputMode(ctrl, static_cast<gui::DropInputMode>(mode)); } static jlongArray nativeGetPhysicalDisplayIds(JNIEnv* env, jclass clazz) { const auto displayIds = SurfaceComposerClient::getPhysicalDisplayIds(); jlongArray array = env->NewLongArray(displayIds.size()); Loading Loading @@ -2018,6 +2025,8 @@ static const JNINativeMethod sSurfaceControlMethods[] = { (void*)nativeSetTrustedOverlay }, {"nativeGetLayerId", "(J)I", (void*)nativeGetLayerId }, {"nativeSetDropInputMode", "(JJI)V", (void*)nativeSetDropInputMode }, // clang-format on }; Loading
services/core/Android.bp +0 −1 Original line number Diff line number Diff line Loading @@ -108,7 +108,6 @@ java_library_static { ":display-device-config", ":display-layout-config", ":device-state-config", ":guiconstants_aidl", "java/com/android/server/EventLogTags.logtags", "java/com/android/server/am/EventLogTags.logtags", "java/com/android/server/wm/EventLogTags.logtags", Loading