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

Commit 49537d12 authored by Clark Scheff's avatar Clark Scheff Committed by Gerrit Code Review
Browse files

Themes: Handle case when keyguard is showing during theme change

After we recreate the status bar we need to check if the keyguard
was showing and if so make sure it is showing after the theme
change.  We also need to make sure the phone status bar is not
visible if the keyguard was showing, otherwise you see two status
bars.

Change-Id: Iba09e3e5c8cf52d49f292423a50034a3cf84d9c1
parent 39b62b48
Loading
Loading
Loading
Loading
+11 −0
Original line number Original line Diff line number Diff line
@@ -3724,6 +3724,17 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
        });
        });
        // restart the keyguard so it picks up the newly created ScrimController
        // restart the keyguard so it picks up the newly created ScrimController
        startKeyguard();
        startKeyguard();

        // if the keyguard was showing while this change occurred we'll need to do some extra work
        if (mState == StatusBarState.KEYGUARD) {
            // this will make sure the keyguard is showing
            showKeyguard();
            // The following views need to be invisible if the keyguard is showing
            // These views were hidden but re-inflating the status bar changed them back to visible
            mClockView.setVisibility(View.INVISIBLE);
            mNotificationIconArea.setVisibility(View.INVISIBLE);
            mSystemIconArea.setVisibility(View.INVISIBLE);
        }
    }
    }


    private void removeAllViews(ViewGroup parent) {
    private void removeAllViews(ViewGroup parent) {