From adea009d8666b944fd5aaa410d4d7982508275d3 Mon Sep 17 00:00:00 2001 From: Makoto Onuki Date: Wed, 12 Jul 2023 13:05:17 -0700 Subject: [PATCH] Add 6 more fields to ForegroundServiceStateChanged Bug: 276963716 Test: Build Change-Id: I53bc79fd5490d33756a58708b65c65e0475d5050 --- .../com/android/server/am/ActiveServices.java | 8 +++++++- .../am/ForegroundServiceTypeLoggerModule.java | 16 ++++++++++++++-- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/services/core/java/com/android/server/am/ActiveServices.java b/services/core/java/com/android/server/am/ActiveServices.java index 7d46c0cd075fd..d959de33d3e9e 100644 --- a/services/core/java/com/android/server/am/ActiveServices.java +++ b/services/core/java/com/android/server/am/ActiveServices.java @@ -8166,7 +8166,13 @@ public final class ActiveServices { mAm.getUidStateLocked(r.mRecentCallingUid), mAm.getUidProcessCapabilityLocked(r.mRecentCallingUid), 0, - 0); + 0, + r.mAllowWhileInUsePermissionInFgsReasonNoBinding, + r.mAllowWIUInBindService, + r.mAllowWIUByBindings, + r.mAllowStartForegroundNoBinding, + r.mAllowStartInBindService, + r.mAllowStartByBindings); int event = 0; if (state == FOREGROUND_SERVICE_STATE_CHANGED__STATE__ENTER) { diff --git a/services/core/java/com/android/server/am/ForegroundServiceTypeLoggerModule.java b/services/core/java/com/android/server/am/ForegroundServiceTypeLoggerModule.java index 4f5b5e1fbd68e..786e1cc7075f2 100644 --- a/services/core/java/com/android/server/am/ForegroundServiceTypeLoggerModule.java +++ b/services/core/java/com/android/server/am/ForegroundServiceTypeLoggerModule.java @@ -506,7 +506,13 @@ public class ForegroundServiceTypeLoggerModule { ActivityManager.PROCESS_STATE_UNKNOWN, ActivityManager.PROCESS_CAPABILITY_NONE, apiDurationBeforeFgsStart, - apiDurationAfterFgsEnd); + apiDurationAfterFgsEnd, + r.mAllowWhileInUsePermissionInFgsReasonNoBinding, + r.mAllowWIUInBindService, + r.mAllowWIUByBindings, + r.mAllowStartForegroundNoBinding, + r.mAllowStartInBindService, + r.mAllowStartByBindings); } /** @@ -557,7 +563,13 @@ public class ForegroundServiceTypeLoggerModule { ActivityManager.PROCESS_STATE_UNKNOWN, ActivityManager.PROCESS_CAPABILITY_NONE, 0, - apiDurationAfterFgsEnd); + apiDurationAfterFgsEnd, + 0, + 0, + 0, + 0, + 0, + 0); } /**