OSDN Git Service

Remove races in Geocoder/LocationProvider Proxy
authorMark Vandevoorde <mtv@google.com>
Mon, 4 Oct 2010 21:23:24 +0000 (14:23 -0700)
committerMark Vandevoorde <mtv@google.com>
Tue, 5 Oct 2010 18:12:48 +0000 (11:12 -0700)
commit8863c43d9efda108c880814b0a18688b75d70153
treec77a58ad2624630d406616398153ea33eec5fdda
parentb9a40068b590b86904b40bf466571b140d0f94b4
Remove races in Geocoder/LocationProvider Proxy

The proxy must ensure that enable/disable calls are not reordered when
proxied; this change adds synchronization to prevent such reordering
that could happen following an onServiceConnected() callback, and to
ensure cross-thread visibility of writes.

Also, when the package is updated, the old service instance must be
unbound and the new one bound.  This changes uses a separate
Connection object per service instance (package version) to avoid
confusing the binder objects.

Change-Id: I0907f7eed211b97ccfffa395754f1eb8ea8d8fec
services/java/com/android/server/LocationManagerService.java
services/java/com/android/server/location/GeocoderProxy.java
services/java/com/android/server/location/LocationProviderProxy.java