resolved conflicts for merge of 5214dae4 to klp-dev-plus-aosp
Change-Id: I769e7acbe207b9c3a60ff1576d11b3ab40b8c66d
This commit is contained in:
@@ -450,7 +450,7 @@ public abstract class BatteryStats implements Parcelable {
|
||||
public byte batteryHealth;
|
||||
public byte batteryPlugType;
|
||||
|
||||
public char batteryTemperature;
|
||||
public short batteryTemperature;
|
||||
public char batteryVoltage;
|
||||
|
||||
// Constants from SCREEN_BRIGHTNESS_*
|
||||
@@ -527,7 +527,7 @@ public abstract class BatteryStats implements Parcelable {
|
||||
batteryHealth = (byte)((bat>>20)&0xf);
|
||||
batteryPlugType = (byte)((bat>>24)&0xf);
|
||||
bat = src.readInt();
|
||||
batteryTemperature = (char)(bat&0xffff);
|
||||
batteryTemperature = (short)(bat&0xffff);
|
||||
batteryVoltage = (char)((bat>>16)&0xffff);
|
||||
states = src.readInt();
|
||||
}
|
||||
@@ -596,7 +596,7 @@ public abstract class BatteryStats implements Parcelable {
|
||||
if (DEBUG) Slog.i(TAG, "WRITE DELTA: batteryToken=0x"
|
||||
+ Integer.toHexString(batteryLevelInt)
|
||||
+ " batteryLevel=" + batteryLevel
|
||||
+ " batteryTemp=" + (int)batteryTemperature
|
||||
+ " batteryTemp=" + batteryTemperature
|
||||
+ " batteryVolt=" + (int)batteryVoltage);
|
||||
}
|
||||
if (stateIntChanged) {
|
||||
@@ -611,8 +611,8 @@ public abstract class BatteryStats implements Parcelable {
|
||||
}
|
||||
|
||||
private int buildBatteryLevelInt() {
|
||||
return ((((int)batteryLevel)<<24)&0xff000000)
|
||||
| ((((int)batteryTemperature)<<14)&0x00ffc000)
|
||||
return ((((int)batteryLevel)<<25)&0xfe000000)
|
||||
| ((((int)batteryTemperature)<<14)&0x01ffc000)
|
||||
| (((int)batteryVoltage)&0x00003fff);
|
||||
}
|
||||
|
||||
@@ -648,13 +648,13 @@ public abstract class BatteryStats implements Parcelable {
|
||||
|
||||
if ((firstToken&DELTA_BATTERY_LEVEL_FLAG) != 0) {
|
||||
int batteryLevelInt = src.readInt();
|
||||
batteryLevel = (byte)((batteryLevelInt>>24)&0xff);
|
||||
batteryTemperature = (char)((batteryLevelInt>>14)&0x3ff);
|
||||
batteryLevel = (byte)((batteryLevelInt>>25)&0x7f);
|
||||
batteryTemperature = (short)((batteryLevelInt<<7)>>21);
|
||||
batteryVoltage = (char)(batteryLevelInt&0x3fff);
|
||||
if (DEBUG) Slog.i(TAG, "READ DELTA: batteryToken=0x"
|
||||
+ Integer.toHexString(batteryLevelInt)
|
||||
+ " batteryLevel=" + batteryLevel
|
||||
+ " batteryTemp=" + (int)batteryTemperature
|
||||
+ " batteryTemp=" + batteryTemperature
|
||||
+ " batteryVolt=" + (int)batteryVoltage);
|
||||
}
|
||||
|
||||
|
||||
@@ -84,7 +84,7 @@ public final class BatteryStatsImpl extends BatteryStats {
|
||||
private static final int MAGIC = 0xBA757475; // 'BATSTATS'
|
||||
|
||||
// Current on-disk Parcel version
|
||||
private static final int VERSION = 66 + (USE_OLD_HISTORY ? 1000 : 0);
|
||||
private static final int VERSION = 67 + (USE_OLD_HISTORY ? 1000 : 0);
|
||||
|
||||
// Maximum number of items we will record in the history.
|
||||
private static final int MAX_HISTORY_ITEMS = 2000;
|
||||
@@ -4721,7 +4721,7 @@ public final class BatteryStatsImpl extends BatteryStats {
|
||||
mHistoryCur.batteryStatus = (byte)status;
|
||||
mHistoryCur.batteryHealth = (byte)health;
|
||||
mHistoryCur.batteryPlugType = (byte)plugType;
|
||||
mHistoryCur.batteryTemperature = (char)temp;
|
||||
mHistoryCur.batteryTemperature = (short)temp;
|
||||
mHistoryCur.batteryVoltage = (char)volt;
|
||||
setOnBatteryLocked(onBattery, oldStatus, level);
|
||||
} else {
|
||||
@@ -4744,7 +4744,7 @@ public final class BatteryStatsImpl extends BatteryStats {
|
||||
}
|
||||
if (temp >= (mHistoryCur.batteryTemperature+10)
|
||||
|| temp <= (mHistoryCur.batteryTemperature-10)) {
|
||||
mHistoryCur.batteryTemperature = (char)temp;
|
||||
mHistoryCur.batteryTemperature = (short)temp;
|
||||
changed = true;
|
||||
}
|
||||
if (volt > (mHistoryCur.batteryVoltage+20)
|
||||
|
||||
Reference in New Issue
Block a user