OSDN Git Service

Use default class loader when creating a LocationRequest from Parcel.
authorDavid Christie <dnchrist@google.com>
Thu, 15 Aug 2013 23:01:42 +0000 (16:01 -0700)
committerDavid Christie <dnchrist@google.com>
Thu, 15 Aug 2013 23:01:42 +0000 (16:01 -0700)
This seems to be the standard usage, and there are rare reports of
requestLocationUpdates giving NullPointerExceptions on the first call
to requestLocationUpdates but not on subsequent calls (b/10207898).

Change-Id: If7a873fba5a2cd77b836ff3fda89105da20104ac

location/java/android/location/LocationRequest.java

index ee748d3..a33a1d8 100644 (file)
@@ -564,7 +564,7 @@ public final class LocationRequest implements Parcelable {
             request.setHideFromAppOps(in.readInt() != 0);
             String provider = in.readString();
             if (provider != null) request.setProvider(provider);
-            WorkSource workSource = in.readParcelable(WorkSource.class.getClassLoader());
+            WorkSource workSource = in.readParcelable(null);
             if (workSource != null) request.setWorkSource(workSource);
             return request;
         }