Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ab762493 authored by Dave Sparks's avatar Dave Sparks Committed by Android Git Automerger
Browse files

am 1e914ac7: am 16cc72bd: Fix simulator build.

Merge commit '1e914ac7fce9523b5a932389798589eba91ca4dd' into eclair-mr2-plus-aosp

* commit '1e914ac7fce9523b5a932389798589eba91ca4dd':
  Fix simulator build.
parents b2c6deda a7c816c4
Loading
Loading
Loading
Loading
+12 −3
Original line number Diff line number Diff line
@@ -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