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

Commit 5add4db1 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Remove launched flag notifications_hun_accessibility_refactor." into main

parents 0e63fbbb 377473e2
Loading
Loading
Loading
Loading
+0 −10
Original line number Original line Diff line number Diff line
@@ -160,16 +160,6 @@ flag {
   }
   }
}
}


flag {
    name: "notifications_hun_accessibility_refactor"
    namespace: "systemui"
    description: "Refactors where notification HUN accessibility events happen"
    bug: "397507681"
    metadata {
        purpose: PURPOSE_BUGFIX
    }
}

flag {
flag {
    name: "notification_avalanche_throttle_hun"
    name: "notification_avalanche_throttle_hun"
    namespace: "systemui"
    namespace: "systemui"
+0 −9
Original line number Original line Diff line number Diff line
@@ -672,15 +672,6 @@ public final class NotificationEntry extends ListEntry {
        }
        }
    }
    }


    public void sendAccessibilityEvent(int eventType) {
        if (com.android.systemui.Flags.notificationsHunAccessibilityRefactor()) {
            return;
        }
        if (row != null) {
            row.sendAccessibilityEvent(eventType);
        }
    }

    /**
    /**
     * Used by NotificationMediaManager to determine... things
     * Used by NotificationMediaManager to determine... things
     * @return {@code true} if we are a media notification
     * @return {@code true} if we are a media notification
+0 −12
Original line number Original line Diff line number Diff line
@@ -28,7 +28,6 @@ import android.util.ArrayMap;
import android.util.ArraySet;
import android.util.ArraySet;
import android.util.Log;
import android.util.Log;
import android.util.Pools;
import android.util.Pools;
import android.view.accessibility.AccessibilityEvent;
import android.view.accessibility.AccessibilityManager;
import android.view.accessibility.AccessibilityManager;


import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.annotations.VisibleForTesting;
@@ -37,7 +36,6 @@ import com.android.internal.logging.UiEvent;
import com.android.internal.logging.UiEventLogger;
import com.android.internal.logging.UiEventLogger;
import com.android.internal.policy.SystemBarUtils;
import com.android.internal.policy.SystemBarUtils;
import com.android.systemui.EventLogTags;
import com.android.systemui.EventLogTags;
import com.android.systemui.Flags;
import com.android.systemui.dagger.SysUISingleton;
import com.android.systemui.dagger.SysUISingleton;
import com.android.systemui.dagger.qualifiers.Main;
import com.android.systemui.dagger.qualifiers.Main;
import com.android.systemui.plugins.statusbar.StatusBarStateController;
import com.android.systemui.plugins.statusbar.StatusBarStateController;
@@ -333,9 +331,6 @@ public class HeadsUpManagerImpl
            // Add new entry and begin managing it
            // Add new entry and begin managing it
            mHeadsUpEntryMap.put(entry.getKey(), headsUpEntry);
            mHeadsUpEntryMap.put(entry.getKey(), headsUpEntry);
            onEntryAdded(headsUpEntry, requestedPinnedStatus);
            onEntryAdded(headsUpEntry, requestedPinnedStatus);
            if (!Flags.notificationsHunAccessibilityRefactor()) {
                entry.sendAccessibilityEvent(AccessibilityEvent.TYPE_WINDOW_CONTENT_CHANGED);
            }
            if (!NotificationBundleUi.isEnabled()) {
            if (!NotificationBundleUi.isEnabled()) {
                entry.setIsHeadsUpEntry(true);
                entry.setIsHeadsUpEntry(true);
            }
            }
@@ -410,10 +405,6 @@ public class HeadsUpManagerImpl
            // with the groupmanager
            // with the groupmanager
            return;
            return;
        }
        }
        if (headsUpEntry.mEntry != null && !Flags.notificationsHunAccessibilityRefactor()) {
            headsUpEntry.mEntry.sendAccessibilityEvent(
                    AccessibilityEvent.TYPE_WINDOW_CONTENT_CHANGED);
        }
        if (requestedPinnedStatus.isPinned()) {
        if (requestedPinnedStatus.isPinned()) {
            headsUpEntry.updateEntry(true /* updatePostTime */, "updateNotification");
            headsUpEntry.updateEntry(true /* updatePostTime */, "updateNotification");
            PinnedStatus pinnedStatus =
            PinnedStatus pinnedStatus =
