From f9136fd9692158574d187af8d4031fa4b1e2b6e6 Mon Sep 17 00:00:00 2001 From: Mathias Agopian Date: Mon, 11 Feb 2013 17:00:13 -0800 Subject: [PATCH] get rid of Surface.getIdentity() Change-Id: I8b70d77cc1b38009ad71d92025c3beb481a18866 --- core/java/android/view/Surface.java | 3 +-- core/jni/android_view_Surface.cpp | 16 ---------------- 2 files changed, 1 insertion(+), 18 deletions(-) diff --git a/core/java/android/view/Surface.java b/core/java/android/view/Surface.java index a972b750743ed..48b7180dd4a6b 100644 --- a/core/java/android/view/Surface.java +++ b/core/java/android/view/Surface.java @@ -234,7 +234,6 @@ public class Surface implements Parcelable { private native void nativeDestroy(); private native boolean nativeIsValid(); - private native int nativeGetIdentity(); private native boolean nativeIsConsumerRunningBehind(); private native Canvas nativeLockCanvas(Rect dirty); @@ -726,7 +725,7 @@ public class Surface implements Parcelable { @Override public String toString() { - return "Surface(name=" + mName + ", identity=" + nativeGetIdentity() + ")"; + return "Surface(name=" + mName + ")"; } private static void checkHeadless() { diff --git a/core/jni/android_view_Surface.cpp b/core/jni/android_view_Surface.cpp index 1f1537082a906..40b505cb0810d 100644 --- a/core/jni/android_view_Surface.cpp +++ b/core/jni/android_view_Surface.cpp @@ -331,20 +331,6 @@ static jboolean nativeIsValid(JNIEnv* env, jobject surfaceObj) { return Surface::isValid(surface) ? JNI_TRUE : JNI_FALSE; } -static jint nativeGetIdentity(JNIEnv* env, jobject surfaceObj) { - sp control(getSurfaceControl(env, surfaceObj)); - if (control != NULL) { - return jint(control->getIdentity()); - } - - sp surface(getSurface(env, surfaceObj)); - if (surface != NULL) { - return jint(surface->getIdentity()); - } - - return -1; -} - static jboolean nativeIsConsumerRunningBehind(JNIEnv* env, jobject surfaceObj) { sp surface(getSurface(env, surfaceObj)); if (!Surface::isValid(surface)) { @@ -813,8 +799,6 @@ static JNINativeMethod gSurfaceMethods[] = { (void*)nativeDestroy }, {"nativeIsValid", "()Z", (void*)nativeIsValid }, - {"nativeGetIdentity", "()I", - (void*)nativeGetIdentity }, {"nativeIsConsumerRunningBehind", "()Z", (void*)nativeIsConsumerRunningBehind }, {"nativeLockCanvas", "(Landroid/graphics/Rect;)Landroid/graphics/Canvas;",