boolean updateSize(Context context) {
            if (mUser != null) {
                mSize = 0;
                for (int i = 0; i < mChildren.size(); i++) {
                    MergedItem child = mChildren.get(i);
                    child.updateSize(context);
                    mSize += child.mSize;
                }
            } else {
                mSize = mProcess.mSize;
                for (int i = 0; i < mOtherProcesses.size(); i++) {
                    mSize += mOtherProcesses.get(i).mSize;
                }
            }

            String sizeStr = Formatter.formatShortFileSize(
                    context, mSize);
            if (!sizeStr.equals(mSizeStr)) {
                mSizeStr = sizeStr;
                // We update this on the second tick where we update just
                // the text in the current items, so no need to say we
                // changed here.
                return false;
            }
            return false;
        }
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