summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/java/android/hardware/location/NanoApp.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/core/java/android/hardware/location/NanoApp.java b/core/java/android/hardware/location/NanoApp.java
index ded1bb8c4c44..62e7182a7ccd 100644
--- a/core/java/android/hardware/location/NanoApp.java
+++ b/core/java/android/hardware/location/NanoApp.java
@@ -20,6 +20,8 @@ import android.os.Parcel;
import android.os.Parcelable;
import android.util.Log;
+import com.android.internal.util.Preconditions;
+
/** A class describing nano apps.
* A nano app is a piece of executable code that can be
* downloaded onto a specific architecture. These are targtted
@@ -195,10 +197,12 @@ public class NanoApp implements Parcelable {
* needed Sensors
*/
public void setNeededSensors(int[] neededSensors) {
+ Preconditions.checkNotNull(neededSensors, "neededSensors must not be null");
mNeededSensors = neededSensors;
}
public void setOutputEvents(int[] outputEvents) {
+ Preconditions.checkNotNull(outputEvents, "outputEvents must not be null");
mOutputEvents = outputEvents;
}
@@ -208,10 +212,10 @@ public class NanoApp implements Parcelable {
* @param appBinary generated events
*/
public void setAppBinary(byte[] appBinary) {
+ Preconditions.checkNotNull(appBinary, "appBinary must not be null");
mAppBinary = appBinary;
}
-
/**
* get the publisher name
*