OSDN Git Service

Fix timing problem that was introduced when we removed location provider polling
authorMike Lockwood <lockwood@android.com>
Wed, 22 Apr 2009 04:27:33 +0000 (21:27 -0700)
committerMike Lockwood <lockwood@android.com>
Wed, 22 Apr 2009 04:27:33 +0000 (21:27 -0700)
The wake lock was not being held until after we enabled location tracking,
so the check to see if the wake lock was held before propogating a
new location prevented us from receiving a network location as soon as we
enabled the provider.
This check is not necessary anyway, so this change removes it.

Signed-off-by: Mike Lockwood <lockwood@android.com>
services/java/com/android/server/LocationManagerService.java

index 83108f8..5e079d4 100644 (file)
@@ -1584,10 +1584,7 @@ public class LocationManagerService extends ILocationManager.Stub {
                             return;
                         }
 
-                        // Process the location fix if we're holding a wakelock
-                        if (mWakeLockAcquireTime != 0) {
-                            handleLocationChangedLocked(location);
-                        }
+                        handleLocationChangedLocked(location);
 
                         if ((mWakeLockAcquireTime != 0) &&
                             (SystemClock.elapsedRealtime() - mWakeLockAcquireTime