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

Commit 1b307825 authored by Vinit Nayak's avatar Vinit Nayak
Browse files

Only set property state after back button instantiated

Fixes: 194374924
Test: Repro steps don't cause crash
Change-Id: I5ece220469f420d59698a56816057e248306fd32
parent b971baef
Loading
Loading
Loading
Loading
+4 −5
Original line number Diff line number Diff line
@@ -160,15 +160,14 @@ public class NavbarButtonsViewController {
    private void initButtons(ViewGroup navContainer, ViewGroup endContainer,
            TaskbarNavButtonController navButtonController) {

        // Hide when keyguard is showing, show when bouncer is showing
        mPropertyHolders.add(new StatePropertyHolder(mBackButton,
                flags -> (flags & FLAG_KEYGUARD_VISIBLE) == 0 ||
                        (flags & FLAG_ONLY_BACK_FOR_BOUNCER_VISIBLE) != 0));

        mBackButton = addButton(R.drawable.ic_sysbar_back, BUTTON_BACK,
                mNavButtonContainer, mControllers.navButtonController, R.id.back);
        mPropertyHolders.add(new StatePropertyHolder(mBackButton,
                flags -> (flags & FLAG_IME_VISIBLE) == 0));
        // Hide when keyguard is showing, show when bouncer is showing
        mPropertyHolders.add(new StatePropertyHolder(mBackButton,
                flags -> (flags & FLAG_KEYGUARD_VISIBLE) == 0 ||
                        (flags & FLAG_ONLY_BACK_FOR_BOUNCER_VISIBLE) != 0));

        // home and recents buttons
        View homeButton = addButton(R.drawable.ic_sysbar_home, BUTTON_HOME, navContainer,