public static CharSequence makeLabel(PackageManager pm,
                                         String className, PackageItemInfo item) {
        if (item != null && (item.labelRes != 0
                || item.nonLocalizedLabel != null)) {
            CharSequence label = item.loadLabel(pm);
            if (label != null) {
                return label;
            }
        }

        String label = className;
        int tail = label.lastIndexOf('.');
        if (tail >= 0) {
            label = label.substring(tail + 1, label.length());
        }
        return label;
    }
Singleton for retrieving and monitoring the state about all running
applications/processes/services.
android/android_framework/base/src/main/java/github/tornaco/android/thanos/core/process/RunningState.java