Merge "Sending BATTERY_LEVEL_CHANGED when plug type changes" into pi-dev

This commit is contained in:
TreeHugger Robot
2018-08-10 21:01:52 +00:00
committed by Android (Google) Code Review

View File

@@ -625,7 +625,7 @@ public final class BatteryService extends SystemService {
// them will get the new sequence number at that point. (See for example how testing
// of JobScheduler's BatteryController works.)
sendBatteryChangedIntentLocked();
if (mLastBatteryLevel != mHealthInfo.batteryLevel) {
if (mLastBatteryLevel != mHealthInfo.batteryLevel || mLastPlugType != mPlugType) {
sendBatteryLevelChangedIntentLocked();
}