Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a17b785a authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Performs null checks in NanoApp class"

parents 0ac63d74 926c7347
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -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
     *