Don't start location providers until the system is ready.

Change-Id: Id545e95705e59ffbaaab8a679a1b7df488813101
BUG: 2461320

Signed-off-by: Mike Lockwood <lockwood@android.com>
This commit is contained in:
Mike Lockwood
2010-02-22 16:36:44 -05:00
parent 2f6a01858b
commit 46db504de5
2 changed files with 11 additions and 5 deletions

View File

@@ -485,14 +485,17 @@ public class LocationManagerService extends ILocationManager.Stub implements Run
super();
mContext = context;
Thread thread = new Thread(null, this, "LocationManagerService");
thread.start();
if (LOCAL_LOGV) {
Log.v(TAG, "Constructed LocationManager Service");
}
}
void systemReady() {
// we defer starting up the service until the system is ready
Thread thread = new Thread(null, this, "LocationManagerService");
thread.start();
}
private void initialize() {
// Create a wake lock, needs to be done before calling loadProviders() below
PowerManager powerManager = (PowerManager) mContext.getSystemService(Context.POWER_SERVICE);