OSDN Git Service

Fixed b/10512887.
authorZhentao Sun <robinvane@google.com>
Thu, 29 Aug 2013 21:43:35 +0000 (14:43 -0700)
committerZhentao Sun <robinvane@google.com>
Thu, 29 Aug 2013 23:56:19 +0000 (16:56 -0700)
commitd535ead295abf3b74afb6450c83bd197f69c5a26
treebdde0556fc8b716a034a17f2e40add90806aea32
parent7be3a138d57713bbe6d624998620081807e65b71
Fixed b/10512887.

This is an issue caused by multi-threading. If geofence provider service
is connected and disconnected immediately, the ServiceWatcher can return a
null service handle to the private thread used by GeofenceProxy, and
this can cause NPE and system crash.
This CL also fixed a hidden race conditions bug where mGeofenceHardware
is not synchronized between two threads.

Change-Id: I824642cd638fbb1e6799a5a1220b047ebc2556a1
services/java/com/android/server/location/GeofenceProxy.java