Code example for ArrayList

Methods: add, contains

0
	return new File(String.format(SDCARD_FOLDER_CACHE, context.getPackageName()));
    } 
 
    public static boolean hasImageCaptureBug() { 
	// list of known devices that have the bug 
	ArrayList<String> devices = new ArrayList<String>();
	devices.add("android-devphone1/dream_devphone/dream");
	devices.add("generic/sdk/generic");
	devices.add("vodafone/vfpioneer/sapphire");
	devices.add("tmobile/kila/dream");
	devices.add("verizon/voles/sholes");
	devices.add("google_ion/google_ion/sapphire");
	devices.add("SEMC/X10i_1232-9897/X10i");
 
	return devices.contains(android.os.Build.BRAND + "/" + android.os.Build.PRODUCT + "/"
		+ android.os.Build.DEVICE);
    } 
 
    public static String getPath(Context context, Uri uri) throws NullPointerException {
	final String[] projection = { MediaColumns.DATA };
	final Cursor cursor = context.getContentResolver().query(uri, projection, null, null, null);