1.显示隐藏系统进程
修改ProcessManagerActivity的Adapter
class="brush:java;gutter:true;">..... @Override public int getCount() { if(SpUtil.getBoolean(getApplicationContext(), ConstantValue.SHOW_SYSTEM, false)){ return mCustomerList.size()+mSystemList.size()+2; }else{ return mCustomerList.size()+1; } }
2.锁屏清理
public class LockScreenService extends Service { private IntentFilter intentFilter; private InnerReceiver innerReceiver; @Override public void onCreate() { //锁屏action intentFilter = new IntentFilter(Intent.ACTION_SCREEN_OFF); innerReceiver = new InnerReceiver(); registerReceiver(innerReceiver, intentFilter); super.onCreate(); } @Override public IBinder onBind(Intent intent) { return null; } @Override public void onDestroy() { if(innerReceiver!=null){ unregisterReceiver(innerReceiver); } super.onDestroy(); } class InnerReceiver extends BroadcastReceiver{ @Override public void onReceive(Context context, Intent intent) { //清理手机正在运行的进程 ProcessInfoProvider.killAll(context); } } }