@Test public void getMountedExternalStorageDirectoryPathReturnsNullWhenRemoved() { ShadowEnvironment.setExternalStorageState(Environment.MEDIA_REMOVED); assertThat(contextUtil.getMountedExternalStorageDirectoryPath(), is(nullValue())); }
public String getMountedExternalStorageDirectoryPath() { String path = null; String state = Environment.getExternalStorageState(); if (state.equals(Environment.MEDIA_MOUNTED) || state.equals(Environment.MEDIA_MOUNTED_READ_ONLY)) { path = getExternalStorageDirectoryPath(); } return path; }
AndroidContextUtil { public String getMountedExternalStorageDirectoryPath() { String path = null; String state = Environment.getExternalStorageState(); if (state.equals(Environment.MEDIA_MOUNTED) || state.equals(Environment.MEDIA_MOUNTED_READ_ONLY)) { path = getExternalStorageDirectoryPath(); } return path; } }
AndroidContextUtil { public String getMountedExternalStorageDirectoryPath() { String path = null; String state = Environment.getExternalStorageState(); if (state.equals(Environment.MEDIA_MOUNTED) || state.equals(Environment.MEDIA_MOUNTED_READ_ONLY)) { path = getExternalStorageDirectoryPath(); } return path; } AndroidContextUtil();  AndroidContextUtil(ContextWrapper contextWrapper); }
AndroidContextUtil { public String getMountedExternalStorageDirectoryPath() { String path = null; String state = Environment.getExternalStorageState(); if (state.equals(Environment.MEDIA_MOUNTED) || state.equals(Environment.MEDIA_MOUNTED_READ_ONLY)) { path = getExternalStorageDirectoryPath(); } return path; } AndroidContextUtil();  AndroidContextUtil(ContextWrapper contextWrapper); void setupProperties(LoggerContext context); String getMountedExternalStorageDirectoryPath(); @TargetApi(8) @SuppressWarnings("deprecation") String getExternalStorageDirectoryPath(); @TargetApi(8) String getExternalFilesDirectoryPath(); String getCacheDirectoryPath(); String getExternalCacheDirectoryPath(); String getPackageName(); String getFilesDirectoryPath(); @TargetApi(21) String getNoBackupFilesDirectoryPath(); String getDatabaseDirectoryPath(); String getDatabasePath(String databaseName); String getVersionCode(); String getVersionName(); }
AndroidContextUtil { public String getMountedExternalStorageDirectoryPath() { String path = null; String state = Environment.getExternalStorageState(); if (state.equals(Environment.MEDIA_MOUNTED) || state.equals(Environment.MEDIA_MOUNTED_READ_ONLY)) { path = getExternalStorageDirectoryPath(); } return path; } AndroidContextUtil();  AndroidContextUtil(ContextWrapper contextWrapper); void setupProperties(LoggerContext context); String getMountedExternalStorageDirectoryPath(); @TargetApi(8) @SuppressWarnings("deprecation") String getExternalStorageDirectoryPath(); @TargetApi(8) String getExternalFilesDirectoryPath(); String getCacheDirectoryPath(); String getExternalCacheDirectoryPath(); String getPackageName(); String getFilesDirectoryPath(); @TargetApi(21) String getNoBackupFilesDirectoryPath(); String getDatabaseDirectoryPath(); String getDatabasePath(String databaseName); String getVersionCode(); String getVersionName();  }