Don't shows Files when storage is adopted.
One regression from the previous storage view is that the Files category should not show at all when the storage is adopted. Fixes: 36786953 Test: Settings robotest Change-Id: Ice365fabc3bfa66f4c5526ac78bbbfc5e15b7b35
This commit is contained in:
@@ -214,6 +214,15 @@ public class StorageItemPreferenceController extends PreferenceController {
|
||||
mAppPreference = (StorageItemPreference) screen.findPreference(OTHER_APPS_KEY);
|
||||
mSystemPreference = (StorageItemPreference) screen.findPreference(SYSTEM_KEY);
|
||||
mFilePreference = (StorageItemPreference) screen.findPreference(FILES_KEY);
|
||||
|
||||
final VolumeInfo sharedVolume = mSvp.findEmulatedForPrivate(mVolume);
|
||||
// If we don't have a shared volume for our internal storage (or the shared volume isn't
|
||||
// mounted as readable for whatever reason), we should hide the File preference.
|
||||
final boolean hideFilePreference =
|
||||
(sharedVolume == null) || !sharedVolume.isMountedReadable();
|
||||
if (hideFilePreference) {
|
||||
screen.removePreference(mFilePreference);
|
||||
}
|
||||
}
|
||||
|
||||
public void onLoadFinished(StorageAsyncLoader.AppsStorageResult data) {
|
||||
|
Reference in New Issue
Block a user