@@ -664,9 +655,6 @@ public class HeadsUpManagerImpl
            entry.demoteStickyHun();
            entry.demoteStickyHun();
            mHeadsUpEntryMap.remove(key);
            mHeadsUpEntryMap.remove(key);
            onEntryRemoved(finalHeadsUpEntry, reason);
            onEntryRemoved(finalHeadsUpEntry, reason);
            if (!Flags.notificationsHunAccessibilityRefactor()) {
                entry.sendAccessibilityEvent(AccessibilityEvent.TYPE_WINDOW_CONTENT_CHANGED);
            }
            if (NotificationThrottleHun.isEnabled()) {
            if (NotificationThrottleHun.isEnabled()) {
                finalHeadsUpEntry.cancelAutoRemovalCallbacks("removeEntry");
                finalHeadsUpEntry.cancelAutoRemovalCallbacks("removeEntry");
            } else {
            } else {
+3 −4
Original line number Original line Diff line number Diff line
@@ -1353,7 +1353,7 @@ public class ExpandableNotificationRow extends ActivatableNotificationView
        if (intrinsicHeight != getIntrinsicHeight()) {
        if (intrinsicHeight != getIntrinsicHeight()) {
            notifyHeightChanged(/* needsAnimation= */ false);
            notifyHeightChanged(/* needsAnimation= */ false);
        }
        }
        if (Flags.notificationsHunAccessibilityRefactor() && !pinnedStatus.isPinned()) {
        if (!pinnedStatus.isPinned()) {
            setAccessibilityLiveRegion(View.ACCESSIBILITY_LIVE_REGION_NONE);
            setAccessibilityLiveRegion(View.ACCESSIBILITY_LIVE_REGION_NONE);
        }
        }
        if (pinnedStatus.isPinned()) {
        if (pinnedStatus.isPinned()) {
@@ -3855,7 +3855,7 @@ public class ExpandableNotificationRow extends ActivatableNotificationView
    protected void onAppearAnimationStarted(boolean isAppear) {
    protected void onAppearAnimationStarted(boolean isAppear) {
        mLogger.logAppearAnimationStarted(mLoggingKey, /* isAppear = */ isAppear);
        mLogger.logAppearAnimationStarted(mLoggingKey, /* isAppear = */ isAppear);


        if (Flags.notificationsHunAccessibilityRefactor() && !isAppear) {
        if (!isAppear) {
            // Stop using a live region as soon as a disappear animation starts so that we don't
            // Stop using a live region as soon as a disappear animation starts so that we don't
            // re-announce the notification as it's animating away.
            // re-announce the notification as it's animating away.
            setAccessibilityLiveRegion(View.ACCESSIBILITY_LIVE_REGION_NONE);
            setAccessibilityLiveRegion(View.ACCESSIBILITY_LIVE_REGION_NONE);
@@ -3876,8 +3876,7 @@ public class ExpandableNotificationRow extends ActivatableNotificationView
                /* isAppear = */ wasAppearing,
                /* isAppear = */ wasAppearing,
                /* cancelled = */ cancelled
                /* cancelled = */ cancelled
        );
        );
        if (Flags.notificationsHunAccessibilityRefactor()
        if (PromotedNotificationUi.isEnabled()
                && PromotedNotificationUi.isEnabled()
                && !cancelled
                && !cancelled
                && wasAppearing
                && wasAppearing
                && mPinnedStatus == PinnedStatus.PinnedByUser) {
                && mPinnedStatus == PinnedStatus.PinnedByUser) {