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

android實(shí)現(xiàn)自動(dòng)關(guān)機(jī)的具體方法

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

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:手機(jī)必須獲取Root權(quán)限?。。?

相關(guān)文章

最新評(píng)論