Merge "Add NPE check for refreshUi" into oc-dev am: 1a8c2dd899

am: 9e56dd44cd

Change-Id: Id487b717c57c211f9a80f584bd518b6b5267d480
This commit is contained in:
Lei Yu
2017-05-25 20:21:19 +00:00
committed by android-build-merger
2 changed files with 17 additions and 5 deletions

View File

@@ -344,6 +344,14 @@ public class AppButtonsPreferenceControllerTest {
assertThat(controllable).isTrue();
}
@Test
public void testRefreshUi_packageNull_shouldNotCrash() {
mController.mPackageName = null;
// Should not crash in this method
assertThat(mController.refreshUi()).isFalse();
}
/**
* The test fragment which implements
* {@link ButtonActionDialogFragment.AppButtonsDialogListener}