Merge "Add null check when restart batteryinfo loader" into qt-dev

This commit is contained in:
Lei Yu
2019-05-08 20:18:11 +00:00
committed by Android (Google) Code Review
2 changed files with 15 additions and 0 deletions

View File

@@ -378,6 +378,9 @@ public class PowerUsageSummary extends PowerUsageBase implements OnLongClickList
@VisibleForTesting
void restartBatteryInfoLoader() {
if (getContext() == null) {
return;
}
getLoaderManager().restartLoader(BATTERY_INFO_LOADER, Bundle.EMPTY,
mBatteryInfoLoaderCallbacks);
if (mPowerFeatureProvider.isEstimateDebugEnabled()) {