summaryrefslogtreecommitdiffstats
path: root/native
diff options
context:
space:
mode:
Diffstat (limited to 'native')
-rw-r--r--native/android/looper.cpp6
-rw-r--r--native/include/android/native_activity.h7
2 files changed, 12 insertions, 1 deletions
diff --git a/native/android/looper.cpp b/native/android/looper.cpp
index 9f5cda9..615493f 100644
--- a/native/android/looper.cpp
+++ b/native/android/looper.cpp
@@ -19,9 +19,11 @@
#include <android/looper.h>
#include <utils/Looper.h>
+#include <binder/IPCThreadState.h>
using android::Looper;
using android::sp;
+using android::IPCThreadState;
ALooper* ALooper_forThread() {
return Looper::getForThread().get();
@@ -46,6 +48,7 @@ int ALooper_pollOnce(int timeoutMillis, int* outFd, int* outEvents, void** outDa
return ALOOPER_POLL_ERROR;
}
+ IPCThreadState::self()->flushCommands();
return looper->pollOnce(timeoutMillis, outFd, outEvents, outData);
}
@@ -55,7 +58,8 @@ int ALooper_pollAll(int timeoutMillis, int* outFd, int* outEvents, void** outDat
LOGE("ALooper_pollAll: No looper for this thread!");
return ALOOPER_POLL_ERROR;
}
-
+
+ IPCThreadState::self()->flushCommands();
return looper->pollAll(timeoutMillis, outFd, outEvents, outData);
}
diff --git a/native/include/android/native_activity.h b/native/include/android/native_activity.h
index d89bc8b..a361846 100644
--- a/native/include/android/native_activity.h
+++ b/native/include/android/native_activity.h
@@ -91,6 +91,13 @@ typedef struct ANativeActivity {
* uses this to access binary assets bundled inside its own .apk file.
*/
AAssetManager* assetManager;
+
+ /**
+ * Available starting with Honeycomb: path to the directory containing
+ * the application's OBB files (if any). If the app doesn't have any
+ * OBB files, this directory may not exist.
+ */
+ const char* obbPath;
} ANativeActivity;
/**