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

Commit 1ae7831b authored by Jared Suttles's avatar Jared Suttles Committed by Android Git Automerger
Browse files

am 8b1243e5: jni: GpsLocationProvider: Check for pending callbacks before waiting

Merge commit '8b1243e5' into eclair-mr2

* commit '8b1243e5':
  jni: GpsLocationProvider: Check for pending callbacks before waiting
parents 0cb3f587 8b1243e5
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -266,7 +266,9 @@ static void android_location_GpsLocationProvider_delete_aiding_data(JNIEnv* env,
static void android_location_GpsLocationProvider_wait_for_event(JNIEnv* env, jobject obj)
{
    pthread_mutex_lock(&sEventMutex);
    while (sPendingCallbacks == 0) {
        pthread_cond_wait(&sEventCond, &sEventMutex);
    }

    // copy and clear the callback flags
    int pendingCallbacks = sPendingCallbacks;