Android 清理大师产品的具体实现(一)QQ专清

首先我们先解析下目录:

一个正常的QQ用户安装下,使用后,在文件夹中到底发生了什么事情?

我们从文件管理器中tencent-MobileQQ-下打印所有的文件夹以及文件:

String filePath = Environment.getExternalStorageDirectory()+"/tencent/MobileQQ/";
FileUtils.getFilesAllName(filePath);

//获取指定目录下的所有文件夹
public static List getFilesAllName(String path) {
    File file=new File(path);
    File[] files=file.listFiles();
    if (files == null){Log.e("error","空目录");return null;}
    List s = new ArrayList<>();
    for(int i =0;i

打印出来的结果是:

/storage/emulated/0/tencent/MobileQQ/pddata
/storage/emulated/0/tencent/MobileQQ/flashchat
/storage/emulated/0/tencent/MobileQQ/head
/storage/emulated/0/tencent/MobileQQ/bless
/storage/emulated/0/tencent/MobileQQ/.nomedia
/storage/emulated/0/tencent/MobileQQ/data
/storage/emulated/0/tencent/MobileQQ/funcall
/storage/emulated/0/tencent/MobileQQ/rijmmkv
/storage/emulated/0/tencent/MobileQQ/ArkApp
/storage/emulated/0/tencent/MobileQQ/sv_config_resource
/storage/emulated/0/tencent/MobileQQ/.font_info
/storage/emulated/0/tencent/MobileQQ/.apollo
/storage/emulated/0/tencent/MobileQQ/DoutuRes
/storage/emulated/0/tencent/MobileQQ/log
/storage/emulated/0/tencent/MobileQQ/.emotionsm
/storage/emulated/0/tencent/MobileQQ/theme_pkg
/storage/emulated/0/tencent/MobileQQ/qav
/storage/emulated/0/tencent/MobileQQ/.Rock
/storage/emulated/0/tencent/MobileQQ/ar_model
/storage/emulated/0/tencent/MobileQQ/dov_doodle_music
/storage/emulated/0/tencent/MobileQQ/capture_ptv_template
/storage/emulated/0/tencent/MobileQQ/doodle_template
/storage/emulated/0/tencent/MobileQQ/dov_doodle_sticker
/storage/emulated/0/tencent/MobileQQ/dov_ptv_template_dov
/storage/emulated/0/tencent/MobileQQ/dov_doodle_template
/storage/emulated/0/tencent/MobileQQ/RDModules
/storage/emulated/0/tencent/MobileQQ/qbosssplahAD
/storage/emulated/0/tencent/MobileQQ/pe
/storage/emulated/0/tencent/MobileQQ/artfilter
/storage/emulated/0/tencent/MobileQQ/newpoke
/storage/emulated/0/tencent/MobileQQ/information_paster
/storage/emulated/0/tencent/MobileQQ/capture_qsvf
/storage/emulated/0/tencent/MobileQQ/Scribble
/storage/emulated/0/tencent/MobileQQ/babyQIconRes
/storage/emulated/0/tencent/MobileQQ/ptv_template
/storage/emulated/0/tencent/MobileQQ/qqstory
/storage/emulated/0/tencent/MobileQQ/dynamic_text
/storage/emulated/0/tencent/MobileQQ/sv_config_icon
/storage/emulated/0/tencent/MobileQQ/qsvf
/storage/emulated/0/tencent/MobileQQ/ar_feature
/storage/emulated/0/tencent/MobileQQ/.imei
/storage/emulated/0/tencent/MobileQQ/hotimage
/storage/emulated/0/tencent/MobileQQ/kf.dat
/storage/emulated/0/tencent/MobileQQ/medal
/storage/emulated/0/tencent/MobileQQ/emoji
/storage/emulated/0/tencent/MobileQQ/shortvideo
/storage/emulated/0/tencent/MobileQQ/poke
/storage/emulated/0/tencent/MobileQQ/.vaspoke
/storage/emulated/0/tencent/MobileQQ/.emojiSticker_v2.1
//开屏广告
/storage/emulated/0/tencent/MobileQQ/splahAD
//缓存,可编辑
/storage/emulated/0/tencent/MobileQQ/diskcache
/storage/emulated/0/tencent/MobileQQ/capture_template
/storage/emulated/0/tencent/MobileQQ/.readInjoy
/storage/emulated/0/tencent/MobileQQ/.profilecard
/storage/emulated/0/tencent/MobileQQ/system_background
/storage/emulated/0/tencent/MobileQQ/QWallet
/storage/emulated/0/tencent/MobileQQ/gray_uin_check_dir
/storage/emulated/0/tencent/MobileQQ/NoRename#EpuPY9DoT

接下来我们一步步解析我们QQ专清所涉及到的文件夹;

先来看下需求:

1、垃圾文件

2、临时缓存(浏览朋友圈产生的缓存垃圾)

3、头像缓存(联网可重新下载)

4、空间缓存(浏览空间所产生的图片缓存)

5、短视频缓存(浏览视频、空间、微视所产生)

深度清理:

视频、图片(聊天、保存)、表情(自定义、下载)、语音、文件

我们实现的逻辑思路是可以这么出发:

 

你可能感兴趣的:(安卓清理)