am 58adc7ad: Merge "Send BATTERY_CHANGED if maxChargingCurrent changes" into mnc-dr-dev
* commit '58adc7ad48990f2ffa0d4858bd6910dd9eb6aabc': Send BATTERY_CHANGED if maxChargingCurrent changes
This commit is contained in:
@@ -1232,6 +1232,12 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener {
|
|||||||
if (!nowPluggedIn && current.isBatteryLow() && current.level != old.level) {
|
if (!nowPluggedIn && current.isBatteryLow() && current.level != old.level) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// change in charging current while plugged in
|
||||||
|
if (nowPluggedIn && current.maxChargingCurrent != old.maxChargingCurrent) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -164,7 +164,7 @@ public class KeyguardIndicationController {
|
|||||||
if (mPowerPluggedIn) {
|
if (mPowerPluggedIn) {
|
||||||
String indication = computePowerIndication();
|
String indication = computePowerIndication();
|
||||||
if (DEBUG_CHARGING_CURRENT) {
|
if (DEBUG_CHARGING_CURRENT) {
|
||||||
indication = indication + mChargingCurrent;
|
indication += ", " + (mChargingCurrent / 1000) + " mA";
|
||||||
}
|
}
|
||||||
return indication;
|
return indication;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -120,6 +120,7 @@ public final class BatteryService extends SystemService {
|
|||||||
private int mLastBatteryVoltage;
|
private int mLastBatteryVoltage;
|
||||||
private int mLastBatteryTemperature;
|
private int mLastBatteryTemperature;
|
||||||
private boolean mLastBatteryLevelCritical;
|
private boolean mLastBatteryLevelCritical;
|
||||||
|
private int mLastMaxChargingCurrent;
|
||||||
|
|
||||||
private int mInvalidCharger;
|
private int mInvalidCharger;
|
||||||
private int mLastInvalidCharger;
|
private int mLastInvalidCharger;
|
||||||
@@ -354,6 +355,7 @@ public final class BatteryService extends SystemService {
|
|||||||
mPlugType != mLastPlugType ||
|
mPlugType != mLastPlugType ||
|
||||||
mBatteryProps.batteryVoltage != mLastBatteryVoltage ||
|
mBatteryProps.batteryVoltage != mLastBatteryVoltage ||
|
||||||
mBatteryProps.batteryTemperature != mLastBatteryTemperature ||
|
mBatteryProps.batteryTemperature != mLastBatteryTemperature ||
|
||||||
|
mBatteryProps.maxChargingCurrent != mLastMaxChargingCurrent ||
|
||||||
mInvalidCharger != mLastInvalidCharger)) {
|
mInvalidCharger != mLastInvalidCharger)) {
|
||||||
|
|
||||||
if (mPlugType != mLastPlugType) {
|
if (mPlugType != mLastPlugType) {
|
||||||
@@ -480,6 +482,7 @@ public final class BatteryService extends SystemService {
|
|||||||
mLastPlugType = mPlugType;
|
mLastPlugType = mPlugType;
|
||||||
mLastBatteryVoltage = mBatteryProps.batteryVoltage;
|
mLastBatteryVoltage = mBatteryProps.batteryVoltage;
|
||||||
mLastBatteryTemperature = mBatteryProps.batteryTemperature;
|
mLastBatteryTemperature = mBatteryProps.batteryTemperature;
|
||||||
|
mLastMaxChargingCurrent = mBatteryProps.maxChargingCurrent;
|
||||||
mLastBatteryLevelCritical = mBatteryLevelCritical;
|
mLastBatteryLevelCritical = mBatteryLevelCritical;
|
||||||
mLastInvalidCharger = mInvalidCharger;
|
mLastInvalidCharger = mInvalidCharger;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user