OSDN Git Service

Avoid NPE in GpsLocationProvider
authorVictoria Lease <violets@google.com>
Mon, 1 Oct 2012 18:00:50 +0000 (11:00 -0700)
committerVictoria Lease <violets@google.com>
Mon, 1 Oct 2012 19:04:37 +0000 (12:04 -0700)
commit5c24fd03426db58b63e1a792c2595447cb722d46
tree8b2624de351c5fffa89345712a40b669ab02a9b6
parentce803d8ed8350179a8474564df8ff26be32bbe5e
Avoid NPE in GpsLocationProvider

Oops, looks like we were spinning up a secondary thread to run some
tasks that will just happen on the main thread regardless. Removed
the secondary thread and fixed up initialisation order regarding
mHandler and things that post to it. Also reordered GPS and
PASSIVE provider initialisation order since GPS depends on PASSIVE.

This should be both safer and easier to read.

Bug: 7248029
Change-Id: I8630caf0a7bd1b2c401603075676f13dda5be4fa
services/java/com/android/server/LocationManagerService.java
services/java/com/android/server/location/GpsLocationProvider.java