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

Commit 10d312b5 authored by George Mount's avatar George Mount
Browse files

Reset accessibility after Activity enter transition.

Bug 25504648

Invisible views don't respond to accessibility. The transition
system uses a sneaky way to make an invisible view visible
with the GhostView, so the views becoming visible doesn't
trigger the accessibility system to recognize the newly-
visible views. This forces accessibility to rescan the contents
after the transition completes.

Change-Id: If57114b7e7ee304707d53dd235cd7795df8f509f
parent d5f94468
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -31,6 +31,7 @@ import android.view.ViewGroup;
import android.view.ViewGroupOverlay;
import android.view.ViewTreeObserver;
import android.view.Window;
import android.view.accessibility.AccessibilityEvent;

import java.util.ArrayList;

@@ -500,6 +501,10 @@ class EnterTransitionCoordinator extends ActivityTransitionCoordinator {
    @Override
    protected void onTransitionsComplete() {
        moveSharedElementsFromOverlay();
        final ViewGroup decorView = getDecor();
        if (decorView != null) {
            decorView.sendAccessibilityEvent(AccessibilityEvent.TYPE_WINDOW_CONTENT_CHANGED);
        }
    }

    private void sharedElementTransitionStarted() {