Views with node providers are important for accessibility in auto mode.

1. If a view's important for accessibility attribute is set to auto the
   framework is responsible to determine if it really is. Views with
   accessibility node providers should be important for accessibilty
   since they are roots of virtual view trees and such trees are
   always important.

bug:6843043

Change-Id: I4b352c59fdefdf9ad220714a43ecb9e01d1c1c1f
diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java
index 043d1d4..697f38e 100644
--- a/core/java/android/view/View.java
+++ b/core/java/android/view/View.java
@@ -6387,7 +6387,8 @@
             case IMPORTANT_FOR_ACCESSIBILITY_NO:
                 return false;
             case IMPORTANT_FOR_ACCESSIBILITY_AUTO:
-                return isActionableForAccessibility() || hasListenersForAccessibility();
+                return isActionableForAccessibility() || hasListenersForAccessibility()
+                        || getAccessibilityNodeProvider() != null;
             default:
                 throw new IllegalArgumentException("Unknow important for accessibility mode: "
                         + mode);