您的位置:首页 > 其它

安卓清理后台程序

2015-09-01 15:00 435 查看
private void clearMore() {
int total = 0;
int memorySize = 0;
for (ProcessInfo infos : processInfoList) {
if (infos.isChecked()) {
ActivityManager am = (ActivityManager) getSystemService(Context.ACTIVITY_SERVICE);
am.killBackgroundProcesses(infos.getPkgname());
total++;
memorySize += infos.getMemSize();
processInfoList.remove(infos);
break;
}
}
Toast.makeText(
this,
"清理了" + total + "个进程," + "释放了"
+ TrafficDataUtil.getMemoryData(memorySize) + "内存",
Toast.LENGTH_SHORT).show();
adapter=new ClearMemoryAdapter(this, processInfoList);
listView.setAdapter(adapter);
btn_clea.setText("一键清理");
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: