Merge "Do not retrive app detail if the fragment is exiting." into qt-dev

This commit is contained in:
TreeHugger Robot
2019-04-09 21:19:24 +00:00
committed by Android (Google) Code Review
2 changed files with 11 additions and 3 deletions

View File

@@ -281,6 +281,13 @@ public final class AppInfoDashboardFragmentTest {
assertThat(mFragment.createPreferenceControllers(mShadowContext)).isNull();
}
@Test
public void getPreferenceControllers_exiting_shouldReturnNull() {
mFragment.mFinishing = true;
assertThat(mFragment.createPreferenceControllers(mShadowContext)).isNull();
}
@Test
public void getNumberOfUserWithPackageInstalled_twoUsersInstalled_shouldReturnTwo()
throws PackageManager.NameNotFoundException {