diff options
author | Mike Lockwood <lockwood@android.com> | 2009-04-23 09:12:08 -0700 |
---|---|---|
committer | Mike Lockwood <lockwood@android.com> | 2009-04-23 19:27:41 -0700 |
commit | 48f17518223a2917fd82195004fbb206cb9a05a3 (patch) | |
tree | d87449f59ab8b22dada31f595c688bcee9bd3961 /location | |
parent | 0a57e5b730beaea75c1c1b1ca51b40c463918b4d (diff) | |
download | frameworks_base-48f17518223a2917fd82195004fbb206cb9a05a3.zip frameworks_base-48f17518223a2917fd82195004fbb206cb9a05a3.tar.gz frameworks_base-48f17518223a2917fd82195004fbb206cb9a05a3.tar.bz2 |
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: Mike Lockwood <lockwood@android.com>
Diffstat (limited to 'location')
-rw-r--r-- | location/java/android/location/ILocationManager.aidl | 5 | ||||
-rw-r--r-- | location/java/android/location/LocationManager.java | 5 |
2 files changed, 9 insertions, 1 deletions
diff --git a/location/java/android/location/ILocationManager.aidl b/location/java/android/location/ILocationManager.aidl index 7d35814..096622a 100644 --- a/location/java/android/location/ILocationManager.aidl +++ b/location/java/android/location/ILocationManager.aidl @@ -45,7 +45,10 @@ 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, diff --git a/location/java/android/location/LocationManager.java b/location/java/android/location/LocationManager.java index 0c7254e..f587f96 100644 --- a/location/java/android/location/LocationManager.java +++ b/location/java/android/location/LocationManager.java @@ -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); + } } } /** |