diff options
author | Mike Lockwood <lockwood@android.com> | 2009-04-21 20:18:41 -0700 |
---|---|---|
committer | Mike Lockwood <lockwood@android.com> | 2009-04-21 20:18:41 -0700 |
commit | 9ce7217c8eb4141bda68b85641814958da58a7ab (patch) | |
tree | dc3e526ad5922276cf884b9d90b26997bbd334ff | |
parent | 61fc286e8f7e33d0dd2a1e72ae9ef73ed3f42a00 (diff) | |
download | frameworks_base-9ce7217c8eb4141bda68b85641814958da58a7ab.zip frameworks_base-9ce7217c8eb4141bda68b85641814958da58a7ab.tar.gz frameworks_base-9ce7217c8eb4141bda68b85641814958da58a7ab.tar.bz2 |
location: Remove support for a message that never actually gets sent.
Signed-off-by: Mike Lockwood <lockwood@android.com>
-rw-r--r-- | services/java/com/android/server/LocationManagerService.java | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/services/java/com/android/server/LocationManagerService.java b/services/java/com/android/server/LocationManagerService.java index ed5ae68..83108f8 100644 --- a/services/java/com/android/server/LocationManagerService.java +++ b/services/java/com/android/server/LocationManagerService.java @@ -130,8 +130,7 @@ public class LocationManagerService extends ILocationManager.Stub { // Handler messages private static final int MESSAGE_LOCATION_CHANGED = 1; - private static final int MESSAGE_ACQUIRE_WAKE_LOCK = 2; - private static final int MESSAGE_RELEASE_WAKE_LOCK = 3; + private static final int MESSAGE_RELEASE_WAKE_LOCK = 2; // Alarm manager and wakelock variables private final static String ALARM_INTENT = "com.android.location.ALARM_INTENT"; @@ -1594,7 +1593,6 @@ public class LocationManagerService extends ILocationManager.Stub { (SystemClock.elapsedRealtime() - mWakeLockAcquireTime > MAX_TIME_FOR_WAKE_LOCK)) { - removeMessages(MESSAGE_ACQUIRE_WAKE_LOCK); removeMessages(MESSAGE_RELEASE_WAKE_LOCK); log("LocationWorkerHandler: Exceeded max time for wake lock"); @@ -1604,7 +1602,6 @@ public class LocationManagerService extends ILocationManager.Stub { } else if (mWakeLockAcquireTime != 0 && mWakeLockGpsReceived && mWakeLockNetworkReceived) { - removeMessages(MESSAGE_ACQUIRE_WAKE_LOCK); removeMessages(MESSAGE_RELEASE_WAKE_LOCK); log("LocationWorkerHandler: Locations received."); @@ -1613,12 +1610,6 @@ public class LocationManagerService extends ILocationManager.Stub { sendMessageDelayed(m, TIME_AFTER_WAKE_LOCK); } } - - } else if (msg.what == MESSAGE_ACQUIRE_WAKE_LOCK) { - log("LocationWorkerHandler: Acquire"); - synchronized (mLock) { - acquireWakeLockLocked(); - } } else if (msg.what == MESSAGE_RELEASE_WAKE_LOCK) { log("LocationWorkerHandler: Release"); @@ -1642,7 +1633,6 @@ public class LocationManagerService extends ILocationManager.Stub { if (action.equals(ALARM_INTENT)) { synchronized (mLock) { log("PowerStateBroadcastReceiver: Alarm received"); - mLocationHandler.removeMessages(MESSAGE_ACQUIRE_WAKE_LOCK); // Have to do this immediately, rather than posting a // message, so we execute our code while the system // is holding a wake lock until the alarm broadcast @@ -1771,7 +1761,6 @@ public class LocationManagerService extends ILocationManager.Stub { mAlarmInterval = -1; // Clear out existing wakelocks - mLocationHandler.removeMessages(MESSAGE_ACQUIRE_WAKE_LOCK); mLocationHandler.removeMessages(MESSAGE_RELEASE_WAKE_LOCK); releaseWakeLockLocked(); } |