location: Location Manager wakelock cleanup

Location Providers are now responsible for their own wakelocks and scheduling.

Also fixed a deadlock in LocationManagerService in the code for releasing
wakelocks after client notifications have been received.
The fix is to use the Receiver object and mWakeLock for synchronization
 instead of the global mLock lock.

Signed-off-by: Mike Lockwood <lockwood@android.com>
This commit is contained in:
Mike Lockwood
2009-05-07 10:12:54 -04:00
parent 90da134bef
commit 0528b9b26a
6 changed files with 86 additions and 257 deletions

View File

@@ -231,20 +231,4 @@ public class LocationProviderProxy {
Log.e(TAG, "removeListener failed", e);
}
}
public void wakeLockAcquired() {
try {
mProvider.wakeLockAcquired();
} catch (RemoteException e) {
Log.e(TAG, "wakeLockAcquired failed", e);
}
}
public void wakeLockReleased() {
try {
mProvider.wakeLockReleased();
} catch (RemoteException e) {
Log.e(TAG, "wakeLockReleased failed", e);
}
}
}