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

Commit 8800afb0 authored by Phil Weaver's avatar Phil Weaver Committed by Android (Google) Code Review
Browse files

Merge "Send accessibility event on window title change."

parents f57b084f 964c68e0
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -5611,6 +5611,13 @@ public final class ViewRootImpl implements ViewParent,
        }
    }

    /**
     * Notify that the window title changed
     */
    public void onWindowTitleChanged() {
        mAttachInfo.mForceReportNewAttributes = true;
    }

    public void handleDispatchWindowShown() {
        mAttachInfo.mTreeObserver.dispatchOnWindowShown();
    }
+7 −0
Original line number Diff line number Diff line
@@ -540,6 +540,13 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback {
            WindowManager.LayoutParams params = getAttributes();
            if (!TextUtils.equals(title, params.accessibilityTitle)) {
                params.accessibilityTitle = TextUtils.stringOrSpannedString(title);
                if (mDecor != null) {
                    // ViewRootImpl will make sure the change propagates to WindowManagerService
                    ViewRootImpl vr = mDecor.getViewRootImpl();
                    if (vr != null) {
                        vr.onWindowTitleChanged();
                    }
                }
                dispatchWindowAttributesChanged(getAttributes());
            }
        }
+0 −1
Original line number Diff line number Diff line
@@ -1034,7 +1034,6 @@ final class AccessibilityController {
                boolean focusedWindowAdded = false;

                final int visibleWindowCount = visibleWindows.size();
                int skipRemainingWindowsForTaskId = -1;
                HashSet<Integer> skipRemainingWindowsForTasks = new HashSet<>();
                for (int i = visibleWindowCount - 1; i >= 0; i--) {
                    final WindowState windowState = visibleWindows.valueAt(i);
+6 −0
Original line number Diff line number Diff line
@@ -1932,6 +1932,12 @@ public class WindowManagerService extends IWindowManager.Stub
                        || (flagChanges & FLAG_DISMISS_KEYGUARD) != 0)) {
                    win.mAppToken.checkKeyguardFlagsChanged();
                }
                if (((attrChanges & LayoutParams.ACCESSIBILITY_TITLE_CHANGED) != 0)
                        && (mAccessibilityController != null)
                        && (win.getDisplayId() == DEFAULT_DISPLAY)) {
                    // No move or resize, but the controller checks for title changes as well
                    mAccessibilityController.onSomeWindowResizedOrMovedLocked();
                }
            }

            if (DEBUG_LAYOUT) Slog.v(TAG_WM, "Relayout " + win + ": viewVisibility=" + viewVisibility