[RK3288][Android6.0] 调试笔记 --- 屏幕显示旋转方法

来源:互联网 发布:校园网络应急演练情况 编辑:程序博客网 时间:2024/06/05 10:42

Platform: Rockchip
OS: Android 6.0
Kernel: 3.10.92

显示模块提供了一个property供修改旋转方向,名为”ro.sf.hwrotation”,有四个值可选

Surface.java

/** * Rotation constant: 0 degree rotation (natural orientation) */public static final int ROTATION_0 = 0;/** * Rotation constant: 90 degree rotation. */public static final int ROTATION_90 = 1;/** * Rotation constant: 180 degree rotation. */public static final int ROTATION_180 = 2;/** * Rotation constant: 270 degree rotation. */public static final int ROTATION_270 = 3;

“ro.sf.hwrotation”相对于上一篇文章[RK3288][Android6.0] 调试笔记 — 设置系统默认显示为竖屏提到的”persist.display.portrait”更灵活
至于这两个区别,我的理解是:
“persist.display.portrait”是在WindowManagerService控制的,比较偏上层
“ro.sf.hwrotation”是在Display模块控制,前者的控制最终还是要和后者叠加起来一起得出最终值吧

另外,改动只针对开机动画(Android字体)之后的显示有效,u-boot以及kernel logo不会受影响

阅读全文
2 0
原创粉丝点击