admin管理员组文章数量:1589049
Android一键式清理,内存清理功能的实山清理大师等均提供一键式清理和一键加速等功能。实际上,它们杀死了一些后台进程以达到释放内存的目的。
基本思想是列出所有正在运行的进程,检查它们的重要值(RunningAppProcessInfo.importance,该值越大,进程的重要性越低),可以设置一个阈值,如果过程大于阈值,则可以终止该过程。
该过程的重要性具有以下级别:
/**
* Constant for {@link #importance}: this is a persistent process.
* Only used when reporting to process observers.
* @hide
*/
public static final int IMPORTANCE_PERSISTENT = 50;
/**
* Constant for {@link #importance}: this process is running the
* foreground UI.
*/
public static final int IMPORTANCE_FOREGROUND = 100;
/**
* Constant for {@link #importance}: this process is running something
* that is actively visible to the user, though not in the immediate
* foreground.
*/
public static final int IMPORTANCE_VISIBLE = 200;
/**
* Constant for {@link #importance}: this process is running something<
版权声明:本文标题:android+内存清理+代码,最新版本:Android一键式清理,内存清理功能的实现 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://m.elefans.com/dongtai/1726092151a1055084.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论