Merge "Show charging speed on Keyguard" into mnc-dr-dev

This commit is contained in:
Adrian Roos 2015-07-14 19:17:00 +00:00 committed by Android (Google) Code Review
commit 31e138db15
2 changed files with 3 additions and 0 deletions

View File

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

View File

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