/*
 * Copyright 2016, The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.example.androidthings.loopback;

import android.os.Build;
@SuppressWarnings("WeakerAccess")
public class BoardDefaults {
    private static final String DEVICE_EDISON = "edison";
    private static final String DEVICE_RPI3 = "rpi3";
    private static final String DEVICE_NXP = "imx6ul";
    /**
     * Return the UART for loopback.
     */
    public static String getUartName() {
        switch (Build.DEVICE) {
            case DEVICE_EDISON:
                return "UART1";
            case DEVICE_RPI3:
                return "UART0";
            case DEVICE_NXP:
                return "UART3";
            default:
                throw new IllegalStateException("Unknown Build.DEVICE " + Build.DEVICE);
        }
    }
}

@@ -802,16 +802,72 @@
 dison%22;%0A
+    private static final String DEVICE_JOULE = %22joule%22;%0A
     priv
@@ -951,19 +951,20 @@
  DEVICE_
-NXP
+PICO
  = %22imx6
@@ -965,18 +965,85 @@
  %22imx6ul
-%22;
+_pico%22;%0A    private static final String DEVICE_VVDN = %22imx6ul_iopb%22;%0A
 %0A    /**
@@ -1225,16 +1225,79 @@
 UART1%22;%0A
+            case DEVICE_JOULE:%0A                return %22UART1%22;%0A
         
@@ -1378,11 +1378,12 @@
 ICE_
-NXP
+PICO
 :%0A  
@@ -1408,24 +1408,86 @@
 rn %22UART3%22;%0A
+            case DEVICE_VVDN:%0A                return %22UART2%22;%0A
             

Add BoardDefaults for Joule and NXP boards.