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

Commit c5932a89 authored by Daniel Norman's avatar Daniel Norman
Browse files

Changes window and event flags to new PURPOSE_BUGFIX type.

(Requires renaming the flags.)

Bug: 277305460
Bug: 322444245
Test: n/a (mechanical rename)
Change-Id: I27d39fcf0febedc76cdb3173b5e9d9338a5c75ab
parent 9a1acc6b
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -104,7 +104,7 @@ import static android.view.WindowManager.PROPERTY_COMPAT_ALLOW_SANDBOXING_VIEW_B
import static android.view.WindowManagerGlobal.RELAYOUT_RES_CANCEL_AND_REDRAW;
import static android.view.WindowManagerGlobal.RELAYOUT_RES_CONSUME_ALWAYS_SYSTEM_BARS;
import static android.view.WindowManagerGlobal.RELAYOUT_RES_SURFACE_CHANGED;
import static android.view.accessibility.Flags.fixMergedContentChangeEvent;
import static android.view.accessibility.Flags.fixMergedContentChangeEventV2;
import static android.view.accessibility.Flags.forceInvertColor;
import static android.view.accessibility.Flags.reduceWindowContentChangedEventThrottle;
import static android.view.flags.Flags.toolkitFrameRateTypingReadOnly;
@@ -11796,7 +11796,7 @@ public final class ViewRootImpl implements ViewParent,
            }
            if (mSource != null) {
                if (fixMergedContentChangeEvent()) {
                if (fixMergedContentChangeEventV2()) {
                    View newSource = getCommonPredecessor(mSource, source);
                    if (newSource != null) {
                        newSource = newSource.getSelfOrParentImportantForA11y();
+4 −1
Original line number Diff line number Diff line
@@ -56,9 +56,12 @@ flag {

flag {
    namespace: "accessibility"
    name: "fix_merged_content_change_event"
    name: "fix_merged_content_change_event_v2"
    description: "Fixes event type and source of content change event merged in ViewRootImpl"
    bug: "277305460"
    metadata {
        purpose: PURPOSE_BUGFIX
    }
}

flag {
+4 −1
Original line number Diff line number Diff line
@@ -24,10 +24,13 @@ flag {
}

flag {
    name: "compute_window_changes_on_a11y"
    name: "compute_window_changes_on_a11y_v2"
    namespace: "accessibility"
    description: "Computes accessibility window changes in accessibility instead of wm package."
    bug: "322444245"
    metadata {
        purpose: PURPOSE_BUGFIX
    }
}

flag {
+3 −3
Original line number Diff line number Diff line
@@ -445,7 +445,7 @@ public class AccessibilityWindowManager {
        public void onWindowsForAccessibilityChanged(boolean forceSend, int topFocusedDisplayId,
                IBinder topFocusedWindowToken, @NonNull List<WindowInfo> windows) {
            synchronized (mLock) {
                if (!Flags.computeWindowChangesOnA11y()) {
                if (!Flags.computeWindowChangesOnA11yV2()) {
                    // If the flag is enabled, it's already done in #createWindowInfoListLocked.
                    updateWindowsByWindowAttributesLocked(windows);
                }
@@ -491,7 +491,7 @@ public class AccessibilityWindowManager {

        /**
         * Called when the windows for accessibility changed. This is called if
         * {@link com.android.server.accessibility.Flags.FLAG_COMPUTE_WINDOW_CHANGES_ON_A11Y} is
         * {@link com.android.server.accessibility.Flags.FLAG_COMPUTE_WINDOW_CHANGES_ON_A11Y_V2} is
         * true.
         *
         * @param forceSend             Send the windows for accessibility even if they haven't
@@ -996,7 +996,7 @@ public class AccessibilityWindowManager {
            final int windowId = findWindowIdLocked(userId, window.token);

            // With the flag enabled, createWindowInfoListLocked() already removes invalid windows.
            if (!Flags.computeWindowChangesOnA11y()) {
            if (!Flags.computeWindowChangesOnA11yV2()) {
                if (windowId < 0) {
                    return null;
                }
+3 −3
Original line number Diff line number Diff line
@@ -1678,7 +1678,7 @@ final class AccessibilityController {
                mA11yWindowsPopulator.populateVisibleWindowsOnScreenLocked(
                        mDisplayId, visibleWindows);

                if (!com.android.server.accessibility.Flags.computeWindowChangesOnA11y()) {
                if (!com.android.server.accessibility.Flags.computeWindowChangesOnA11yV2()) {
                    windows = buildWindowInfoListLocked(visibleWindows, screenSize);
                }

@@ -1687,7 +1687,7 @@ final class AccessibilityController {
                topFocusedWindowToken = topFocusedWindowState.mClient.asBinder();
            }

            if (com.android.server.accessibility.Flags.computeWindowChangesOnA11y()) {
            if (com.android.server.accessibility.Flags.computeWindowChangesOnA11yV2()) {
                mCallback.onAccessibilityWindowsChanged(forceSend, topFocusedDisplayId,
                        topFocusedWindowToken, screenSize, visibleWindows);
            } else {
@@ -1702,7 +1702,7 @@ final class AccessibilityController {
            mInitialized = true;
        }

        // Here are old code paths, called when computeWindowChangesOnA11y flag is disabled.
        // Here are old code paths, called when computeWindowChangesOnA11yV2 flag is disabled.
        // LINT.IfChange

        /**
Loading