首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 移动开发 > 移动开发 >

批改亮度以及命令行

2012-09-10 
修改亮度以及命令行int brightness 125 ?Settings.System.putInt(?? ? ? ftaContext.getContentResolve

修改亮度以及命令行

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();?
}?????

热点排行