Split loading process for battery header
This cl creates BatteryHeaderPreferenceController, which will first load the battery level in ui thread(in displayPreference()), then display the remaining time once we get the battery stats. This is the best we can do to avoid ui flashing while removing the animation Bug: 38349587 Test: RunSettingsRoboTests Change-Id: Ic3622bb73562ba42e69b37e5674a724c03c45f12
This commit is contained in:
@@ -72,6 +72,10 @@ public class BatteryMeterView extends ImageView {
|
||||
}
|
||||
}
|
||||
|
||||
public int getBatteryLevel() {
|
||||
return mDrawable.getBatteryLevel();
|
||||
}
|
||||
|
||||
public void setCharging(boolean charging) {
|
||||
mDrawable.setCharging(charging);
|
||||
}
|
||||
|
Reference in New Issue
Block a user