Merge changes from topic "presubmit-am-db1f62fddd154ef5a414bf17435d37f0" into sc-v2-dev-plus-aosp am: a6984e544a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17183360 Change-Id: I60ff7a2e0a0d59ca65342a5812c5402a29d52c47
This commit is contained in:
@@ -16,9 +16,9 @@
|
||||
|
||||
package android.hardware.location;
|
||||
|
||||
import android.os.BadParcelableException;
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
import android.util.Log;
|
||||
|
||||
/**
|
||||
* Geofence Hardware Request used for internal location services communication.
|
||||
@@ -139,11 +139,8 @@ public final class GeofenceHardwareRequestParcelable implements Parcelable {
|
||||
@Override
|
||||
public GeofenceHardwareRequestParcelable createFromParcel(Parcel parcel) {
|
||||
int geofenceType = parcel.readInt();
|
||||
if(geofenceType != GeofenceHardwareRequest.GEOFENCE_TYPE_CIRCLE) {
|
||||
Log.e(
|
||||
"GeofenceHardwareRequest",
|
||||
String.format("Invalid Geofence type: %d", geofenceType));
|
||||
return null;
|
||||
if (geofenceType != GeofenceHardwareRequest.GEOFENCE_TYPE_CIRCLE) {
|
||||
throw new BadParcelableException("Invalid Geofence type: " + geofenceType);
|
||||
}
|
||||
|
||||
GeofenceHardwareRequest request = GeofenceHardwareRequest.createCircularGeofence(
|
||||
|
||||
Reference in New Issue
Block a user