summaryrefslogtreecommitdiff
path: root/core/java/android
diff options
context:
space:
mode:
authorTreeHugger Robot <treehugger-gerrit@google.com>2019-04-05 18:33:24 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2019-04-05 18:33:24 +0000
commit96aaa9f2371ba8b491e4c4fc05fe3094bedc4e9b (patch)
tree623c03369eec942c68d56adc6674025d8f288df2 /core/java/android
parent2a621c079c96cb6de775b11be406bf1165df3e91 (diff)
parentb51e246143c1d4deb4a3ae3ebc5fd7b3cd4fcb7c (diff)
Merge "Fix metadata surfacecontrol api/jni" into qt-dev
Diffstat (limited to 'core/java/android')
-rw-r--r--core/java/android/view/SurfaceControl.java11
1 files changed, 6 insertions, 5 deletions
diff --git a/core/java/android/view/SurfaceControl.java b/core/java/android/view/SurfaceControl.java
index e3b0b7a58438..ad2f65a75528 100644
--- a/core/java/android/view/SurfaceControl.java
+++ b/core/java/android/view/SurfaceControl.java
@@ -195,7 +195,8 @@ public final class SurfaceControl implements Parcelable {
private static native void nativeTransferTouchFocus(long transactionObj, IBinder fromToken,
IBinder toToken);
private static native boolean nativeGetProtectedContentSupport();
- private static native void nativeSetMetadata(long transactionObj, int key, Parcel data);
+ private static native void nativeSetMetadata(long transactionObj, long nativeObject, int key,
+ Parcel data);
private static native void nativeSyncInputWindows(long transactionObj);
private static native boolean nativeGetDisplayBrightnessSupport(IBinder displayToken);
private static native boolean nativeSetDisplayBrightness(IBinder displayToken,
@@ -2612,11 +2613,11 @@ public final class SurfaceControl implements Parcelable {
* Sets an arbitrary piece of metadata on the surface. This is a helper for int data.
* @hide
*/
- public Transaction setMetadata(int key, int data) {
+ public Transaction setMetadata(SurfaceControl sc, int key, int data) {
Parcel parcel = Parcel.obtain();
parcel.writeInt(data);
try {
- setMetadata(key, parcel);
+ setMetadata(sc, key, parcel);
} finally {
parcel.recycle();
}
@@ -2627,8 +2628,8 @@ public final class SurfaceControl implements Parcelable {
* Sets an arbitrary piece of metadata on the surface.
* @hide
*/
- public Transaction setMetadata(int key, Parcel data) {
- nativeSetMetadata(mNativeObject, key, data);
+ public Transaction setMetadata(SurfaceControl sc, int key, Parcel data) {
+ nativeSetMetadata(mNativeObject, sc.mNativeObject, key, data);
return this;
}