Merge "Fix crash in Monkey test." into pi-dev am: d95668db99

am: 85f6fd4a1f

Change-Id: Ib8c62963b09e938143fd9382622ea3843cd88be5
This commit is contained in:
Lei Yu
2018-04-05 11:40:23 -07:00
committed by android-build-merger
2 changed files with 16 additions and 1 deletions

View File

@@ -91,6 +91,9 @@ public class BatteryTipPreferenceController extends BasePreferenceController {
}
public void updateBatteryTips(List<BatteryTip> batteryTips) {
if (batteryTips == null) {
return;
}
if (mBatteryTips == null) {
mBatteryTips = batteryTips;
} else {
@@ -100,7 +103,6 @@ public class BatteryTipPreferenceController extends BasePreferenceController {
}
}
//TODO(b/70570352): try to reuse the existing preference rather than remove and add.
mPreferenceGroup.removeAll();
for (int i = 0, size = batteryTips.size(); i < size; i++) {
final BatteryTip batteryTip = mBatteryTips.get(i);