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

Commit 6069c409 authored by Vadim Tryshev's avatar Vadim Tryshev
Browse files

Adding a setting to force user activity.

Bug: 25185253
Change-Id: Ic7d351e0e6a1dc9e1d7424ed30226ab1cf773cde
parent e962db6a
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -173,7 +173,7 @@ public class StatusBarWindowManager implements RemoteInputController.Callback {
    private void applyInputFeatures(State state) {
        if (state.isKeyguardShowingAndNotOccluded()
                && state.statusBarState == StatusBarState.KEYGUARD
                && !state.qsExpanded) {
                && !state.qsExpanded && !state.forceUserActivity) {
            mLpChanged.inputFeatures |=
                    WindowManager.LayoutParams.INPUT_FEATURE_DISABLE_USER_ACTIVITY;
        } else {
@@ -265,6 +265,11 @@ public class StatusBarWindowManager implements RemoteInputController.Callback {
        apply(mCurrentState);
    }

    public void setForceUserActivity(boolean forceUserActivity) {
        mCurrentState.forceUserActivity = forceUserActivity;
        apply(mCurrentState);
    }

    public void setHeadsUpShowing(boolean showing) {
        mCurrentState.headsUpShowing = showing;
        apply(mCurrentState);
@@ -332,6 +337,7 @@ public class StatusBarWindowManager implements RemoteInputController.Callback {
        boolean forceStatusBarVisible;
        boolean forceCollapsed;
        boolean forceDozeBrightness;
        boolean forceUserActivity;

        /**
         * The {@link BaseStatusBar} state from the status bar.