@SneakyThrows
    public List<Pkg> getAllForegroundPkgs() {
        List<Pkg> res = new ArrayList<>();
        for (Pkg runningPkg : server.getRunningAppPackages()) {
            if (isAppForeground(runningPkg)) {
                res.add(runningPkg);
            }
        }
        return res;
    }
@deprecated User {{@link #killProcessByNames2(List<ProcessName>)} instead}
android/android_framework/base/src/main/java/github/tornaco/android/thanos/core/app/ActivityManager.java