// Path: app/src/main/java/com/adafruit/bluefruit/le/connect/utils/FileUtils.java
// public class FileUtils {
// 
//     public static String readAssetsFile(String filename, AssetManager assetManager) {
//         String result = null;
// 
//         try {
//             InputStream is = assetManager.open(filename);
//             int size = is.available();
// 
//             byte[] buffer = new byte[size];
//             is.read(buffer);
//             is.close();
// 
//             result = new String(buffer, "UTF-8");
// 
//         } catch (IOException e) {
//             e.printStackTrace();
//         }
// 
//         return result;
//     }
// 
//     public static String copyAssetFile(AssetManager assetManager, String inputFilename, String outputFilename) {
// 
//         String outPath = null;
// 
//         try {
//             InputStream input = assetManager.open(inputFilename);
// 
//             // Create new file to copy into.
//             outPath = Environment.getExternalStorageDirectory() + java.io.File.separator + outputFilename;
//             File outFile = new File(outPath);
//             OutputStream output = new FileOutputStream(outFile);
//             copyFile(input, output);
//             input.close();
//             output.flush();
//             output.close();
// 
//         } catch (IOException e) {
//             e.printStackTrace();
//         }
// 
//         return outPath;
//     }
// 
//     private static void copyFile(InputStream in, OutputStream out) throws IOException {
//         byte[] buffer = new byte[1024];
//         int read;
//         while ((read = in.read(buffer)) != -1) {
//             out.write(buffer, 0, read);
//         }
//     }
// }


import android.content.DialogInterface;
import android.content.Intent;
import android.content.res.Configuration;
import android.os.Bundle;
import android.support.v7.app.AlertDialog;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.text.InputType;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.EditText;
import com.adafruit.bluefruit.le.connect.utils.FileUtils;
import com.adafruit.bluefruit.le.connect.R;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import java.io.File;
import java.util.ArrayList;
import java.util.List;
                    Log.d(TAG, "Cannot parse value");
                }

                Intent output = new Intent();
                output.putExtra(kActivityResult_LineStripResultKey, value);
                setResult(RESULT_OK, output);
                finish();
            }
        });
        alert.setNegativeButton(android.R.string.cancel, new DialogInterface.OnClickListener() {
            public void onClick(DialogInterface dialog, int whichButton) {
            }
        });
        alert.show();
    }

    // region BoardSizesAdapter
    public class StandardBoardSizesAdapter extends RecyclerView.Adapter<StandardBoardSizesAdapter.ViewHolder> {

        public class ViewHolder extends RecyclerView.ViewHolder {
            public Button mItem;

            public ViewHolder(ViewGroup view) {
                super(view);
                mItem = (Button) view.findViewById(R.id.itemView);
            }
        }

        @Override
        public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
// Path: app/src/main/java/com/adafruit/bluefruit/le/connect/utils/FileUtils.java
// public class FileUtils {
// 
//     public static String readAssetsFile(String filename, AssetManager assetManager) {
//         String result = null;
// 
//         try {
//             InputStream is = assetManager.open(filename);
//             int size = is.available();
// 
//             byte[] buffer = new byte[size];
//             is.read(buffer);
//             is.close();
// 
//             result = new String(buffer, "UTF-8");
// 
//         } catch (IOException e) {
//             e.printStackTrace();
//         }
// 
//         return result;
//     }
// 
//     public static String copyAssetFile(AssetManager assetManager, String inputFilename, String outputFilename) {
// 
//         String outPath = null;
// 
//         try {
//             InputStream input = assetManager.open(inputFilename);
// 
//             // Create new file to copy into.
//             outPath = Environment.getExternalStorageDirectory() + java.io.File.separator + outputFilename;
//             File outFile = new File(outPath);
//             OutputStream output = new FileOutputStream(outFile);
//             copyFile(input, output);
//             input.close();
//             output.flush();
//             output.close();
// 
//         } catch (IOException e) {
//             e.printStackTrace();
//         }
// 
//         return outPath;
//     }
// 
//     private static void copyFile(InputStream in, OutputStream out) throws IOException {
//         byte[] buffer = new byte[1024];
//         int read;
//         while ((read = in.read(buffer)) != -1) {
//             out.write(buffer, 0, read);
//         }
//     }
// }


// Path: app/src/main/java/com/adafruit/bluefruit/le/connect/app/neopixel/NeopixelBoardSelectorActivity.java
import android.content.DialogInterface;
import android.content.Intent;
import android.content.res.Configuration;
import android.os.Bundle;
import android.support.v7.app.AlertDialog;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.text.InputType;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.EditText;
import com.adafruit.bluefruit.le.connect.utils.FileUtils;
import com.adafruit.bluefruit.le.connect.R;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import java.io.File;
import java.util.ArrayList;
import java.util.List;

                    Log.d(TAG, "Cannot parse value");
                }

                Intent output = new Intent();
                output.putExtra(kActivityResult_LineStripResultKey, value);
                setResult(RESULT_OK, output);
                finish();
            }
        });
        alert.setNegativeButton(android.R.string.cancel, new DialogInterface.OnClickListener() {
            public void onClick(DialogInterface dialog, int whichButton) {
            }
        });
        alert.show();
    }

    // region BoardSizesAdapter
    public class StandardBoardSizesAdapter extends RecyclerView.Adapter<StandardBoardSizesAdapter.ViewHolder> {

        public class ViewHolder extends RecyclerView.ViewHolder {
            public Button mItem;

            public ViewHolder(ViewGroup view) {
                super(view);
                mItem = (Button) view.findViewById(R.id.itemView);
            }
        }

        @Override
        public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
            ViewGroup view = (ViewGroup) LayoutInflater.from(parent.getContext()).inflate(R.layout.layout_neopixel_list_item, parent, false);