Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bcef557a authored by Matt Casey's avatar Matt Casey
Browse files

Hide and re-show assist handles when phone is rotated.

Not getting fancy with the animation for the moment, just making sure
they show and hide in the right places.

Test: Show handles, verify that they show when the phone is rotated.
Bug: 133836023
Change-Id: I7cda1e3f0cf9a46993bfd3e8da67311e55fb6189
parent 190e99cf
Loading
Loading
Loading
Loading
+16 −0
Original line number Original line Diff line number Diff line
@@ -378,9 +378,25 @@ 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(