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

Commit 3a8c35e3 authored by Vadim Tryshev's avatar Vadim Tryshev
Browse files

Make lockscreen user list closeable via keyboard.

Bug: 31994316
Test: Manual check with the keyboard
Change-Id: I0526d107ec39f6b926a7651bd501d229beee1dce
parent 170219c5
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -4456,6 +4456,9 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
            animateCollapsePanels();
            return true;
        }
        if (mKeyguardUserSwitcher.hideIfNotSimple(true)) {
            return true;
        }
        return false;
    }

+6 −3
Original line number Diff line number Diff line
@@ -128,7 +128,7 @@ public class KeyguardUserSwitcher {
        }
    }

    private void hide(boolean animate) {
    private boolean hide(boolean animate) {
        if (mUserSwitcher != null && mUserSwitcherContainer.getVisibility() == View.VISIBLE) {
            cancelAnimations();
            if (animate) {
@@ -137,7 +137,9 @@ public class KeyguardUserSwitcher {
                mUserSwitcherContainer.setVisibility(View.GONE);
            }
            mStatusBarView.setKeyguardUserSwitcherShowing(false, animate);
            return true;
        }
        return false;
    }

    private void cancelAnimations() {
@@ -223,10 +225,11 @@ public class KeyguardUserSwitcher {
        }
    }

    public void hideIfNotSimple(boolean animate) {
    public boolean hideIfNotSimple(boolean animate) {
        if (mUserSwitcherContainer != null && !mUserSwitcherController.isSimpleUserSwitcher()) {
            hide(animate);
            return hide(animate);
        }
        return false;
    }

    boolean isAnimating() {