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

Commit 78b02111 authored by Misha Wagner's avatar Misha Wagner Committed by Android (Google) Code Review
Browse files

Merge "Reduce amount of logging on failed proc file reading"

parents 9c8c89f7 cf7a07d0
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -173,7 +173,7 @@ public class KernelCpuThreadReader {
                }
            }
        } catch (IOException e) {
            Slog.w(TAG, "Failed to iterate over thread paths", e);
            // Expected when a process finishes
            return null;
        }

+5 −1
Original line number Diff line number Diff line
@@ -32,6 +32,8 @@ import java.io.IOException;
@VisibleForTesting(visibility = VisibleForTesting.Visibility.PROTECTED)
public final class ProcStatsUtil {

    private static final boolean DEBUG = false;

    private static final String TAG = "ProcStatsUtil";

    /**
@@ -141,7 +143,9 @@ public final class ProcStatsUtil {
            }
            return byteStream.toString();
        } catch (IOException e) {
            Slog.w(TAG, "Failed to open proc file", e);
            if (DEBUG) {
                Slog.d(TAG, "Failed to open proc file", e);
            }
            return null;
        } finally {
            StrictMode.setThreadPolicy(savedPolicy);