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

Unverified Commit beadf1ad authored by Michael Bestas's avatar Michael Bestas
Browse files

Partially revert "Show floating rotation button regardless of ime status"

Add this back for hw-key devices.

This reverts commit 77c28811.

Change-Id: I26c5bb624fc533f6aaafe6b1052d1ac7b9437d33
parent 98b9c176
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -71,6 +71,7 @@ public class FloatingRotationButton implements RotationButton {

    private AnimatedVectorDrawable mAnimatedDrawable;
    private boolean mIsShowing;
    private boolean mCanShow = true;
    private int mDisplayRotation;

    private boolean mIsTaskbarVisible = false;
@@ -148,7 +149,7 @@ public class FloatingRotationButton implements RotationButton {

    @Override
    public boolean show() {
        if (mIsShowing) {
        if (!mCanShow || mIsShowing) {
            return false;
        }

@@ -219,6 +220,14 @@ public class FloatingRotationButton implements RotationButton {
        mKeyButtonView.setDarkIntensity(darkIntensity);
    }

    @Override
    public void setCanShowRotationButton(boolean canShow) {
        mCanShow = canShow;
        if (!mCanShow) {
            hide();
        }
    }

    @Override
    public void onTaskbarStateChanged(boolean taskbarVisible, boolean taskbarStashed) {
        mIsTaskbarVisible = taskbarVisible;
+1 −0
Original line number Diff line number Diff line
@@ -36,6 +36,7 @@ public interface RotationButton {
    default boolean isVisible() {
        return false;
    }
    default void setCanShowRotationButton(boolean canShow) {}
    default void onTaskbarStateChanged(boolean taskbarVisible, boolean taskbarStashed) {}
    default void updateIcon(int lightIconColor, int darkIconColor) { }
    default void setOnClickListener(View.OnClickListener onClickListener) { }