因有需求做app来通过按钮来调用/system/bin/ 的脚本。
将此处加入对应代码中,如果是第三方应用需要主意执行/写入权限问题。
try{
// 执行setting 命令将状态栏跟虚拟按键设置成沉浸模式
Runtime.getRuntime().exec(" settings put global policy_control immersive.full=* ");
}catch(Exception e){
Log.d("Healer:","Runtime.getRuntime() ");
}
具体其他的setting命令请查看 此文 :https://blog.csdn.net/qq_22370409/article/details/89350235