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

am: 8cb78fcb1e

Change-Id: Ia52e29c61038388525f4375917b9d5763bcd1fc3
This commit is contained in:
Suprabh Shukla
2018-08-10 14:09:44 -07:00
committed by android-build-merger

View File

@@ -624,7 +624,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();
}