Merge "get rid of Surface.getIdentity()"
This commit is contained in:
committed by
Android (Google) Code Review
commit
a41b23d55d
@@ -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() {
|
||||
|
||||
@@ -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;",
|
||||
|
||||
Reference in New Issue
Block a user