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

Commit 5f880106 authored by Mike Lockwood's avatar Mike Lockwood
Browse files

Remove GPS privacy support to fix merge problem.



Change-Id: Ib00543b339a6358989779828459b120d1c647b72
Signed-off-by: default avatarMike Lockwood <lockwood@android.com>
parent 9187c0ba
Loading
Loading
Loading
Loading
+0 −13
Original line number Diff line number Diff line
@@ -41,7 +41,6 @@ static jmethodID method_reportNiNotification;
static const GpsInterface* sGpsInterface = NULL;
static const GpsXtraInterface* sGpsXtraInterface = NULL;
static const AGpsInterface* sAGpsInterface = NULL;
static const GpsPrivacyInterface* sGpsPrivacyInterface = NULL;
static const GpsNiInterface* sGpsNiInterface = NULL;
static const GpsDebugInterface* sGpsDebugInterface = NULL;

@@ -246,12 +245,6 @@ static jboolean android_location_GpsLocationProvider_init(JNIEnv* env, jobject o
    if (sGpsNiInterface)
        sGpsNiInterface->init(&sGpsNiCallbacks);

    // Clear privacy lock while enabled
    if (!sGpsPrivacyInterface)
        sGpsPrivacyInterface = (const GpsPrivacyInterface*)sGpsInterface->get_extension(GPS_PRIVACY_INTERFACE);
    if (sGpsPrivacyInterface)
        sGpsPrivacyInterface->set_privacy_lock(0);

    if (!sGpsDebugInterface)
       sGpsDebugInterface = (const GpsDebugInterface*)sGpsInterface->get_extension(GPS_DEBUG_INTERFACE);

@@ -260,12 +253,6 @@ static jboolean android_location_GpsLocationProvider_init(JNIEnv* env, jobject o

static void android_location_GpsLocationProvider_disable(JNIEnv* env, jobject obj)
{
    // Enable privacy lock while disabled
    if (!sGpsPrivacyInterface)
        sGpsPrivacyInterface = (const GpsPrivacyInterface*)sGpsInterface->get_extension(GPS_PRIVACY_INTERFACE);
    if (sGpsPrivacyInterface)
        sGpsPrivacyInterface->set_privacy_lock(1);

    pthread_mutex_lock(&sEventMutex);
    sPendingCallbacks |= kDisableRequest;
    pthread_cond_signal(&sEventCond);