代码如下:
Intent startMain = new Intent(Intent.ACTION_MAIN);
startMain.addCategory(Intent.CATEGORY_HOME);
startMain.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(startMain);
System.exit(0);
执行后在任务管理器看不到。
转载于:https://www.cnblogs.com/zhou1989/archive/2012/07/16/2593519.html