Merge "getBlobAshmemSize -> getOpenAshmemSize" am: b146c8bedb am: ab8578378d am: 4ef3dc86b8 am: 7402f8c51b am: b6dd3438c8

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1854070

Change-Id: Ib28bf27175176d0cb1ccc01f955464bc3bdf2882
diff --git a/core/java/android/os/Parcel.java b/core/java/android/os/Parcel.java
index 6be86da..ab2c8c0 100644
--- a/core/java/android/os/Parcel.java
+++ b/core/java/android/os/Parcel.java
@@ -401,7 +401,7 @@
     private static final int WRITE_EXCEPTION_STACK_TRACE_THRESHOLD_MS = 1000;
 
     @CriticalNative
-    private static native long nativeGetBlobAshmemSize(long nativePtr);
+    private static native long nativeGetOpenAshmemSize(long nativePtr);
 
     public final static Parcelable.Creator<String> STRING_CREATOR
              = new Parcelable.Creator<String>() {
@@ -4381,8 +4381,8 @@
     /**
      * @hide For testing
      */
-    public long getBlobAshmemSize() {
-        return nativeGetBlobAshmemSize(mNativePtr);
+    public long getOpenAshmemSize() {
+        return nativeGetOpenAshmemSize(mNativePtr);
     }
 
     private static String valueTypeToString(int type) {
diff --git a/core/jni/android_os_Parcel.cpp b/core/jni/android_os_Parcel.cpp
index 8fee610..0d33807 100644
--- a/core/jni/android_os_Parcel.cpp
+++ b/core/jni/android_os_Parcel.cpp
@@ -740,11 +740,11 @@
     return Parcel::getGlobalAllocCount();
 }
 
-static jlong android_os_Parcel_getBlobAshmemSize(jlong nativePtr)
+static jlong android_os_Parcel_getOpenAshmemSize(jlong nativePtr)
 {
     Parcel* parcel = reinterpret_cast<Parcel*>(nativePtr);
     if (parcel != NULL) {
-        return parcel->getBlobAshmemSize();
+        return parcel->getOpenAshmemSize();
     }
     return 0;
 }
@@ -852,7 +852,7 @@
     {"getGlobalAllocCount",       "()J", (void*)android_os_Parcel_getGlobalAllocCount},
 
     // @CriticalNative
-    {"nativeGetBlobAshmemSize",       "(J)J", (void*)android_os_Parcel_getBlobAshmemSize},
+    {"nativeGetOpenAshmemSize",       "(J)J", (void*)android_os_Parcel_getOpenAshmemSize},
 
     // @CriticalNative
     {"nativeReadCallingWorkSourceUid", "(J)I", (void*)android_os_Parcel_readCallingWorkSourceUid},
diff --git a/tests/notification/src/com/android/frameworks/tests/notification/NotificationTests.java b/tests/notification/src/com/android/frameworks/tests/notification/NotificationTests.java
index 7cda977..5d639f6 100644
--- a/tests/notification/src/com/android/frameworks/tests/notification/NotificationTests.java
+++ b/tests/notification/src/com/android/frameworks/tests/notification/NotificationTests.java
@@ -409,10 +409,10 @@
         sleepIfYouCan(500);
 
         L("Parceling notifications...");
-        // we want to be able to use this test on older OSes that do not have getBlobAshmemSize
-        Method getBlobAshmemSize = null;
+        // we want to be able to use this test on older OSes that do not have getOpenAshmemSize
+        Method getOpenAshmemSize = null;
         try {
-            getBlobAshmemSize = Parcel.class.getMethod("getBlobAshmemSize");
+            getOpenAshmemSize = Parcel.class.getMethod("getOpenAshmemSize");
         } catch (NoSuchMethodException ex) {
         }
         for (int i=0; i<mNotifications.size(); i++) {
@@ -424,8 +424,8 @@
                 time = SystemClock.currentThreadTimeMillis() - time;
                 L("  %s: write parcel=%dms size=%d ashmem=%s",
                         summarize(n), time, p.dataPosition(),
-                        (getBlobAshmemSize != null)
-                            ? getBlobAshmemSize.invoke(p)
+                        (getOpenAshmemSize != null)
+                            ? getOpenAshmemSize.invoke(p)
                             : "???");
                 p.setDataPosition(0);
             }