Merge "get rid of Surface.getIdentity()"

This commit is contained in:
Mathias Agopian
2013-02-14 20:22:24 +00:00
committed by Android (Google) Code Review
2 changed files with 1 additions and 18 deletions

View File

@@ -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() {

View File

@@ -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<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 @@ static JNINativeMethod gSurfaceMethods[] = {
(void*)nativeDestroy },
{"nativeIsValid", "()Z",
(void*)nativeIsValid },
{"nativeGetIdentity", "()I",
(void*)nativeGetIdentity },
{"nativeIsConsumerRunningBehind", "()Z",
(void*)nativeIsConsumerRunningBehind },
{"nativeLockCanvas", "(Landroid/graphics/Rect;)Landroid/graphics/Canvas;",