diff --git a/play-services-core/src/main/AndroidManifest.xml b/play-services-core/src/main/AndroidManifest.xml index d2c7435731..b5df7631a0 100644 --- a/play-services-core/src/main/AndroidManifest.xml +++ b/play-services-core/src/main/AndroidManifest.xml @@ -134,10 +134,6 @@ - - parceledGeofences = (ArrayList) intent.getSerializableExtra(EXTRA_GEOFENCE_LIST); if (parceledGeofences != null) { event.triggeringGeofences = new ArrayList(); @@ -68,6 +68,14 @@ public static GeofencingEvent fromIntent(Intent intent) { return event; } + @SuppressLint("WrongConstant") + private static @Geofence.GeofenceTransition int validate(@Geofence.GeofenceTransition int geofenceTransition) { + if (geofenceTransition != Geofence.GEOFENCE_TRANSITION_ENTER && geofenceTransition != Geofence.GEOFENCE_TRANSITION_EXIT && geofenceTransition != Geofence.GEOFENCE_TRANSITION_DWELL) { + return -1; + } + return geofenceTransition; + } + /** * Returns the error code that explains the error that triggered the intent specified in * {@link #fromIntent(Intent)}. diff --git a/play-services-location/system-api/src/main/java/android/location/LocationRequest.java b/play-services-location/system-api/src/main/java/android/location/LocationRequest.java index 04530a9bc9..4d788ba92a 100644 --- a/play-services-location/system-api/src/main/java/android/location/LocationRequest.java +++ b/play-services-location/system-api/src/main/java/android/location/LocationRequest.java @@ -72,6 +72,7 @@ * * @hide */ +@SuppressWarnings("WrongConstant") public final class LocationRequest implements Parcelable { /** * Used with {@link #setQuality} to request the most accurate locations available.