From f89aa3579a42f234b045546257b8e449e2c6fa8f Mon Sep 17 00:00:00 2001 From: Sunny Goyal Date: Mon, 6 Jul 2015 17:19:48 -0700 Subject: [PATCH] Hiding workspace from accessibility when its not visible Bug: 22234780 Change-Id: Ie91ec59c3c3abb26fdf40466ea8173c78acb320f --- src/com/android/launcher3/Workspace.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/com/android/launcher3/Workspace.java b/src/com/android/launcher3/Workspace.java index fb0a54d3c2..451f1245ef 100644 --- a/src/com/android/launcher3/Workspace.java +++ b/src/com/android/launcher3/Workspace.java @@ -1976,7 +1976,7 @@ public class Workspace extends PagedView public Animator setStateWithAnimation(State toState, int toPage, boolean animated, boolean hasOverlaySearchBar, HashMap layerViews) { // Create the animation to the new state - Animator workspaceAnim = mStateTransitionAnimation.getAnimationToState(getState(), + Animator workspaceAnim = mStateTransitionAnimation.getAnimationToState(mState, toState, toPage, animated, hasOverlaySearchBar, layerViews); // Update the current state @@ -1996,6 +1996,9 @@ public class Workspace extends PagedView for (int i = numCustomPages(); i < total; i++) { updateAccessibilityFlags((CellLayout) getPageAt(i), i); } + setImportantForAccessibility((mState == State.NORMAL || mState == State.OVERVIEW) + ? IMPORTANT_FOR_ACCESSIBILITY_AUTO + : IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS); } else { int accessible = mState == State.NORMAL ? IMPORTANT_FOR_ACCESSIBILITY_AUTO :