summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
authorDave Sparks <davidsparks@android.com>2009-11-23 19:51:33 -0800
committerDave Sparks <davidsparks@android.com>2009-11-23 19:51:33 -0800
commit16cc72bdef471ffeee3f61eba8262783de248b04 (patch)
treee09b582e546dd12ddd271e1018ff785fde9196ca /media
parent8424ec323b2bc38887370c75e2c1fcd84bcdb013 (diff)
downloadframeworks_base-16cc72bdef471ffeee3f61eba8262783de248b04.zip
frameworks_base-16cc72bdef471ffeee3f61eba8262783de248b04.tar.gz
frameworks_base-16cc72bdef471ffeee3f61eba8262783de248b04.tar.bz2
Fix simulator build.
Diffstat (limited to 'media')
-rw-r--r--media/libmedia/IMediaMetadataRetriever.cpp15
1 files changed, 12 insertions, 3 deletions
diff --git a/media/libmedia/IMediaMetadataRetriever.cpp b/media/libmedia/IMediaMetadataRetriever.cpp
index 68dd880..e529d25 100644
--- a/media/libmedia/IMediaMetadataRetriever.cpp
+++ b/media/libmedia/IMediaMetadataRetriever.cpp
@@ -41,6 +41,15 @@ pid_t gettid() { return syscall(__NR_gettid);}
#undef __KERNEL__
#endif
+static int myTid() {
+#ifdef HAVE_GETTID
+ return gettid();
+#else
+ return getpid();
+#endif
+}
+
+#undef LOG_TAG
#define LOG_TAG "IMediaMetadataRetriever"
#include <utils/Log.h>
#include <cutils/sched_policy.h>
@@ -50,18 +59,18 @@ namespace android {
static void sendSchedPolicy(Parcel& data)
{
SchedPolicy policy;
- get_sched_policy(gettid(), &policy);
+ get_sched_policy(myTid(), &policy);
data.writeInt32(policy);
}
static void setSchedPolicy(const Parcel& data)
{
SchedPolicy policy = (SchedPolicy) data.readInt32();
- set_sched_policy(gettid(), policy);
+ set_sched_policy(myTid(), policy);
}
static void restoreSchedPolicy()
{
- set_sched_policy(gettid(), SP_FOREGROUND);
+ set_sched_policy(myTid(), SP_FOREGROUND);
}
}; // end namespace android
#endif