private void checkScanFinish() { mAdapter.notifyDataSetChanged(); if (mIsProcessScanFinish && mIsSysCacheScanFinish && mIsOverallScanFinish) { mIsScanning = false; JunkGroup cacheGroup = mJunkGroups.get(JunkGroup.GROUP_CACHE); ArrayList<JunkInfo> children = cacheGroup.mChildren; cacheGroup.mChildren = new ArrayList<>(); for (JunkInfo info : children) { cacheGroup.mChildren.add(info); if (info.mChildren != null) { cacheGroup.mChildren.addAll(info.mChildren); } } children = null; long size = getTotalSize(); String totalSize = CleanUtil.formatShortFileSize(this, size); mHeaderView.mSize.setText(totalSize); mHeaderView.mProgress.setText("共发现:" + totalSize); mHeaderView.mProgress.setGravity(Gravity.CENTER); mCleanButton.setEnabled(true); } }
private void checkCleanFinish() { if (mIsProcessCleanFinish && mIsSysCacheCleanFinish && mIsOverallCleanFinish) { mHeaderView.mProgress.setText("清理完成"); mHeaderView.mSize.setText(CleanUtil.formatShortFileSize(this, 0L)); for (JunkGroup group : mJunkGroups.values()) { group.mSize = 0L; group.mChildren = null; } mAdapter.notifyDataSetChanged(); } }