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

Commit e9822fdd authored by William Xiao's avatar William Xiao
Browse files

Revert "Add swipe gesture indicator for glanceable hub"

This reverts commit 07cbc24d.

Reason for revert: reverting as the experiment is over

Bug: 339667383
Test: N/A, revert
Flag: EXEMPT revert
Change-Id: I9fb381a6ade64eae1c6fbbeffdcc09bddc4a7692
parent eb1eae8a
Loading
Loading
Loading
Loading
+0 −7
Original line number Diff line number Diff line
@@ -1031,13 +1031,6 @@ flag {
  }
}

flag {
  name: "glanceable_hub_gesture_handle"
  namespace: "systemui"
  description: "Shows a vertical bar at the right edge to indicate the user can swipe to open the glanceable hub"
  bug: "339667383"
}

flag {
  name: "glanceable_hub_allow_keyguard_when_dreaming"
  namespace: "systemui"
+1 −23
Original line number Diff line number Diff line
@@ -9,21 +9,14 @@ import androidx.compose.animation.core.tween
import androidx.compose.foundation.background
import androidx.compose.foundation.gestures.Orientation
import androidx.compose.foundation.isSystemInDarkTheme
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.BoxScope
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.width
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.runtime.Composable
import androidx.compose.runtime.DisposableEffect
import androidx.compose.runtime.getValue
import androidx.compose.runtime.remember
import androidx.compose.runtime.rememberCoroutineScope
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.alpha
import androidx.compose.ui.draw.drawBehind
@@ -48,7 +41,6 @@ import com.android.compose.animation.scene.SwipeDirection
import com.android.compose.animation.scene.observableTransitionState
import com.android.compose.animation.scene.transitions
import com.android.compose.theme.LocalAndroidColorScheme
import com.android.systemui.Flags
import com.android.systemui.communal.shared.model.CommunalBackgroundType
import com.android.systemui.communal.shared.model.CommunalScenes
import com.android.systemui.communal.shared.model.CommunalTransitionKeys
@@ -156,8 +148,6 @@ fun CommunalContainer(
    val currentSceneKey: SceneKey by
        viewModel.currentScene.collectAsStateWithLifecycle(CommunalScenes.Blank)
    val touchesAllowed by viewModel.touchesAllowed.collectAsStateWithLifecycle()
    val showGestureIndicator by
        viewModel.showGestureIndicator.collectAsStateWithLifecycle(initialValue = false)
    val backgroundType by
        viewModel.communalBackground.collectAsStateWithLifecycle(
            initialValue = CommunalBackgroundType.DEFAULT
@@ -200,19 +190,7 @@ fun CommunalContainer(
                )
        ) {
            // This scene shows nothing only allowing for transitions to the communal scene.
            // TODO(b/339667383): remove this temporary swipe gesture handle
            Row(modifier = Modifier.fillMaxSize(), horizontalArrangement = Arrangement.End) {
                if (showGestureIndicator && Flags.glanceableHubGestureHandle()) {
                    Box(
                        modifier =
                            Modifier.height(220.dp)
                                .width(4.dp)
                                .align(Alignment.CenterVertically)
                                .background(color = Color.White, RoundedCornerShape(4.dp))
                    )
                    Spacer(modifier = Modifier.width(12.dp))
                }
            }
            Box(modifier = Modifier.fillMaxSize())
        }

        scene(
+0 −19
Original line number Diff line number Diff line
@@ -32,11 +32,9 @@ import android.app.DreamManager;
import android.content.res.Resources;
import android.graphics.Region;
import android.os.Handler;
import android.platform.test.annotations.DisableFlags;
import android.platform.test.annotations.EnableFlags;
import android.testing.TestableLooper.RunWithLooper;
import android.view.AttachedSurfaceControl;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewRootImpl;
import android.view.ViewTreeObserver;
@@ -46,7 +44,6 @@ import androidx.test.filters.SmallTest;

import com.android.dream.lowlight.LowLightTransitionCoordinator;
import com.android.keyguard.BouncerPanelExpansionCalculator;
import com.android.systemui.Flags;
import com.android.systemui.SysuiTestCase;
import com.android.systemui.ambient.statusbar.ui.AmbientStatusBarViewController;
import com.android.systemui.ambient.touch.scrim.BouncerlessScrimController;
@@ -100,9 +97,6 @@ public class DreamOverlayContainerViewControllerTest extends SysuiTestCase {
    @Mock
    ViewGroup mDreamOverlayContentView;

    @Mock
    View mHubGestureIndicatorView;

    @Mock
    Handler mHandler;

@@ -156,7 +150,6 @@ public class DreamOverlayContainerViewControllerTest extends SysuiTestCase {
                mDreamOverlayContainerView,
                mComplicationHostViewController,
                mDreamOverlayContentView,
                mHubGestureIndicatorView,
                mAmbientStatusBarViewController,
                mLowLightTransitionCoordinator,
                mTouchInsetSession,
@@ -177,18 +170,6 @@ public class DreamOverlayContainerViewControllerTest extends SysuiTestCase {
                mDreamManager);
    }

    @DisableFlags(Flags.FLAG_COMMUNAL_HUB)
    @Test
    public void testHubGestureIndicatorGoneWhenFlagOff() {
        verify(mHubGestureIndicatorView, never()).setVisibility(View.VISIBLE);
    }

    @EnableFlags({Flags.FLAG_COMMUNAL_HUB, Flags.FLAG_GLANCEABLE_HUB_GESTURE_HANDLE})
    @Test
    public void testHubGestureIndicatorVisibleWhenFlagOn() {
        verify(mHubGestureIndicatorView).setVisibility(View.VISIBLE);
    }

    @Test
    public void testRootSurfaceControlInsetSetOnAttach() {
        mController.onViewAttached();
+0 −20
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?><!--
  ~ Copyright (C) 2024 The Android Open Source Project
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~      http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->

<shape xmlns:android="http://schemas.android.com/apk/res/android">
    <corners android:radius="4dp" />
    <solid android:color="#FFFFFF" />
</shape>
 No newline at end of file
+0 −13
Original line number Diff line number Diff line
@@ -21,19 +21,6 @@
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <ImageView
        android:id="@+id/glanceable_hub_handle"
        android:layout_width="4dp"
        android:layout_height="220dp"
        android:layout_centerVertical="true"
        android:layout_marginEnd="12dp"
        android:background="@drawable/hub_handle"
        android:visibility="gone"
        android:contentDescription="UI indicator for swiping open the glanceable hub"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintTop_toTopOf="parent" />

    <androidx.constraintlayout.widget.ConstraintLayout
        android:id="@+id/dream_overlay_content"
        android:layout_width="match_parent"
Loading