Loading core/java/android/view/SurfaceSession.java +7 −8 Original line number Diff line number Diff line Loading @@ -32,7 +32,6 @@ public final class SurfaceSession { private static native long nativeCreate(); private static native void nativeDestroy(long ptr); private static native void nativeKill(long ptr); /** Create a new connection with the surface flinger. */ @UnsupportedAppUsage Loading @@ -44,22 +43,22 @@ public final class SurfaceSession { @Override protected void finalize() throws Throwable { try { if (mNativeClient != 0) { nativeDestroy(mNativeClient); } kill(); } finally { super.finalize(); } } /** * Forcibly detach native resources associated with this object. * Unlike destroy(), after this call any surfaces that were created * from the session will no longer work. * Remove the reference to the native Session object. The native object may still exist if * there are other references to it, but it cannot be accessed from this Java object anymore. */ @UnsupportedAppUsage public void kill() { nativeKill(mNativeClient); if (mNativeClient != 0) { nativeDestroy(mNativeClient); mNativeClient = 0; } } } core/jni/android_view_SurfaceSession.cpp +0 −7 Original line number Diff line number Diff line Loading @@ -51,19 +51,12 @@ static void nativeDestroy(JNIEnv* env, jclass clazz, jlong ptr) { client->decStrong((void*)nativeCreate); } static void nativeKill(JNIEnv* env, jclass clazz, jlong ptr) { SurfaceComposerClient* client = reinterpret_cast<SurfaceComposerClient*>(ptr); client->dispose(); } static const JNINativeMethod gMethods[] = { /* name, signature, funcPtr */ { "nativeCreate", "()J", (void*)nativeCreate }, { "nativeDestroy", "(J)V", (void*)nativeDestroy }, { "nativeKill", "(J)V", (void*)nativeKill } }; int register_android_view_SurfaceSession(JNIEnv* env) { Loading Loading
core/java/android/view/SurfaceSession.java +7 −8 Original line number Diff line number Diff line Loading @@ -32,7 +32,6 @@ public final class SurfaceSession { private static native long nativeCreate(); private static native void nativeDestroy(long ptr); private static native void nativeKill(long ptr); /** Create a new connection with the surface flinger. */ @UnsupportedAppUsage Loading @@ -44,22 +43,22 @@ public final class SurfaceSession { @Override protected void finalize() throws Throwable { try { if (mNativeClient != 0) { nativeDestroy(mNativeClient); } kill(); } finally { super.finalize(); } } /** * Forcibly detach native resources associated with this object. * Unlike destroy(), after this call any surfaces that were created * from the session will no longer work. * Remove the reference to the native Session object. The native object may still exist if * there are other references to it, but it cannot be accessed from this Java object anymore. */ @UnsupportedAppUsage public void kill() { nativeKill(mNativeClient); if (mNativeClient != 0) { nativeDestroy(mNativeClient); mNativeClient = 0; } } }
core/jni/android_view_SurfaceSession.cpp +0 −7 Original line number Diff line number Diff line Loading @@ -51,19 +51,12 @@ static void nativeDestroy(JNIEnv* env, jclass clazz, jlong ptr) { client->decStrong((void*)nativeCreate); } static void nativeKill(JNIEnv* env, jclass clazz, jlong ptr) { SurfaceComposerClient* client = reinterpret_cast<SurfaceComposerClient*>(ptr); client->dispose(); } static const JNINativeMethod gMethods[] = { /* name, signature, funcPtr */ { "nativeCreate", "()J", (void*)nativeCreate }, { "nativeDestroy", "(J)V", (void*)nativeDestroy }, { "nativeKill", "(J)V", (void*)nativeKill } }; int register_android_view_SurfaceSession(JNIEnv* env) { Loading