auto import from //depot/cupcake/@132589
This commit is contained in:
@@ -70,13 +70,15 @@ public final class BatteryStatsService extends IBatteryStats.Stub {
|
||||
public byte[] getStatistics() {
|
||||
mContext.enforceCallingPermission(
|
||||
android.Manifest.permission.BATTERY_STATS, null);
|
||||
//Log.i("foo", "SENDING BATTERY INFO:");
|
||||
//mStats.dumpLocked(new LogPrinter(Log.INFO, "foo"));
|
||||
Parcel out = Parcel.obtain();
|
||||
mStats.writeToParcel(out, 0);
|
||||
byte[] data = out.marshall();
|
||||
out.recycle();
|
||||
return data;
|
||||
synchronized (mStats) {
|
||||
//Log.i("foo", "SENDING BATTERY INFO:");
|
||||
//mStats.dumpLocked(new LogPrinter(Log.INFO, "foo"));
|
||||
Parcel out = Parcel.obtain();
|
||||
mStats.writeToParcel(out, 0);
|
||||
byte[] data = out.marshall();
|
||||
out.recycle();
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
public void noteStartWakelock(int uid, String name, int type) {
|
||||
@@ -135,20 +137,6 @@ public final class BatteryStatsService extends IBatteryStats.Stub {
|
||||
}
|
||||
}
|
||||
|
||||
public void notePhoneOn() {
|
||||
enforceCallingPermission();
|
||||
synchronized (mStats) {
|
||||
mStats.notePhoneOnLocked();
|
||||
}
|
||||
}
|
||||
|
||||
public void notePhoneOff() {
|
||||
enforceCallingPermission();
|
||||
synchronized (mStats) {
|
||||
mStats.notePhoneOffLocked();
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isOnBattery() {
|
||||
return mStats.isOnBattery();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user