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

Commit afab4fd0 authored by Svetoslav's avatar Svetoslav Committed by Android Git Automerger
Browse files

am c6eeacd9: am c38bc5ab: Merge "Lockscreen widgets not always announced." into jb-mr2-dev

* commit 'c6eeacd9':
  Lockscreen widgets not always announced.
parents 68a13f3d c6eeacd9
Loading
Loading
Loading
Loading
+3 −6
Original line number Original line Diff line number Diff line
@@ -6632,12 +6632,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
     * @hide
     * @hide
     */
     */
    public void clearAccessibilityFocus() {
    public void clearAccessibilityFocus() {
        if ((mPrivateFlags2 & PFLAG2_ACCESSIBILITY_FOCUSED) != 0) {
        clearAccessibilityFocusNoCallbacks();
            mPrivateFlags2 &= ~PFLAG2_ACCESSIBILITY_FOCUSED;
            invalidate();
            sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_ACCESSIBILITY_FOCUS_CLEARED);
            notifyAccessibilityStateChanged();
        }
        // Clear the global reference of accessibility focus if this
        // Clear the global reference of accessibility focus if this
        // view or any of its descendants had accessibility focus.
        // view or any of its descendants had accessibility focus.
        ViewRootImpl viewRootImpl = getViewRootImpl();
        ViewRootImpl viewRootImpl = getViewRootImpl();
@@ -6684,6 +6679,8 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
        if ((mPrivateFlags2 & PFLAG2_ACCESSIBILITY_FOCUSED) != 0) {
        if ((mPrivateFlags2 & PFLAG2_ACCESSIBILITY_FOCUSED) != 0) {
            mPrivateFlags2 &= ~PFLAG2_ACCESSIBILITY_FOCUSED;
            mPrivateFlags2 &= ~PFLAG2_ACCESSIBILITY_FOCUSED;
            invalidate();
            invalidate();
            sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_ACCESSIBILITY_FOCUS_CLEARED);
            notifyAccessibilityStateChanged();
        }
        }
    }
    }
+1 −0
Original line number Original line Diff line number Diff line
@@ -169,6 +169,7 @@ public class KeyguardWidgetPager extends PagedView implements PagedView.PageSwit
            KeyguardWidgetFrame newWidgetPage = getWidgetPageAt(newPageIndex);
            KeyguardWidgetFrame newWidgetPage = getWidgetPageAt(newPageIndex);
            if (newWidgetPage != null) {
            if (newWidgetPage != null) {
                newWidgetPage.onActive(true);
                newWidgetPage.onActive(true);
                newWidgetPage.setImportantForAccessibility(View.IMPORTANT_FOR_ACCESSIBILITY_YES);
                newWidgetPage.requestAccessibilityFocus();
                newWidgetPage.requestAccessibilityFocus();
            }
            }
            if (mParent != null && AccessibilityManager.getInstance(mContext).isEnabled()) {
            if (mParent != null && AccessibilityManager.getInstance(mContext).isEnabled()) {