modules/audio_device/android/audio_track_jni.cc
void AudioTrackJni::ClearAndroidAudioDeviceObjects() {
  ALOGD("ClearAndroidAudioDeviceObjects%s", GetThreadInfo().c_str());
  JNIEnv* jni = GetEnv(g_jvm);
  CHECK(jni) << "AttachCurrentThread must be called on this tread";
  jni->UnregisterNatives(g_audio_track_class);
  CHECK_EXCEPTION(jni) << "Error during UnregisterNatives";
  DeleteGlobalRef(jni, g_audio_track_class);
  g_audio_track_class = NULL;
  DeleteGlobalRef(jni, g_context);
  g_context = NULL;
  g_jvm = NULL;
}
// TODO(henrika): figure out if it is required to call this method? If so,
// ensure that is is always called as part of the destruction phase.
figure out if it is required to call this method. If so,
ensure that is is always called as part of the destruction phase.
figure out if it is required to call this method . If so ensure that is is always called as part of the destruction phase .
void AudioTrackJni::ClearAndroidAudioDeviceObjects() {
  ALOGD("ClearAndroidAudioDeviceObjects%s", GetThreadInfo().c_str());
  JNIEnv* jni = GetEnv(g_jvm);
  CHECK(jni) << "AttachCurrentThread must be called on this tread";
  jni->UnregisterNatives(g_audio_track_class);
  CHECK_EXCEPTION(jni) << "Error during UnregisterNatives";
  DeleteGlobalRef(jni, g_audio_track_class);
  g_audio_track_class = NULL;
  DeleteGlobalRef(jni, g_context);
  g_context = NULL;
  g_jvm = NULL;
}
void AudioTrackJni :: ClearAndroidAudioDeviceObjects ( ) { ALOGD ( " " , GetThreadInfo ( ) . c_str ( ) ) ; JNIEnv * jni = GetEnv ( g_jvm ) ; CHECK ( jni ) << " " ; jni -> UnregisterNatives ( g_audio_track_class ) ; CHECK_EXCEPTION ( jni ) << " " ; DeleteGlobalRef ( jni , g_audio_track_class ) ; g_audio_track_class = NULL ; DeleteGlobalRef ( jni , g_context ) ; g_context = NULL ; g_jvm = NULL ; }
TODO(henrika): figure out if it is required to call this method?
TODO ( henrika ) : figure out if it is required to call this method?