项目中,禁止屏幕自动旋转。但是设备横竖屏物理旋转,因为重力感应器原因,切换后,竖屏方向时,右下角位置(底部导航栏位置)出现手动旋转屏幕按钮,点击后会旋转,这个地方在什么位置呢?
一图标如下
二怎样隐藏该图标显示呢
他不在launcher模块中,在framework/base/SystemUI/下
packages/SystemUI/src/com/android/systemui/statusbar/phone/RotationButtonController.java
//packages/SystemUI/src/com/android/systemui/statusbar/phone/RotationButtonController.java
void setRotateSuggestionButtonState(final boolean visible, final boolean force) {
// At any point the the button can become invisible because an a11y service became active.
// Similarly, a call to make the button visible may be rejected because an a11y service is
// active. Must account for this.
// Rerun a show animation to indicate change but don't rerun a hide animation
+ if (true) {
+ android.util.Log.d("RotationButtonController", " setRotateSuggestionButtonState return, rotation button not need show-----");
+ return;
+ }
android.util.Log.d("RotationButtonController", " setRotateSuggestionButtonState run first---");
if (!visible && !mRotationButton.isVisible()) return;
final View view = mRotationButton.getCurrentView();
if (view == null) return;
final KeyButtonDrawable currentDrawable = mRotationButton.getImageDrawable();
if (currentDrawable == null) return;
// Clear any pending suggestion flag as it has either been nullified or is being shown
mPendingRotationSuggestion = false;
OVER~