Java tutorial
//package com.java2s; //License from project: Open Source License import android.os.Build; import android.text.TextUtils; import java.util.Arrays; import java.util.List; public class Main { private static final String[] BLACKLISTED_AEC_MODELS = new String[] { "Nexus 5", // Nexus 5 }; public static boolean deviceInAecBlacklisted() { List<String> blackListedModels = Arrays.asList(BLACKLISTED_AEC_MODELS); for (String blackModel : blackListedModels) { String model = Build.MODEL; if (!TextUtils.isEmpty(model) && model.contains(blackModel)) { return true; } } return false; } }