From 6cc15f046892c6f006e8635f2d7df831661f99e1 Mon Sep 17 00:00:00 2001 From: Felipe Leme Date: Tue, 25 Feb 2020 09:28:01 -0800 Subject: [PATCH] Set Process' start times for SystemServer. They're currently 0, because Process.setStartTimes() is only called by AM when binding to apps. Test: manual verification Bug: 141388849 Change-Id: I53fb4d62db06f6758c0e73138993e7d1230ea136 --- services/java/com/android/server/SystemServer.java | 1 + 1 file changed, 1 insertion(+) diff --git a/services/java/com/android/server/SystemServer.java b/services/java/com/android/server/SystemServer.java index ff8c20940c73c..c1ac55f88a9d5 100644 --- a/services/java/com/android/server/SystemServer.java +++ b/services/java/com/android/server/SystemServer.java @@ -394,6 +394,7 @@ public final class SystemServer { mStartCount = SystemProperties.getInt(SYSPROP_START_COUNT, 0) + 1; mRuntimeStartElapsedTime = SystemClock.elapsedRealtime(); mRuntimeStartUptime = SystemClock.uptimeMillis(); + Process.setStartTimes(mRuntimeStartElapsedTime, mRuntimeStartUptime); // Remember if it's runtime restart(when sys.boot_completed is already set) or reboot // We don't use "mStartCount > 1" here because it'll be wrong on a FDE device.