欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

android實現(xiàn)自動關機的具體方法

 更新時間:2013年06月09日 15:41:24   作者:  
android實現(xiàn)自動關機的具體方法,需要的朋友可以參考一下
[java] 
復制代碼 代碼如下:

private void shutdown() { 
            try { 
                Process process = Runtime.getRuntime().exec("su"); 
                DataOutputStream out = new DataOutputStream( 
                        process.getOutputStream()); 
                out.writeBytes("reboot -p\n"); 
                out.writeBytes("exit\n"); 
                out.flush(); 
            } catch (IOException e) { 
                e.printStackTrace(); 
            } 
        } 

private void shutdown() {
try {
Process process = Runtime.getRuntime().exec("su");
DataOutputStream out = new DataOutputStream(
process.getOutputStream());
out.writeBytes("reboot -p\n");
out.writeBytes("exit\n");
out.flush();
} catch (IOException e) {
e.printStackTrace();
}
}

Note:手機必須獲取Root權限?。?!

相關文章

最新評論