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

Commit ab31d357 authored by Mathias Agopian's avatar Mathias Agopian Committed by Android Git Automerger
Browse files

am a41b23d5: Merge "get rid of Surface.getIdentity()"

# Via Android (Google) Code Review (1) and Mathias Agopian (1)
* commit 'a41b23d5':
  get rid of Surface.getIdentity()
parents c6583c3e a41b23d5
Loading
Loading
Loading
Loading
+1 −2
Original line number Original line Diff line number Diff line
@@ -233,7 +233,6 @@ public class Surface implements Parcelable {
    private native void nativeDestroy();
    private native void nativeDestroy();


    private native boolean nativeIsValid();
    private native boolean nativeIsValid();
    private native int nativeGetIdentity();
    private native boolean nativeIsConsumerRunningBehind();
    private native boolean nativeIsConsumerRunningBehind();


    private native Canvas nativeLockCanvas(Rect dirty);
    private native Canvas nativeLockCanvas(Rect dirty);
@@ -725,7 +724,7 @@ public class Surface implements Parcelable {


    @Override
    @Override
    public String toString() {
    public String toString() {
        return "Surface(name=" + mName + ", identity=" + nativeGetIdentity() + ")";
        return "Surface(name=" + mName + ")";
    }
    }


    private static void checkHeadless() {
    private static void checkHeadless() {
+0 −16
Original line number Original line Diff line number Diff line
@@ -336,20 +336,6 @@ static jboolean nativeIsValid(JNIEnv* env, jobject surfaceObj) {
    return Surface::isValid(surface) ? JNI_TRUE : JNI_FALSE;
    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) {
static jboolean nativeIsConsumerRunningBehind(JNIEnv* env, jobject surfaceObj) {
    sp<Surface> surface(getSurface(env, surfaceObj));
    sp<Surface> surface(getSurface(env, surfaceObj));
    if (!Surface::isValid(surface)) {
    if (!Surface::isValid(surface)) {
@@ -820,8 +806,6 @@ static JNINativeMethod gSurfaceMethods[] = {
            (void*)nativeDestroy },
            (void*)nativeDestroy },
    {"nativeIsValid", "()Z",
    {"nativeIsValid", "()Z",
            (void*)nativeIsValid },
            (void*)nativeIsValid },
    {"nativeGetIdentity", "()I",
            (void*)nativeGetIdentity },
    {"nativeIsConsumerRunningBehind", "()Z",
    {"nativeIsConsumerRunningBehind", "()Z",
            (void*)nativeIsConsumerRunningBehind },
            (void*)nativeIsConsumerRunningBehind },
    {"nativeLockCanvas", "(Landroid/graphics/Rect;)Landroid/graphics/Canvas;",
    {"nativeLockCanvas", "(Landroid/graphics/Rect;)Landroid/graphics/Canvas;",