Loading core/java/com/android/internal/os/KernelWakelockReader.java +19 −13 Original line number Diff line number Diff line Loading @@ -78,6 +78,8 @@ public class KernelWakelockReader { boolean useSystemSuspend = (new File(sSysClassWakeupDir)).exists(); if (useSystemSuspend) { // static read/write lock protection for sKernelWakelockUpdateVersion synchronized (KernelWakelockReader.class) { // Get both kernel and native wakelock stats from SystemSuspend updateVersion(staleStats); if (getWakelockStatsFromSystemSuspend(staleStats) == null) { Loading @@ -85,6 +87,7 @@ public class KernelWakelockReader { return null; } return removeOldStats(staleStats); } } else { Arrays.fill(mKernelWakelockBuffer, (byte) 0); int len = 0; Loading Loading @@ -141,6 +144,8 @@ public class KernelWakelockReader { } } // static read/write lock protection for sKernelWakelockUpdateVersion synchronized (KernelWakelockReader.class) { updateVersion(staleStats); // Get native wakelock stats from SystemSuspend if (getWakelockStatsFromSystemSuspend(staleStats) == null) { Loading @@ -151,6 +156,7 @@ public class KernelWakelockReader { return removeOldStats(staleStats); } } } /** * Attempt to wait for suspend_control service if not immediately available. Loading Loading
core/java/com/android/internal/os/KernelWakelockReader.java +19 −13 Original line number Diff line number Diff line Loading @@ -78,6 +78,8 @@ public class KernelWakelockReader { boolean useSystemSuspend = (new File(sSysClassWakeupDir)).exists(); if (useSystemSuspend) { // static read/write lock protection for sKernelWakelockUpdateVersion synchronized (KernelWakelockReader.class) { // Get both kernel and native wakelock stats from SystemSuspend updateVersion(staleStats); if (getWakelockStatsFromSystemSuspend(staleStats) == null) { Loading @@ -85,6 +87,7 @@ public class KernelWakelockReader { return null; } return removeOldStats(staleStats); } } else { Arrays.fill(mKernelWakelockBuffer, (byte) 0); int len = 0; Loading Loading @@ -141,6 +144,8 @@ public class KernelWakelockReader { } } // static read/write lock protection for sKernelWakelockUpdateVersion synchronized (KernelWakelockReader.class) { updateVersion(staleStats); // Get native wakelock stats from SystemSuspend if (getWakelockStatsFromSystemSuspend(staleStats) == null) { Loading @@ -151,6 +156,7 @@ public class KernelWakelockReader { return removeOldStats(staleStats); } } } /** * Attempt to wait for suspend_control service if not immediately available. Loading