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

Commit f5a19f0f authored by Luca Zuccarini's avatar Luca Zuccarini
Browse files

Clean up aconfig flag shade_launch_accessibility.

Fix: 409608400
Flag: EXEMPT flag cleanup
Test: EXEMPT flag cleanup
Change-Id: Iaf1b1e066a19873b0620415a9b657618bef18e94
parent f0df0aa3
Loading
Loading
Loading
Loading
+0 −10
Original line number Diff line number Diff line
@@ -1887,16 +1887,6 @@ flag {
    }
}

flag {
   name: "shade_launch_accessibility"
   namespace: "systemui"
   description: "Intercept accessibility focus events for the Shade during launch animations to avoid stray TalkBack events."
   bug: "379222226"
   metadata {
        purpose: PURPOSE_BUGFIX
   }
}

flag {
  name: "expand_collapse_privacy_dialog"
  namespace: "systemui"
+0 −1
Original line number Diff line number Diff line
@@ -259,7 +259,6 @@ class NotificationShadeWindowViewTest : SysuiTestCase() {
    }

    @Test
    @EnableFlags(AConfigFlags.FLAG_SHADE_LAUNCH_ACCESSIBILITY)
    fun requestSendAccessibilityEvent_duringLaunchAnimation_blocksFocusEvent() {
        underTest.setAnimatingContentLaunch(true)

+1 −3
Original line number Diff line number Diff line
@@ -55,7 +55,6 @@ import android.view.accessibility.AccessibilityEvent;
import com.android.app.viewcapture.ViewCaptureFactory;
import com.android.internal.view.FloatingActionMode;
import com.android.internal.widget.floatingtoolbar.FloatingToolbar;
import com.android.systemui.Flags;
import com.android.systemui.scene.ui.view.WindowRootView;
import com.android.systemui.shade.shared.flag.ShadeWindowGoesAround;
import com.android.systemui.statusbar.phone.ConfigurationForwarder;
@@ -171,8 +170,7 @@ public class NotificationShadeWindowView extends WindowRootView {

    @Override
    public boolean requestSendAccessibilityEvent(View child, AccessibilityEvent event) {
        if (Flags.shadeLaunchAccessibility() && mAnimatingContentLaunch
                && event.getEventType() == TYPE_VIEW_ACCESSIBILITY_FOCUSED) {
        if (mAnimatingContentLaunch && event.getEventType() == TYPE_VIEW_ACCESSIBILITY_FOCUSED) {
            // Block accessibility focus events during launch animations to avoid stray TalkBack
            // announcements.
            return false;
+8 −13
Original line number Diff line number Diff line
@@ -16,7 +16,6 @@

package com.android.systemui.shade;

import static com.android.systemui.Flags.shadeLaunchAccessibility;
import static com.android.systemui.Flags.communalShadeTouchHandlingFixes;
import static com.android.systemui.keyguard.shared.model.KeyguardState.DREAMING;
import static com.android.systemui.keyguard.shared.model.KeyguardState.LOCKSCREEN;
@@ -249,13 +248,11 @@ public class NotificationShadeWindowViewController implements Dumpable {
                Edge.create(LOCKSCREEN, DREAMING)),
                mLockscreenToDreamingTransition);
        Flow<Boolean> isLaunchAnimationRunning =
                shadeLaunchAccessibility()
                        ? combineFlows(
                combineFlows(
                        notificationLaunchAnimationInteractor.isLaunchAnimationRunning(),
                        shadeAnimationInteractor.isLaunchingActivity(),
                        (notificationLaunching, shadeLaunching) ->
                                        notificationLaunching || shadeLaunching)
                        : notificationLaunchAnimationInteractor.isLaunchAnimationRunning();
                                notificationLaunching || shadeLaunching);
        collectFlow(
                mView,
                isLaunchAnimationRunning,
@@ -740,11 +737,9 @@ public class NotificationShadeWindowViewController implements Dumpable {
                mLaunchAnimationTimeout = mClock.uptimeMillis() + 5000;
            }

            if (shadeLaunchAccessibility()) {
            // The view needs to know when an animation is ongoing so it can intercept
            // unnecessary accessibility events.
            mView.setAnimatingContentLaunch(running);
            }

            mExpandAnimationRunning = running;
            mNotificationShadeWindowController.setLaunchingActivity(mExpandAnimationRunning);
+6 −11
Original line number Diff line number Diff line
package com.android.systemui.statusbar.phone

import android.view.View
import com.android.systemui.Flags
import com.android.systemui.animation.ActivityTransitionAnimator
import com.android.systemui.animation.TransitionAnimator
import com.android.systemui.animation.TransitionAnimator.Companion.getProgress
@@ -42,16 +41,12 @@ class StatusBarTransitionAnimatorController(
    }

    override fun onTransitionAnimationStart(isExpandingFullyAbove: Boolean) {
        if (Flags.shadeLaunchAccessibility()) {
        // We set this before calling the delegate to make sure that accessibility is disabled
        // for the whole duration of the transition, so that we don't have stray TalkBack events
        // once the animating view becomes invisible.
        shadeAnimationInteractor.setIsLaunchingActivity(true)
        delegate.onTransitionAnimationStart(isExpandingFullyAbove)
        } else {
            delegate.onTransitionAnimationStart(isExpandingFullyAbove)
            shadeAnimationInteractor.setIsLaunchingActivity(true)
        }

        if (!isExpandingFullyAbove) {
            shadeController.collapseWithDuration(
                ActivityTransitionAnimator.TIMINGS.totalDuration.toInt()
Loading