Merge "Fix Settings crash in Storage settings." into oc-dev am: 816956d249

am: bc628dfdd9

Change-Id: I47b9bd56c6a7bb6f2a640ae067623a4f5395d455
This commit is contained in:
Daniel Nishi
2017-05-08 16:53:21 +00:00
committed by android-build-merger
2 changed files with 24 additions and 0 deletions

View File

@@ -146,6 +146,14 @@ public class StorageItemPreferenceControllerTest {
ManageApplications.STORAGE_TYPE_MUSIC);
}
@Test
public void handlePreferenceTreeClick_tappingAudioWhileUninitializedDoesntCrash() {
mController.setVolume(null);
mPreference.setKey("pref_music_audio");
mController.handlePreferenceTreeClick(mPreference);
}
@Test
public void testClickApps() {
mPreference.setKey("pref_other_apps");
@@ -164,6 +172,14 @@ public class StorageItemPreferenceControllerTest {
.isEqualTo(R.string.apps_storage);
}
@Test
public void handlePreferenceTreeClick_tappingAppsWhileUninitializedDoesntCrash() {
mController.setVolume(null);
mPreference.setKey("pref_other_apps");
mController.handlePreferenceTreeClick(mPreference);
}
@Test
public void testClickFiles() {
when(mSvp.findEmulatedForPrivate(any(VolumeInfo.class))).thenReturn(mVolume);