[RK3288][Android6.0] 开发者选项中的Strict mode功能
来源:互联网 发布:光盘数据恢复软件 编辑:程序博客网 时间:2024/06/14 00:10
Platform: Rockchip
OS: Android 6.0
Kernel: 3.10.92
有些页面显示的时候比如预览画面,浏览器四周会出现一圈红框,如下:
这是Google用于开发调试性能的一个功能,解释如下:
在开发者选项中可以设置开关:
当切换时,调用流程如下:
onPreferenceTreeClick -> writeStrictModeVisualOptions -> mWindowManager.setStrictModeVisualIndicatorPreference
public void setStrictModeVisualIndicatorPreference(String value) { SystemProperties.set(StrictMode.VISUAL_PROPERTY, value);}
本质上是设置property: public static final String VISUAL_PROPERTY = "persist.sys.strictmode.visual";
使用property的地方:
public static boolean conditionallyEnableDebugLogging() { boolean doFlashes = SystemProperties.getBoolean(VISUAL_PROPERTY, false) && !amTheSystemServerProcess();}
// Returns the current state of the system property that controls // strictmode flashes. One of: // 0: not explicitly set one way or another // 1: on // 2: off private static int currentStrictModeActiveIndex() { if (TextUtils.isEmpty(SystemProperties.get(StrictMode.VISUAL_PROPERTY))) { return 0; } boolean enabled = SystemProperties.getBoolean(StrictMode.VISUAL_PROPERTY, false); return enabled ? 1 : 2; }
所有去掉红框,只要设置property就可以了。
经网友“绯雨CHRIS丶L”验证去显示红框的时候并没有读取property,可以修改如下:
参考:
StrictMode
阅读全文
1 0
- [RK3288][Android6.0] 开发者选项中的Strict mode功能
- [RK3288][Android6.0] 调试笔记 --- user版本默认显示开发者选项
- [RK3288][Android6.0] Display中的Composition机制
- [RK3288][Android6.0] Android中的Properties
- [RK3288][Android6.0] 一律运行WLAN漫游扫描选项
- [RK3288][Android6.0] USB UVC Camera 功能支持的添加
- [RK3288][Android6.0] 调试笔记 --- 移除锁屏功能
- [RK3288][Android6.0] 调试笔记 --- Su添加密码登陆功能
- [RK3288][Android6.0] AT24C02驱动分析及功能增加小结
- [RK3288][Android6.0] WiFi之Passpoint功能了解
- [RK3288][Android6.0] WiFi之PNO功能了解
- [RK3288][Android6.0] 按键(MediaButton)控制音乐播放功能
- [RK3288][Android6.0] USB UVC Camera 功能支持的添加
- [RK3288][Android6.0] WiFi在Setting中的开启过程小结
- [RK3288][Android6.0] Audio中的HW Params设置流程
- [RK3288][Android6.0] Display中的2D Rendering机制
- [RK3288][Android6.0] ALSA中的DMA buffer分配
- [RK3288][Android6.0] Audio中的period_size使用规则
- Linux 进程状态转换
- JS常用正则表达式验证总结。
- python学习之运维应用
- 网络上找的JS日期格式化简洁版
- STL学习笔记10— —容器的选用
- [RK3288][Android6.0] 开发者选项中的Strict mode功能
- 使用最大公约数求线段上格点的个数
- UVA 11827 Maximum GCD
- FreeBSD代码目录说明
- SpringMVC中MessageSource的获取方法
- oracle的sql语句的练习题及答案(员工表+部门表)
- webpack编译多页面vue项目的配置问题
- js格式化json/xml格式
- 复杂链表的复制【每日一题】