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

Commit b994ed57 authored by Matt Pietal's avatar Matt Pietal
Browse files

Flag cleanup

Fixes: 409607571
Test: N/A
Flag: EXEMPT flag deleted
Change-Id: Ibed8cf987c9a32be4648e3f5c99403c1aeecdb7f
parent 1606ecb5
Loading
Loading
Loading
Loading
+0 −10
Original line number Diff line number Diff line
@@ -1748,16 +1748,6 @@ flag {
  bug: "357863750"
}

flag {
  name: "ignore_touches_next_to_notification_shelf"
  namespace: "systemui"
  description: "The shelf can vertically overlap the unlock icon. Ignore touches if so."
  bug: "358424256"
   metadata {
       purpose: PURPOSE_BUGFIX
   }
}

flag {
  name: "shade_window_goes_around"
  namespace: "systemui"
+1 −28
Original line number Diff line number Diff line
@@ -13,8 +13,6 @@

package com.android.systemui.statusbar.notification.stack;

import static com.android.systemui.Flags.FLAG_IGNORE_TOUCHES_NEXT_TO_NOTIFICATION_SHELF;

import static junit.framework.Assert.assertEquals;
import static junit.framework.Assert.assertFalse;
import static junit.framework.Assert.assertTrue;
@@ -688,8 +686,7 @@ public class NotificationSwipeHelperTest extends SysuiTestCase {
    }

    @Test
    @EnableFlags(FLAG_IGNORE_TOUCHES_NEXT_TO_NOTIFICATION_SHELF)
    public void testIsTouchInView_notificationShelf_flagEnabled() {
    public void testIsTouchInView_notificationShelf() {
        doReturn(500).when(mShelf).getWidth();
        doReturn(FAKE_ROW_WIDTH).when(mShelf).getActualWidth();
        doReturn(FAKE_ROW_HEIGHT).when(mShelf).getHeight();
@@ -711,30 +708,6 @@ public class NotificationSwipeHelperTest extends SysuiTestCase {
        assertFalse("Touch is not within the view", mSwipeHelper.isTouchInView(mEvent, mShelf));
    }

    @Test
    @DisableFlags(FLAG_IGNORE_TOUCHES_NEXT_TO_NOTIFICATION_SHELF)
    public void testIsTouchInView_notificationShelf_flagDisabled() {
        doReturn(500).when(mShelf).getWidth();
        doReturn(FAKE_ROW_WIDTH).when(mShelf).getActualWidth();
        doReturn(FAKE_ROW_HEIGHT).when(mShelf).getHeight();
        doReturn(FAKE_ROW_HEIGHT).when(mShelf).getActualHeight();

        Answer answer = (Answer) invocation -> {
            int[] arr = invocation.getArgument(0);
            arr[0] = 0;
            arr[1] = 0;
            return null;
        };

        doReturn(5f).when(mEvent).getRawX();
        doReturn(10f).when(mEvent).getRawY();
        doAnswer(answer).when(mShelf).getLocationOnScreen(any());
        assertTrue("Touch is within the view", mSwipeHelper.isTouchInView(mEvent, mShelf));

        doReturn(50f).when(mEvent).getRawX();
        assertTrue("Touch is within the view", mSwipeHelper.isTouchInView(mEvent, mShelf));
    }

    @Test
    public void testContentAlphaRemainsUnchangedWhenNotificationIsNotDismissible() {
        doReturn(FAKE_ROW_WIDTH).when(mNotificationRow).getMeasuredWidth();
+3 −6
Original line number Diff line number Diff line
@@ -24,7 +24,6 @@ import static com.android.internal.jank.InteractionJankMonitor.CUJ_NOTIFICATION_
import static com.android.server.notification.Flags.screenshareNotificationHiding;
import static com.android.systemui.Dependency.ALLOW_NOTIFICATION_LONG_PRESS_NAME;
import static com.android.systemui.Flags.confineNotificationTouchToViewWidth;
import static com.android.systemui.Flags.ignoreTouchesNextToNotificationShelf;
import static com.android.systemui.statusbar.StatusBarState.KEYGUARD;
import static com.android.systemui.statusbar.notification.stack.NotificationStackScrollLayout.OnEmptySpaceClickListener;
import static com.android.systemui.statusbar.notification.stack.NotificationStackScrollLayout.OnOverscrollTopChangedListener;
@@ -624,13 +623,11 @@ public class NotificationStackScrollLayoutController implements Dumpable {

                    // Verify the MotionEvent x,y are actually inside the touch area of the shelf,
                    // since the shelf may be animated down to a collapsed size on keyguard.
                    if (ignoreTouchesNextToNotificationShelf()) {
                    if (child instanceof NotificationShelf shelf) {
                        if (!NotificationSwipeHelper.isTouchInView(ev, shelf)) {
                            return null;
                        }
                    }
                    }
                    if (child instanceof ExpandableNotificationRow row) {
                        ExpandableNotificationRow parent = row.getNotificationParent();
                        if (parent != null && parent.areChildrenExpanded()
+1 −7
Original line number Diff line number Diff line
@@ -18,7 +18,6 @@
package com.android.systemui.statusbar.notification.stack;

import static com.android.internal.jank.InteractionJankMonitor.CUJ_NOTIFICATION_SHADE_ROW_SWIPE;
import static com.android.systemui.Flags.ignoreTouchesNextToNotificationShelf;

import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
@@ -510,14 +509,9 @@ class NotificationSwipeHelper extends SwipeHelper implements NotificationSwipeAc
        final int height = (view instanceof ExpandableView)
                ? ((ExpandableView) view).getActualHeight()
                : view.getHeight();
        final int width;
        if (ignoreTouchesNextToNotificationShelf()) {
            width = (view instanceof NotificationShelf)
        final int width = (view instanceof NotificationShelf)
                ? ((NotificationShelf) view).getActualWidth()
                : view.getWidth();
        } else {
            width = view.getWidth();
        }
        final int rx = (int) ev.getRawX();
        final int ry = (int) ev.getRawY();
        int[] temp = new int[2];