Swap "foreground service" and "bound foreground service" proc states.
It has become apparent that apps running foreground services is
a much more important (and less common) state than all the various
ways apps run in the foreground because of the system being bound
to them or whatever else. So push this up about the bound foreground
service state, right after the explicit TOP state. Then we can
keep these together as "the app is explicitly running in the
foreground for some reason", etc.
Bug: 70808931
Test: CtsAppTestCases
Change-Id: Icfc1905b8e3eb60ddf26118c61ec1ef095659436
diff --git a/services/core/java/com/android/server/net/NetworkPolicyManagerService.java b/services/core/java/com/android/server/net/NetworkPolicyManagerService.java
index 3c47e85..da71049 100644
--- a/services/core/java/com/android/server/net/NetworkPolicyManagerService.java
+++ b/services/core/java/com/android/server/net/NetworkPolicyManagerService.java
@@ -2949,7 +2949,7 @@
if (state <= ActivityManager.PROCESS_STATE_TOP) {
fout.print(" (fg)");
} else {
- fout.print(state <= ActivityManager.PROCESS_STATE_FOREGROUND_SERVICE
+ fout.print(state <= ActivityManager.PROCESS_STATE_BOUND_FOREGROUND_SERVICE
? " (fg svc)" : " (bg)");
}