Show charging speed on Keyguard

Bug: 8099739
Change-Id: I2e5c21dd7ec028ce47fb03ab71e74f7fccaa9e36
This commit is contained in:
Adrian Roos 2015-07-10 13:08:28 -07:00
parent 3f8fbfdb9b
commit 687aa22c92
2 changed files with 3 additions and 0 deletions

View File

@ -57,6 +57,7 @@ struct BatteryProperties {
bool chargerAcOnline;
bool chargerUsbOnline;
bool chargerWirelessOnline;
int maxChargingCurrent;
int batteryStatus;
int batteryHealth;
bool batteryPresent;

View File

@ -33,6 +33,7 @@ status_t BatteryProperties::readFromParcel(Parcel* p) {
chargerAcOnline = p->readInt32() == 1 ? true : false;
chargerUsbOnline = p->readInt32() == 1 ? true : false;
chargerWirelessOnline = p->readInt32() == 1 ? true : false;
maxChargingCurrent = p->readInt32();
batteryStatus = p->readInt32();
batteryHealth = p->readInt32();
batteryPresent = p->readInt32() == 1 ? true : false;
@ -47,6 +48,7 @@ status_t BatteryProperties::writeToParcel(Parcel* p) const {
p->writeInt32(chargerAcOnline ? 1 : 0);
p->writeInt32(chargerUsbOnline ? 1 : 0);
p->writeInt32(chargerWirelessOnline ? 1 : 0);
p->writeInt32(maxChargingCurrent);
p->writeInt32(batteryStatus);
p->writeInt32(batteryHealth);
p->writeInt32(batteryPresent ? 1 : 0);