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

Commit 48f17518 authored by Mike Lockwood's avatar Mike Lockwood
Browse files

location: Location Manager wakelock cleanup, phase 2



Remove two second timeout for wakelock when broadcasting events to
location listeners. Instead, hold wakelock until receipt of the event
is acknowledged, either via a Binder call or the
PendingIntent.OnFinished interface.

Signed-off-by: default avatarMike Lockwood <lockwood@android.com>
parent 0a57e5b7
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -46,6 +46,9 @@ interface ILocationManager
    boolean addGpsStatusListener(IGpsStatusListener listener);
    void removeGpsStatusListener(IGpsStatusListener listener);

    // for reporting callback completion
    void locationCallbackFinished(ILocationListener listener);

    boolean sendExtraCommand(String provider, String command, inout Bundle extras);

    void addProximityAlert(double latitude, double longitude, float distance,
+5 −0
Original line number Diff line number Diff line
@@ -194,6 +194,11 @@ public class LocationManager {
                    mListener.onProviderDisabled((String) msg.obj);
                    break;
            }
            try {
                mService.locationCallbackFinished(this);
            } catch (RemoteException e) {
                Log.e(TAG, "locationCallbackFinished: RemoteException", e);
            }
        }
    }
    /**
+167 −81

File changed.

Preview size limit exceeded, changes collapsed.