Use correct lock for reading/writing usage stats files

Bug: 25355086
Change-Id: I65946e5afa841215f161fc25ad70b31a108a33c3
This commit is contained in:
Amith Yamasani
2015-11-11 12:46:02 -08:00
parent 669692234b
commit ccf7d9e8ce

View File

@@ -215,11 +215,11 @@ public class UsageStatsService extends SystemService implements
mPowerManager = getContext().getSystemService(PowerManager.class);
mScreenOnSystemTimeSnapshot = System.currentTimeMillis();
synchronized (this) {
synchronized (mLock) {
mScreenOnTime = readScreenOnTimeLocked();
}
mDisplayManager.registerDisplayListener(mDisplayListener, mHandler);
synchronized (this) {
synchronized (mLock) {
updateDisplayLocked();
}
} else if (phase == PHASE_BOOT_COMPLETED) {