diff options
| author | 2019-05-30 00:04:53 +0000 | |
|---|---|---|
| committer | 2019-05-30 00:04:53 +0000 | |
| commit | fa6082f2a06789eba03140e753d211d5716ff94e (patch) | |
| tree | f1ea86ea317fb47817ade4b88efd2bd9d1eaabd7 | |
| parent | 6d8b5483807e44ac055be876ca4e495cf8ad8640 (diff) | |
| parent | bcef557a909f781ec0750a9b422a29c6508d30bc (diff) | |
Merge "Hide and re-show assist handles when phone is rotated." into qt-dev
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/ScreenDecorations.java | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/ScreenDecorations.java b/packages/SystemUI/src/com/android/systemui/ScreenDecorations.java index 6057e124b105..4aaf85adfce6 100644 --- a/packages/SystemUI/src/com/android/systemui/ScreenDecorations.java +++ b/packages/SystemUI/src/com/android/systemui/ScreenDecorations.java @@ -433,10 +433,26 @@ public class ScreenDecorations extends SystemUI implements Tunable, 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); |