读书人

批改亮度以及命令行

发布时间: 2012-09-10 22:20:13 作者: rapoo

修改亮度以及命令行

int brightness = 125; ?
Settings.System.putInt(?
? ? ? ftaContext.getContentResolver(), ?
? ? ? Settings.System.SCREEN_BRIGHTNESS, ?);??

? ? ? brightness

?

2.public static void doCmds(List<String> cmds) throws Exception {?
? ? Process process = Runtime.getRuntime().exec("su");?
? ? DataOutputStream os = new DataOutputStream(process.getOutputStream());?
?
? ? for (String tmpCmd : cmds) {?
? ? ? ? ? ? os.writeBytes(tmpCmd+"\n");?
? ? }?
?
? ? os.writeBytes("exit\n");?
? ? os.flush();?
? ? os.close();?
?
? ? process.waitFor();?
}?????

读书人网 >移动开发

热点推荐