Use new VolumeInfo helper methods.

Makes it clearer if we're checking for readable/writable state,
and puts emulated/private conversion logic in single place.

Bug: 19993667
Change-Id: I953f5c184ca62afc631d855e64cd8a4972320148
This commit is contained in:
Jeff Sharkey
2015-04-18 16:22:10 -07:00
parent e0a14922ea
commit 90daa80c5b
5 changed files with 16 additions and 19 deletions

View File

@@ -186,7 +186,7 @@ public class StorageSettings extends SettingsPreferenceFragment implements Index
return true;
} else if (vol.getType() == VolumeInfo.TYPE_PUBLIC) {
if (vol.getState() == VolumeInfo.STATE_MOUNTED) {
if (vol.isMountedReadable()) {
startActivity(vol.buildBrowseIntent());
return true;
} else {