Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b90b1627 authored by Mike Ma's avatar Mike Ma Committed by Android (Google) Code Review
Browse files

Merge "Fix strict mode violation"

parents 3a3bb157 ea357e5e
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@
package com.android.internal.os;

import android.os.Process;
import android.os.StrictMode;
import android.os.SystemClock;
import android.util.Slog;

@@ -69,6 +70,7 @@ public class KernelWakelockReader {
        boolean wakeup_sources;
        final long startTime = SystemClock.uptimeMillis();

        final int oldMask = StrictMode.allowThreadDiskReadsMask();
        try {
            FileInputStream is;
            try {
@@ -90,6 +92,8 @@ public class KernelWakelockReader {
        } catch (java.io.IOException e) {
            Slog.wtf(TAG, "failed to read kernel wakelocks", e);
            return null;
        } finally {
            StrictMode.setThreadPolicyMask(oldMask);
        }

        final long readTime = SystemClock.uptimeMillis() - startTime;