Clean JNI data pointer in shutdown()
Before, finalize() after shutdown() could segfault
since shutdown() kept the pointer to the deleted
SynthProxyJniStorage.
Change-Id: I338c19758733425be2e3b0d9e66176d11d27e8f6
diff --git a/pico/compat/src/com/android/tts/compat/SynthProxy.java b/pico/compat/src/com/android/tts/compat/SynthProxy.java
index 68d0d92..58b2a50 100755
--- a/pico/compat/src/com/android/tts/compat/SynthProxy.java
+++ b/pico/compat/src/com/android/tts/compat/SynthProxy.java
@@ -139,8 +139,9 @@
/**
* Shuts down the native synthesizer.
*/
- public void shutdown() {
+ public void shutdown() {
native_shutdown(mJniData);
+ mJniData = 0;
}
@Override