summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/java/com/android/internal/os/BatteryStatsImpl.java2
-rw-r--r--services/core/java/com/android/server/power/PowerManagerService.java3
2 files changed, 5 insertions, 0 deletions
diff --git a/core/java/com/android/internal/os/BatteryStatsImpl.java b/core/java/com/android/internal/os/BatteryStatsImpl.java
index 39636fe..4c11fa9 100644
--- a/core/java/com/android/internal/os/BatteryStatsImpl.java
+++ b/core/java/com/android/internal/os/BatteryStatsImpl.java
@@ -574,6 +574,7 @@ public final class BatteryStatsImpl extends BatteryStats {
mUptime = in.readLong();
mPastUptime = in.readLong();
mUptimeStart = in.readLong();
+ mRealtime = in.readLong();
mPastRealtime = in.readLong();
mRealtimeStart = in.readLong();
mUnpluggedUptime = in.readLong();
@@ -586,6 +587,7 @@ public final class BatteryStatsImpl extends BatteryStats {
out.writeLong(mUptime);
out.writeLong(runningUptime);
out.writeLong(mUptimeStart);
+ out.writeLong(mRealtime);
out.writeLong(runningRealtime);
out.writeLong(mRealtimeStart);
out.writeLong(mUnpluggedUptime);
diff --git a/services/core/java/com/android/server/power/PowerManagerService.java b/services/core/java/com/android/server/power/PowerManagerService.java
index a388318..80c3c8e 100644
--- a/services/core/java/com/android/server/power/PowerManagerService.java
+++ b/services/core/java/com/android/server/power/PowerManagerService.java
@@ -2541,6 +2541,9 @@ public final class PowerManagerService extends com.android.server.SystemService
@Override // Binder call
public void acquireWakeLockWithUid(IBinder lock, int flags, String tag,
String packageName, int uid) {
+ if (uid < 0) {
+ uid = Binder.getCallingUid();
+ }
acquireWakeLock(lock, flags, tag, packageName, new WorkSource(uid), null);
}