From 0874a6fb498b44efaa388f176c1769eb5024da9b Mon Sep 17 00:00:00 2001 From: Nicolas Geoffray Date: Tue, 8 Dec 2020 08:59:40 +0000 Subject: [PATCH] Remove FastNative annotations on synchronized methods. FastNative doesn't work on synchronized methods. Bug: 175016705 Test: 004-JniTest Change-Id: I1e34c78a8438c67e5a1bedb83eb977389ee9a82d Merged-In: I1e34c78a8438c67e5a1bedb83eb977389ee9a82d (cherry picked from commit 7c4c101a7b4b8b6d155853b2cbfc6be6acf27096) --- .../hardware/camera2/impl/CameraMetadataNative.java | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/core/java/android/hardware/camera2/impl/CameraMetadataNative.java b/core/java/android/hardware/camera2/impl/CameraMetadataNative.java index 920d34f09819d..a00ff8e8d39e0 100644 --- a/core/java/android/hardware/camera2/impl/CameraMetadataNative.java +++ b/core/java/android/hardware/camera2/impl/CameraMetadataNative.java @@ -1693,35 +1693,24 @@ public class CameraMetadataNative implements Parcelable { private static native long nativeAllocateCopy(long ptr) throws NullPointerException; - @FastNative private static synchronized native void nativeWriteToParcel(Parcel dest, long ptr); - @FastNative private static synchronized native void nativeReadFromParcel(Parcel source, long ptr); - @FastNative private static synchronized native void nativeSwap(long ptr, long otherPtr) throws NullPointerException; - @FastNative private static synchronized native void nativeClose(long ptr); - @FastNative private static synchronized native boolean nativeIsEmpty(long ptr); - @FastNative private static synchronized native int nativeGetEntryCount(long ptr); @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) - @FastNative private static synchronized native byte[] nativeReadValues(int tag, long ptr); - @FastNative private static synchronized native void nativeWriteValues(int tag, byte[] src, long ptr); private static synchronized native void nativeDump(long ptr) throws IOException; // dump to LOGD - @FastNative private static synchronized native ArrayList nativeGetAllVendorKeys(long ptr, Class keyClass); @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) - @FastNative private static synchronized native int nativeGetTagFromKeyLocal(long ptr, String keyName) throws IllegalArgumentException; @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) - @FastNative private static synchronized native int nativeGetTypeFromTagLocal(long ptr, int tag) throws IllegalArgumentException; @FastNative