Skip to content

Commit 6e43c1b

Browse files
author
James Dong
committed
Removed code related to simulator build in TimedEventQueue to get rid of the dependency on jni.h
o related-to-bug: 6214141 Change-Id: I548d84a9888be884d3903dc9dea9235258792165
1 parent a026b48 commit 6e43c1b

File tree

1 file changed

+0
-21
lines changed

1 file changed

+0
-21
lines changed

media/libstagefright/TimedEventQueue.cpp

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,6 @@
3131

3232
#include <media/stagefright/foundation/ADebug.h>
3333

34-
#ifdef ANDROID_SIMULATOR
35-
#include <jni.h>
36-
#endif
37-
3834
namespace android {
3935

4036
TimedEventQueue::TimedEventQueue()
@@ -193,27 +189,10 @@ int64_t TimedEventQueue::getRealTimeUs() {
193189
// static
194190
void *TimedEventQueue::ThreadWrapper(void *me) {
195191

196-
#ifdef ANDROID_SIMULATOR
197-
// The simulator runs everything as one process, so any
198-
// Binder calls happen on this thread instead of a thread
199-
// in another process. We therefore need to make sure that
200-
// this thread can do calls into interpreted code.
201-
// On the device this is not an issue because the remote
202-
// thread will already be set up correctly for this.
203-
JavaVM *vm;
204-
int numvms;
205-
JNI_GetCreatedJavaVMs(&vm, 1, &numvms);
206-
JNIEnv *env;
207-
vm->AttachCurrentThread(&env, NULL);
208-
#endif
209-
210192
androidSetThreadPriority(0, ANDROID_PRIORITY_FOREGROUND);
211193

212194
static_cast<TimedEventQueue *>(me)->threadEntry();
213195

214-
#ifdef ANDROID_SIMULATOR
215-
vm->DetachCurrentThread();
216-
#endif
217196
return NULL;
218197
}
219198

0 commit comments

Comments
 (0)