Merge "Hide and re-show assist handles when phone is rotated." into qt-dev

This commit is contained in:
Matt Casey
2019-05-30 00:04:53 +00:00
committed by Android (Google) Code Review

View File

@@ -433,10 +433,26 @@ public class ScreenDecorations extends SystemUI implements Tunable,
if (mOverlay != null) { if (mOverlay != null) {
updateLayoutParams(); updateLayoutParams();
updateViews(); 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() { private void updateRoundedCornerRadii() {
final int newRoundedDefault = mContext.getResources().getDimensionPixelSize( final int newRoundedDefault = mContext.getResources().getDimensionPixelSize(
com.android.internal.R.dimen.rounded_corner_radius); com.android.internal.R.dimen.rounded_corner_radius);