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

Commit 093f64a8 authored by Bryce Lee's avatar Bryce Lee
Browse files

Remove GlanceableHubBackGesture feature.

This changelist removes handling the back gesture on glanceable hub.
The communication of glanceable hub's presence to launcher through
the OverviewProxyService is preserved for use by other features.

Test: manual - verified navigation to and from Glanceable Hub worked as
      expected without the flag.
Bug: 361822449
Flag: EXEMPT removing com.android.systemui.glanceable_hub_back_gesture
Change-Id: I956432a012a15a7eb7b5fb58aa741ff1fd4b489e
parent 7477c179
Loading
Loading
Loading
Loading
+0 −10
Original line number Diff line number Diff line
@@ -1119,16 +1119,6 @@ flag {
  }
}

flag {
  name: "glanceable_hub_back_gesture"
  namespace: "systemui"
  description: "Enables back gesture on the glanceable hub"
  bug: "346331399"
  metadata {
    purpose: PURPOSE_BUGFIX
  }
}

flag {
  name: "glanceable_hub_allow_keyguard_when_dreaming"
  namespace: "systemui"
+1 −11
Original line number Diff line number Diff line
@@ -31,7 +31,6 @@ import androidx.compose.ui.semantics.disabled
import androidx.compose.ui.semantics.semantics
import androidx.compose.ui.unit.dp
import androidx.lifecycle.compose.collectAsStateWithLifecycle
import com.android.compose.animation.scene.Back
import com.android.compose.animation.scene.ContentKey
import com.android.compose.animation.scene.Edge
import com.android.compose.animation.scene.ElementKey
@@ -47,7 +46,6 @@ import com.android.compose.animation.scene.observableTransitionState
import com.android.compose.animation.scene.transitions
import com.android.compose.theme.LocalAndroidColorScheme
import com.android.internal.R.attr.focusable
import com.android.systemui.Flags.glanceableHubBackGesture
import com.android.systemui.communal.shared.model.CommunalBackgroundType
import com.android.systemui.communal.shared.model.CommunalScenes
import com.android.systemui.communal.shared.model.CommunalTransitionKeys
@@ -198,15 +196,7 @@ fun CommunalContainer(
            Box(modifier = Modifier.fillMaxSize())
        }

        val userActions =
            if (glanceableHubBackGesture()) {
                mapOf(
                    Swipe(SwipeDirection.End) to CommunalScenes.Blank,
                    Back to CommunalScenes.Blank,
                )
            } else {
                mapOf(Swipe(SwipeDirection.End) to CommunalScenes.Blank)
            }
        val userActions = mapOf(Swipe(SwipeDirection.End) to CommunalScenes.Blank)

        scene(CommunalScenes.Communal, userActions = userActions) {
            CommunalScene(
+1 −2
Original line number Diff line number Diff line
@@ -342,8 +342,7 @@ public class QuickStepContract {
        // the keyguard)
        if ((sysuiStateFlags & SYSUI_STATE_BOUNCER_SHOWING) != 0
                || (sysuiStateFlags & SYSUI_STATE_DIALOG_SHOWING) != 0
                || (sysuiStateFlags & SYSUI_STATE_VOICE_INTERACTION_WINDOW_SHOWING) != 0
                || (sysuiStateFlags & SYSUI_STATE_COMMUNAL_HUB_SHOWING) != 0) {
                || (sysuiStateFlags & SYSUI_STATE_VOICE_INTERACTION_WINDOW_SHOWING) != 0) {
            return false;
        }
        if ((sysuiStateFlags & SYSUI_STATE_ALLOW_GESTURE_IGNORING_BAR_VISIBILITY) != 0) {
+1 −5
Original line number Diff line number Diff line
@@ -18,7 +18,6 @@ package com.android.systemui.model

import com.android.compose.animation.scene.ObservableTransitionState
import com.android.compose.animation.scene.SceneKey
import com.android.systemui.Flags.glanceableHubBackGesture
import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.scene.domain.interactor.SceneContainerOcclusionInteractor
import com.android.systemui.scene.domain.interactor.SceneInteractor
@@ -107,10 +106,7 @@ constructor(
                    {
                        it.scene == Scenes.Lockscreen && it.invisibleDueToOcclusion
                    },
                SYSUI_STATE_COMMUNAL_HUB_SHOWING to
                    {
                        glanceableHubBackGesture() && it.scene == Scenes.Communal
                    }
                SYSUI_STATE_COMMUNAL_HUB_SHOWING to { it.scene == Scenes.Communal }
            )
    }

+2 −4
Original line number Diff line number Diff line
@@ -26,7 +26,6 @@ import static android.view.MotionEvent.ACTION_UP;
import static android.view.WindowManagerPolicyConstants.NAV_BAR_MODE_3BUTTON;

import static com.android.internal.accessibility.common.ShortcutConstants.CHOOSER_PACKAGE_NAME;
import static com.android.systemui.Flags.glanceableHubBackGesture;
import static com.android.systemui.shared.system.QuickStepContract.KEY_EXTRA_SYSUI_PROXY;
import static com.android.systemui.shared.system.QuickStepContract.KEY_EXTRA_UNFOLD_ANIMATION_FORWARDER;
import static com.android.systemui.shared.system.QuickStepContract.KEY_EXTRA_UNLOCK_ANIMATION_CONTROLLER;
@@ -86,10 +85,10 @@ import com.android.internal.util.ScreenshotHelper;
import com.android.internal.util.ScreenshotRequest;
import com.android.systemui.Dumpable;
import com.android.systemui.broadcast.BroadcastDispatcher;
import com.android.systemui.contextualeducation.GestureType;
import com.android.systemui.dagger.SysUISingleton;
import com.android.systemui.dagger.qualifiers.Main;
import com.android.systemui.dump.DumpManager;
import com.android.systemui.contextualeducation.GestureType;
import com.android.systemui.education.domain.interactor.KeyboardTouchpadEduStatsInteractor;
import com.android.systemui.keyguard.KeyguardUnlockAnimationController;
import com.android.systemui.keyguard.KeyguardWmStateRefactor;
@@ -837,8 +836,7 @@ public class OverviewProxyService implements CallbackController<OverviewProxyLis
                .setFlag(SYSUI_STATE_BOUNCER_SHOWING, bouncerShowing)
                .setFlag(SYSUI_STATE_DEVICE_DOZING, isDozing)
                .setFlag(SYSUI_STATE_DEVICE_DREAMING, isDreaming)
                .setFlag(SYSUI_STATE_COMMUNAL_HUB_SHOWING,
                        glanceableHubBackGesture() && communalShowing)
                .setFlag(SYSUI_STATE_COMMUNAL_HUB_SHOWING, communalShowing)
                .commitUpdate(mContext.getDisplayId());
    }

Loading