Find graceful description when missing disk.

Certain volumes (like internal storage) don't have a corresponding
DiskInfo object, so we need to fall back to using the VolumeInfo
description instead.

Bug: 77991425
Test: atest com.android.settings.ui.StorageWizardTest
Change-Id: I92d377035b6028dd31527100da54bfb1d1828ae9
This commit is contained in:
Jeff Sharkey
2018-04-19 09:45:29 -06:00
parent 68ef601059
commit d98de2e2da
6 changed files with 35 additions and 14 deletions

View File

@@ -45,7 +45,7 @@ public class StorageWizardInit extends StorageWizardBase {
mIsPermittedToAdopt = UserManager.get(this).isAdminUser()
&& !ActivityManager.isUserAMonkey();
setHeaderText(R.string.storage_wizard_init_v2_title, mDisk.getShortDescription());
setHeaderText(R.string.storage_wizard_init_v2_title, getDiskShortDescription());
mExternal = requireViewById(R.id.storage_wizard_init_external);
mInternal = requireViewById(R.id.storage_wizard_init_internal);