@Test public void isStorePictureAvailable_whenPermissionDenied_shouldReturnFalse() throws Exception { Robolectric.getShadowApplication().denyPermissions(Manifest.permission.WRITE_EXTERNAL_STORAGE); ShadowEnvironment.setExternalStorageState(Environment.MEDIA_MOUNTED); assertThat(subject.isStorePictureSupported(context)).isFalse(); }
public static boolean isStorePictureSupported(Context context) { return MEDIA_MOUNTED.equals(Environment.getExternalStorageState()) && context.checkCallingOrSelfPermission(WRITE_EXTERNAL_STORAGE) == PackageManager.PERMISSION_GRANTED; }
MraidNativeCommandHandler { public static boolean isStorePictureSupported(Context context) { return MEDIA_MOUNTED.equals(Environment.getExternalStorageState()) && context.checkCallingOrSelfPermission(WRITE_EXTERNAL_STORAGE) == PackageManager.PERMISSION_GRANTED; } }
MraidNativeCommandHandler { public static boolean isStorePictureSupported(Context context) { return MEDIA_MOUNTED.equals(Environment.getExternalStorageState()) && context.checkCallingOrSelfPermission(WRITE_EXTERNAL_STORAGE) == PackageManager.PERMISSION_GRANTED; }  }
MraidNativeCommandHandler { public static boolean isStorePictureSupported(Context context) { return MEDIA_MOUNTED.equals(Environment.getExternalStorageState()) && context.checkCallingOrSelfPermission(WRITE_EXTERNAL_STORAGE) == PackageManager.PERMISSION_GRANTED; }  static boolean isStorePictureSupported(Context context); }
MraidNativeCommandHandler { public static boolean isStorePictureSupported(Context context) { return MEDIA_MOUNTED.equals(Environment.getExternalStorageState()) && context.checkCallingOrSelfPermission(WRITE_EXTERNAL_STORAGE) == PackageManager.PERMISSION_GRANTED; }  static boolean isStorePictureSupported(Context context); static final String ANDROID_CALENDAR_CONTENT_TYPE; }