[RK3288][Android6.0] 开发者选项中的Strict mode功能
2017-07-17 14:59
639 查看
Platform: Rockchip
OS: Android 6.0
Kernel: 3.10.92
有些页面显示的时候比如预览画面,浏览器四周会出现一圈红框,如下:
这是Google用于开发调试性能的一个功能,解释如下:
在开发者选项中可以设置开关:
当切换时,调用流程如下:
onPreferenceTreeClick -> writeStrictModeVisualOptions -> mWindowManager.setStrictModeVisualIndicatorPreference
本质上是设置property:
使用property的地方:
所有去掉红框,只要设置property就可以了。
经网友“绯雨CHRIS丶L”验证去显示红框的时候并没有读取property,可以修改如下:
参考:
StrictMode
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
相关文章推荐
- [RK3288][Android6.0] 调试笔记 --- user版本默认显示开发者选项
- [RK3288][Android6.0] 调试笔记 --- user版本默认显示开发者选项【转】
- [RK3288][Android6.0] AT24C02驱动分析及功能增加小结
- [RK3288][Android6.0] 调试笔记 --- 移除锁屏功能
- [RK3288][Android6.0] USB UVC Camera 功能支持的添加
- [RK3288][Android6.0] 按键(MediaButton)控制音乐播放功能
- [RK3288][Android6.0] WiFi之Passpoint功能了解
- [RK3288][Android6.0] WiFi之PNO功能了解
- [RK3288][Android6.0] 调试笔记 --- Su添加密码登陆功能
- [RK3288][Android6.0] 调试笔记 --- 开机动画支持播放mp4视频功能
- [RK3288][Android6.0] 调试笔记 --- 关闭音频播放停止后进入Standby功能
- [RK3288][Android6.0] 一律运行WLAN漫游扫描选项
- [RK3288][Android6.0] USB UVC Camera 功能支持的添加
- [RK3288][Android6.0] WiFi之DHCP获取IP address流程
- [RK3288][Android6.0] 通用访问系统寄存器
- [RK3288][Android6.0] Wifi相关文件及类整理
- [RK3288][Android6.0] WiFi之WifiWatchdogStateMachine
- [RK3288][Android6.0] U-boot显示模块部分流程小结
- [RK3288][Android6.0] 主动从WLAN网络切换到移动数据网络
- [RK3288][Android6.0] 调试笔记 --- 开机语言默认为简体中文