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

Commit 55fb51aa authored by Marco Nelissen's avatar Marco Nelissen
Browse files

resolved conflicts for merge of 86303198 to kraken

Change-Id: Idd921c7108e4c2cd4a861ee1fb8b43e5d56f8f2f
parents 87ac404d 86303198
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -147,6 +147,7 @@ public class Surface implements Parcelable {
    private Canvas mCanvas;
    @SuppressWarnings("unused")
    private int mNativeSurface;
    private String mName;

    // The display metrics used to provide the pseudo canvas size for applications
    // running in compatibility mode. This is set to null for non compatibility mode.
@@ -204,6 +205,7 @@ public class Surface implements Parcelable {
        }
        mCanvas = new CompatibleCanvas();
        init(s,pid,name,display,w,h,format,flags);
        mName = name;
    }

    /**
@@ -386,7 +388,7 @@ public class Surface implements Parcelable {

    @Override
    public String toString() {
        return "Surface(native-token=" + mSurfaceControl + ")";
        return "Surface(name=" + mName + ", identity=" + getIdentity() + ")";
    }

    private Surface(Parcel source) throws OutOfResourcesException {
@@ -437,4 +439,6 @@ public class Surface implements Parcelable {
            throws OutOfResourcesException;

    private native void init(Parcel source);

    private native int getIdentity();
}
+41 −31
Original line number Diff line number Diff line
@@ -230,6 +230,15 @@ static void Surface_initParcel(JNIEnv* env, jobject clazz, jobject argParcel)
    setSurface(env, clazz, rhs);
}

static jint Surface_getIdentity(JNIEnv* env, jobject clazz)
{
    const sp<SurfaceControl>& control(getSurfaceControl(env, clazz));
    if (control != 0) return (jint) control->getIdentity();
    const sp<Surface>& surface(getSurface(env, clazz));
    if (surface != 0) return (jint) surface->getIdentity();
    return -1;
}

static void Surface_destroy(JNIEnv* env, jobject clazz, uintptr_t *ostack)
{
    const sp<SurfaceControl>& surface(getSurfaceControl(env, clazz));
@@ -641,6 +650,7 @@ static JNINativeMethod gSurfaceMethods[] = {
    {"nativeClassInit",     "()V",  (void*)nativeClassInit },
    {"init",                "(Landroid/view/SurfaceSession;ILjava/lang/String;IIIII)V",  (void*)Surface_init },
    {"init",                "(Landroid/os/Parcel;)V",  (void*)Surface_initParcel },
    {"getIdentity",         "()I",  (void*)Surface_getIdentity },
    {"destroy",             "()V",  (void*)Surface_destroy },
    {"release",             "()V",  (void*)Surface_release },
    {"copyFrom",            "(Landroid/view/Surface;)V",  (void*)Surface_copyFrom },