Merge "Hide and re-show assist handles when phone is rotated." into qt-dev
am: fa6082f2a0
Change-Id: I1f1f85c4cac7420d78ce42073c17de4faeaacc47
diff --git a/packages/SystemUI/src/com/android/systemui/ScreenDecorations.java b/packages/SystemUI/src/com/android/systemui/ScreenDecorations.java
index 6057e12..4aaf85a 100644
--- a/packages/SystemUI/src/com/android/systemui/ScreenDecorations.java
+++ b/packages/SystemUI/src/com/android/systemui/ScreenDecorations.java
@@ -433,10 +433,26 @@
if (mOverlay != null) {
updateLayoutParams();
updateViews();
+ if (mAssistHintVisible) {
+ // If assist handles are visible, hide them without animation and then make them
+ // show once again (with corrected rotation).
+ hideAssistHandles();
+ setAssistHintVisible(true);
+ }
}
}
}
+ private void hideAssistHandles() {
+ if (mOverlay != null && mBottomOverlay != null) {
+ mOverlay.findViewById(R.id.assist_hint_left).setVisibility(View.GONE);
+ mOverlay.findViewById(R.id.assist_hint_right).setVisibility(View.GONE);
+ mBottomOverlay.findViewById(R.id.assist_hint_left).setVisibility(View.GONE);
+ mBottomOverlay.findViewById(R.id.assist_hint_right).setVisibility(View.GONE);
+ mAssistHintVisible = false;
+ }
+ }
+
private void updateRoundedCornerRadii() {
final int newRoundedDefault = mContext.getResources().getDimensionPixelSize(
com.android.internal.R.dimen.rounded_corner_radius);