Loading core/java/android/os/Parcel.java +3 −3 Original line number Original line Diff line number Diff line Loading @@ -401,7 +401,7 @@ public final class Parcel { private static final int WRITE_EXCEPTION_STACK_TRACE_THRESHOLD_MS = 1000; private static final int WRITE_EXCEPTION_STACK_TRACE_THRESHOLD_MS = 1000; @CriticalNative @CriticalNative private static native long nativeGetBlobAshmemSize(long nativePtr); private static native long nativeGetOpenAshmemSize(long nativePtr); public final static Parcelable.Creator<String> STRING_CREATOR public final static Parcelable.Creator<String> STRING_CREATOR = new Parcelable.Creator<String>() { = new Parcelable.Creator<String>() { Loading Loading @@ -4381,8 +4381,8 @@ public final class Parcel { /** /** * @hide For testing * @hide For testing */ */ public long getBlobAshmemSize() { public long getOpenAshmemSize() { return nativeGetBlobAshmemSize(mNativePtr); return nativeGetOpenAshmemSize(mNativePtr); } } private static String valueTypeToString(int type) { private static String valueTypeToString(int type) { Loading core/jni/android_os_Parcel.cpp +3 −3 Original line number Original line Diff line number Diff line Loading @@ -740,11 +740,11 @@ static jlong android_os_Parcel_getGlobalAllocCount(JNIEnv* env, jclass clazz) return Parcel::getGlobalAllocCount(); 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); Parcel* parcel = reinterpret_cast<Parcel*>(nativePtr); if (parcel != NULL) { if (parcel != NULL) { return parcel->getBlobAshmemSize(); return parcel->getOpenAshmemSize(); } } return 0; return 0; } } Loading Loading @@ -852,7 +852,7 @@ static const JNINativeMethod gParcelMethods[] = { {"getGlobalAllocCount", "()J", (void*)android_os_Parcel_getGlobalAllocCount}, {"getGlobalAllocCount", "()J", (void*)android_os_Parcel_getGlobalAllocCount}, // @CriticalNative // @CriticalNative {"nativeGetBlobAshmemSize", "(J)J", (void*)android_os_Parcel_getBlobAshmemSize}, {"nativeGetOpenAshmemSize", "(J)J", (void*)android_os_Parcel_getOpenAshmemSize}, // @CriticalNative // @CriticalNative {"nativeReadCallingWorkSourceUid", "(J)I", (void*)android_os_Parcel_readCallingWorkSourceUid}, {"nativeReadCallingWorkSourceUid", "(J)I", (void*)android_os_Parcel_readCallingWorkSourceUid}, Loading tests/notification/src/com/android/frameworks/tests/notification/NotificationTests.java +5 −5 Original line number Original line Diff line number Diff line Loading @@ -409,10 +409,10 @@ public class NotificationTests extends AndroidTestCase { sleepIfYouCan(500); sleepIfYouCan(500); L("Parceling notifications..."); L("Parceling notifications..."); // we want to be able to use this test on older OSes that do not have getBlobAshmemSize // we want to be able to use this test on older OSes that do not have getOpenAshmemSize Method getBlobAshmemSize = null; Method getOpenAshmemSize = null; try { try { getBlobAshmemSize = Parcel.class.getMethod("getBlobAshmemSize"); getOpenAshmemSize = Parcel.class.getMethod("getOpenAshmemSize"); } catch (NoSuchMethodException ex) { } catch (NoSuchMethodException ex) { } } for (int i=0; i<mNotifications.size(); i++) { for (int i=0; i<mNotifications.size(); i++) { Loading @@ -424,8 +424,8 @@ public class NotificationTests extends AndroidTestCase { time = SystemClock.currentThreadTimeMillis() - time; time = SystemClock.currentThreadTimeMillis() - time; L(" %s: write parcel=%dms size=%d ashmem=%s", L(" %s: write parcel=%dms size=%d ashmem=%s", summarize(n), time, p.dataPosition(), summarize(n), time, p.dataPosition(), (getBlobAshmemSize != null) (getOpenAshmemSize != null) ? getBlobAshmemSize.invoke(p) ? getOpenAshmemSize.invoke(p) : "???"); : "???"); p.setDataPosition(0); p.setDataPosition(0); } } Loading Loading
core/java/android/os/Parcel.java +3 −3 Original line number Original line Diff line number Diff line Loading @@ -401,7 +401,7 @@ public final class Parcel { private static final int WRITE_EXCEPTION_STACK_TRACE_THRESHOLD_MS = 1000; private static final int WRITE_EXCEPTION_STACK_TRACE_THRESHOLD_MS = 1000; @CriticalNative @CriticalNative private static native long nativeGetBlobAshmemSize(long nativePtr); private static native long nativeGetOpenAshmemSize(long nativePtr); public final static Parcelable.Creator<String> STRING_CREATOR public final static Parcelable.Creator<String> STRING_CREATOR = new Parcelable.Creator<String>() { = new Parcelable.Creator<String>() { Loading Loading @@ -4381,8 +4381,8 @@ public final class Parcel { /** /** * @hide For testing * @hide For testing */ */ public long getBlobAshmemSize() { public long getOpenAshmemSize() { return nativeGetBlobAshmemSize(mNativePtr); return nativeGetOpenAshmemSize(mNativePtr); } } private static String valueTypeToString(int type) { private static String valueTypeToString(int type) { Loading
core/jni/android_os_Parcel.cpp +3 −3 Original line number Original line Diff line number Diff line Loading @@ -740,11 +740,11 @@ static jlong android_os_Parcel_getGlobalAllocCount(JNIEnv* env, jclass clazz) return Parcel::getGlobalAllocCount(); 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); Parcel* parcel = reinterpret_cast<Parcel*>(nativePtr); if (parcel != NULL) { if (parcel != NULL) { return parcel->getBlobAshmemSize(); return parcel->getOpenAshmemSize(); } } return 0; return 0; } } Loading Loading @@ -852,7 +852,7 @@ static const JNINativeMethod gParcelMethods[] = { {"getGlobalAllocCount", "()J", (void*)android_os_Parcel_getGlobalAllocCount}, {"getGlobalAllocCount", "()J", (void*)android_os_Parcel_getGlobalAllocCount}, // @CriticalNative // @CriticalNative {"nativeGetBlobAshmemSize", "(J)J", (void*)android_os_Parcel_getBlobAshmemSize}, {"nativeGetOpenAshmemSize", "(J)J", (void*)android_os_Parcel_getOpenAshmemSize}, // @CriticalNative // @CriticalNative {"nativeReadCallingWorkSourceUid", "(J)I", (void*)android_os_Parcel_readCallingWorkSourceUid}, {"nativeReadCallingWorkSourceUid", "(J)I", (void*)android_os_Parcel_readCallingWorkSourceUid}, Loading
tests/notification/src/com/android/frameworks/tests/notification/NotificationTests.java +5 −5 Original line number Original line Diff line number Diff line Loading @@ -409,10 +409,10 @@ public class NotificationTests extends AndroidTestCase { sleepIfYouCan(500); sleepIfYouCan(500); L("Parceling notifications..."); L("Parceling notifications..."); // we want to be able to use this test on older OSes that do not have getBlobAshmemSize // we want to be able to use this test on older OSes that do not have getOpenAshmemSize Method getBlobAshmemSize = null; Method getOpenAshmemSize = null; try { try { getBlobAshmemSize = Parcel.class.getMethod("getBlobAshmemSize"); getOpenAshmemSize = Parcel.class.getMethod("getOpenAshmemSize"); } catch (NoSuchMethodException ex) { } catch (NoSuchMethodException ex) { } } for (int i=0; i<mNotifications.size(); i++) { for (int i=0; i<mNotifications.size(); i++) { Loading @@ -424,8 +424,8 @@ public class NotificationTests extends AndroidTestCase { time = SystemClock.currentThreadTimeMillis() - time; time = SystemClock.currentThreadTimeMillis() - time; L(" %s: write parcel=%dms size=%d ashmem=%s", L(" %s: write parcel=%dms size=%d ashmem=%s", summarize(n), time, p.dataPosition(), summarize(n), time, p.dataPosition(), (getBlobAshmemSize != null) (getOpenAshmemSize != null) ? getBlobAshmemSize.invoke(p) ? getOpenAshmemSize.invoke(p) : "???"); : "???"); p.setDataPosition(0); p.setDataPosition(0); } } Loading