Fix storage settings crash.

It may crash if opened during the uninstall of an app. By catching
the exception which may occur, we can just skip the uninstalled app
and avoid crashing.

Change-Id: I1b96b0697f4041be356260d6c675593affc1cb69
Merged-In: If556db7b5a299ba53a29baefbbe9709ba6d12190
Fixes: 36793223
Fixes: 36793372
Test: Settings unit test
This commit is contained in:
Daniel Nishi
2017-03-30 18:02:16 -07:00
parent ba7a4751a0
commit 95261b9239
3 changed files with 24 additions and 3 deletions

View File

@@ -117,7 +117,7 @@ public class StorageDashboardFragment extends DashboardFragment
@Override
public void onResume() {
super.onResume();
getLoaderManager().initLoader(STORAGE_JOB_ID, Bundle.EMPTY, this);
getLoaderManager().restartLoader(STORAGE_JOB_ID, Bundle.EMPTY, this);
getLoaderManager().initLoader(ICON_JOB_ID, Bundle.EMPTY, new IconLoaderCallbacks());
}