Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f9136fd9 authored by Mathias Agopian's avatar Mathias Agopian
Browse files

get rid of Surface.getIdentity()

Change-Id: I8b70d77cc1b38009ad71d92025c3beb481a18866
parent 044dca28
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -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() {
+0 −16
Original line number Diff line number Diff line
@@ -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;",