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

Commit 926c7347 authored by Arthur Ishiguro's avatar Arthur Ishiguro
Browse files

Performs null checks in NanoApp class

Bug: 37274672
Test: Compile only
Change-Id: I5a82edd2f7a99a05c26c72b09872e964dbffd935
parent 2c87f2ea
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
     *