summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorDavid Christie <dnchrist@google.com>2022-03-21 23:20:00 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2022-03-21 23:20:00 +0000
commite6213b83f8bad41f9aa7df62fb67751761892b3e (patch)
tree438d17a23142eb4bc8c589d710b9653507a6d96e /core
parent2fc134a7630fe868d0eba53b86ee06275eb16cff (diff)
parent65b062a9a59fda6fa1df485075fe9a4693785244 (diff)
Merge "Update GeofenceHardwareRequestParcelable to match parcel/unparcel format." into sc-qpr1-dev
Diffstat (limited to 'core')
-rw-r--r--core/java/android/hardware/location/GeofenceHardwareRequestParcelable.java9
1 files changed, 3 insertions, 6 deletions
diff --git a/core/java/android/hardware/location/GeofenceHardwareRequestParcelable.java b/core/java/android/hardware/location/GeofenceHardwareRequestParcelable.java
index df13ade2bf5e..bd25b8f2ad88 100644
--- a/core/java/android/hardware/location/GeofenceHardwareRequestParcelable.java
+++ b/core/java/android/hardware/location/GeofenceHardwareRequestParcelable.java
@@ -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(