问题现象:
系统自动旋转屏幕已经关闭,手握手机横屏后在握成竖屏,右下角多出一个自动旋转按钮会闪烁两下,
点击后系统又自动变成横屏了。
RLflTA.png
解决办法:
在 SystemUI 中搜索 rotate 相关找到 ic_sysbar_rotate_button.xml
vendor\mediatek\proprietary\packages\apps\SystemUI\src\com\android\systemui\statusbar\phone\NavigationBarView.java
final RotationContextButton rotateSuggestionButton = new RotationContextButton(
R.id.rotate_suggestion, R.drawable.ic_sysbar_rotate_button);
final ContextualButton accessibilityButton =
new ContextualButton(R.id.accessibility_button,
R.drawable.ic_sysbar_accessibility_button);
mContextualButtonGroup.addButton(imeSwitcherButton);
if (!isGesturalMode) {
mContextualButtonGroup.addButton(rotateSuggestionButton);
}
mContextualButtonGroup.addButton(accessibilityButton);
mOverviewProxyService = De