Fix crash in battery info settings page.

- when receive package updates, check if the buttons preference is
available before trying to update the UI.

Change-Id: Ie3482b94c84cd55e9a138af4719a031f5167e089
Fixes: 74130214
Test: make RunSettingsRoboTests
This commit is contained in:
Doris Ling
2018-03-06 11:36:54 -08:00
parent 6a3bac39bf
commit b619e51baf
2 changed files with 43 additions and 20 deletions

View File

@@ -297,7 +297,9 @@ public class AppButtonsPreferenceController extends AbstractPreferenceController
@Override
public void onPackageListChanged() {
refreshUi();
if (isAvailable()) {
refreshUi();
}
}
@Override