Merge "get rid of Surface.getIdentity()"
diff --git a/core/java/android/view/Surface.java b/core/java/android/view/Surface.java
index a972b75..48b7180 100644
--- a/core/java/android/view/Surface.java
+++ b/core/java/android/view/Surface.java
@@ -234,7 +234,6 @@
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 @@
@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 1f15370..40b505c 100644
--- a/core/jni/android_view_Surface.cpp
+++ b/core/jni/android_view_Surface.cpp
@@ -331,20 +331,6 @@
return Surface::isValid(surface) ? JNI_TRUE : JNI_FALSE;
}
-static jint nativeGetIdentity(JNIEnv* env, jobject surfaceObj) {
- sp<SurfaceControl> control(getSurfaceControl(env, surfaceObj));
- if (control != NULL) {
- return jint(control->getIdentity());
- }
-
- sp<Surface> surface(getSurface(env, surfaceObj));
- if (surface != NULL) {
- return jint(surface->getIdentity());
- }
-
- return -1;
-}
-
static jboolean nativeIsConsumerRunningBehind(JNIEnv* env, jobject surfaceObj) {
sp<Surface> surface(getSurface(env, surfaceObj));
if (!Surface::isValid(surface)) {
@@ -813,8 +799,6 @@
(void*)nativeDestroy },
{"nativeIsValid", "()Z",
(void*)nativeIsValid },
- {"nativeGetIdentity", "()I",
- (void*)nativeGetIdentity },
{"nativeIsConsumerRunningBehind", "()Z",
(void*)nativeIsConsumerRunningBehind },
{"nativeLockCanvas", "(Landroid/graphics/Rect;)Landroid/graphics/Canvas;",