public static String procStateToString(int procState) {
        XLog.w("procStateToString: " + procState);
        final String procStateStr;
        switch (procState) {
            case ProcessStateEnum.PROCESS_STATE_PERSISTENT:
                procStateStr = "PER";
                break;
            case ProcessStateEnum.PROCESS_STATE_PERSISTENT_UI:
                procStateStr = "PERU";
                break;
            case ProcessStateEnum.PROCESS_STATE_TOP:
                procStateStr = "TOP";
                break;
            case ProcessStateEnum.PROCESS_STATE_BOUND_TOP:
                procStateStr = "BTOP";
                break;
            case ProcessStateEnum.PROCESS_STATE_FOREGROUND_SERVICE:
                procStateStr = "FGS";
                break;
            case ProcessStateEnum.PROCESS_STATE_BOUND_FOREGROUND_SERVICE:
                procStateStr = "BFGS";
                break;
            case ProcessStateEnum.PROCESS_STATE_IMPORTANT_FOREGROUND:
                procStateStr = "IMPF";
                break;
            case ProcessStateEnum.PROCESS_STATE_IMPORTANT_BACKGROUND:
                procStateStr = "IMPB";
                break;
            case ProcessStateEnum.PROCESS_STATE_TRANSIENT_BACKGROUND:
                procStateStr = "TRNB";
                break;
            case ProcessStateEnum.PROCESS_STATE_BACKUP:
                procStateStr = "BKUP";
                break;
            case ProcessStateEnum.PROCESS_STATE_SERVICE:
                procStateStr = "SVC";
                break;
            case ProcessStateEnum.PROCESS_STATE_RECEIVER:
                procStateStr = "RCVR";
                break;
            case ProcessStateEnum.PROCESS_STATE_TOP_SLEEPING:
                procStateStr = "TPSL";
                break;
            case ProcessStateEnum.PROCESS_STATE_HEAVY_WEIGHT:
                procStateStr = "HVY ";
                break;
            case ProcessStateEnum.PROCESS_STATE_HOME:
                procStateStr = "HOME";
                break;
            case ProcessStateEnum.PROCESS_STATE_LAST_ACTIVITY:
                procStateStr = "LAST";
                break;
            case ProcessStateEnum.PROCESS_STATE_CACHED_ACTIVITY:
                procStateStr = "CAC";
                break;
            case ProcessStateEnum.PROCESS_STATE_CACHED_ACTIVITY_CLIENT:
                procStateStr = "CACC";
                break;
            case ProcessStateEnum.PROCESS_STATE_CACHED_RECENT:
                procStateStr = "CRE ";
                break;
            case ProcessStateEnum.PROCESS_STATE_CACHED_EMPTY:
                procStateStr = "CEM";
                break;
            case ProcessStateEnum.PROCESS_STATE_NONEXISTENT:
                procStateStr = "NONE";
                break;
            default:
                procStateStr = "??";
                break;
        }
        return procStateStr;
    }
Returns the top activity from each of the currently visible root tasks, and the related uid.
The first entry will be the focused activity.
<p>
https://cs.android.com/android/platform/superproject/+/master:frameworks/base/services/core/java/com/android/server/wm/ActivityTaskManagerInternal.java
android/android_framework/base/src/main/java/github/tornaco/android/thanos/core/app/ActivityManager.java