@MediumTest public void testScrolling_scroll() { if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) { return; } final ScrollView scrollView = (ScrollView) getActivity().findViewById(R.id.scroll_id); final CountDownLatch scrollsMissed = new CountDownLatch(1); scrollView.setAccessibilityDelegate(new AccessibilityDelegate() { @Override public boolean performAccessibilityAction(@NonNull View host, int action, Bundle args) { if (action == AccessibilityNodeInfoCompat.ACTION_SCROLL_FORWARD) { scrollsMissed.countDown(); } return super.performAccessibilityAction(host, action, args); } }); sendKeyEventSync(mMoveFocusEvent); sendKeyEventSync(mScrollForwardEvent); assertEquals(0, scrollsMissed.getCount()); }
public final AccessibilityNodeProviderCompat getAccessibilityNodeProvider(Object paramObject, View paramView) { AccessibilityNodeProvider localAccessibilityNodeProvider = ((View.AccessibilityDelegate)paramObject).getAccessibilityNodeProvider(paramView); if (localAccessibilityNodeProvider != null) { return new AccessibilityNodeProviderCompat(localAccessibilityNodeProvider); } return null; }
public final void setAccessibilityDelegate(View paramView, AccessibilityDelegateCompat paramAccessibilityDelegateCompat) { if (paramAccessibilityDelegateCompat == null) {} for (Object localObject = null;; localObject = paramAccessibilityDelegateCompat.mBridge) { paramView.setAccessibilityDelegate((View.AccessibilityDelegate)localObject); return; } }
public final void a(View paramView, ld paramld) { if (paramld == null) {} for (Object localObject = null;; localObject = paramld.c) { paramView.setAccessibilityDelegate((View.AccessibilityDelegate)localObject); return; } }
public final qb a(Object paramObject, View paramView) { AccessibilityNodeProvider localAccessibilityNodeProvider = ((View.AccessibilityDelegate)paramObject).getAccessibilityNodeProvider(paramView); if (localAccessibilityNodeProvider != null) { return new qb(localAccessibilityNodeProvider); } return null; }
/** * Filters the Autofill suggestions to the ones that we support and shows the popup. * @param suggestions Autofill suggestion data. * @param isRtl @code true if right-to-left text. * @param backgroundColor popup background color, or {@code Color.TRANSPARENT} if unspecified. * @param dividerColor color for divider between popup items, or {@code Color.TRANSPARENT} if * unspecified. * @param isBoldLabel true if suggestion label's type face is {@code Typeface.BOLD}, false if * suggestion label's type face is {@code Typeface.NORMAL}. * @param dropdownItemHeight height of each dropdown item in dimension independent pixel units, * 0 if unspecified. * @param margin Margin for icon, label and between icon and label in dimension independent * pixel units, 0 if not specified. */ @SuppressLint("InlinedApi") public void filterAndShow(AutofillSuggestion[] suggestions, boolean isRtl, int backgroundColor, int dividerColor, int dropdownItemHeight, int margin) { mSuggestions = new ArrayList<AutofillSuggestion>(Arrays.asList(suggestions)); // Remove the AutofillSuggestions with IDs that are not supported by Android ArrayList<DropdownItem> cleanedData = new ArrayList<DropdownItem>(); HashSet<Integer> separators = new HashSet<Integer>(); for (int i = 0; i < suggestions.length; i++) { int itemId = suggestions[i].getSuggestionId(); if (itemId == ITEM_ID_SEPARATOR_ENTRY) { separators.add(cleanedData.size()); } else { cleanedData.add(suggestions[i]); } } setAdapter(new DropdownAdapter(mContext, cleanedData, separators, backgroundColor == Color.TRANSPARENT ? null : backgroundColor, dividerColor == Color.TRANSPARENT ? null : dividerColor, dropdownItemHeight == 0 ? null : dropdownItemHeight, margin == 0 ? null : margin)); setRtl(isRtl); show(); getListView().setOnItemLongClickListener(this); getListView().setAccessibilityDelegate(new AccessibilityDelegate() { @Override public boolean onRequestSendAccessibilityEvent( ViewGroup host, View child, AccessibilityEvent event) { getListView().removeCallbacks(mClearAccessibilityFocusRunnable); if (event.getEventType() == AccessibilityEvent.TYPE_VIEW_ACCESSIBILITY_FOCUS_CLEARED) { getListView().postDelayed( mClearAccessibilityFocusRunnable, CLEAR_ACCESSIBILITY_FOCUS_DELAY_MS); } return super.onRequestSendAccessibilityEvent(host, child, event); } }); }
@Override public void onAttach(Activity activity) { super.onAttach(activity); if (globalData == null) { globalData = ((Globals) getActivity().getApplicationContext()); } settingsManager = globalData.getSettingsManagerInstance(); poiManager = globalData.getPOIManagerInstance(); positionManager = globalData.getPositionManagerInstance(); sensorsManager = globalData.getSensorsManagerInstance(); addressManager = globalData.getAddressManagerInstance(); keyboardManager = globalData.getKeyboardManagerInstance(); ttsInstance = globalData.getTTSInstance(); vibrator = (Vibrator) getActivity().getApplicationContext().getSystemService(Context.VIBRATOR_SERVICE); processedPOIList = new ArrayList<Point>(); mHandler = new Handler(); routeSimulator = new RouteSimulator(); gpsStatusHandler = new Handler(); gpsStatusUpdater = new GPSStatusUpdater(); focusedElement = UIElement.DEFAULT; defaultAccessibilityDelegate = new AccessibilityDelegate() { @Override public void onPopulateAccessibilityEvent(View host, AccessibilityEvent event) { super.onPopulateAccessibilityEvent(host, event); if (event.getEventType() == AccessibilityEvent.TYPE_VIEW_ACCESSIBILITY_FOCUSED) { focusedElement = UIElement.DEFAULT; } } }; // This makes sure that the container activity has implemented // the callback interface. If not, it throws an exception try { mRouterFListener = (MessageFromRouterFragmentListener) ((MainActivity) activity).getMessageFromRouterFragmentListener(); } catch (ClassCastException e) { throw new ClassCastException(activity.toString() + " must implement MessageFromRouterFragmentListener"); } }
public final android.support.v4.view.a.f a(Object paramObject, View paramView) { AccessibilityNodeProvider localAccessibilityNodeProvider = ((View.AccessibilityDelegate)paramObject).getAccessibilityNodeProvider(paramView); if (localAccessibilityNodeProvider != null) return new android.support.v4.view.a.f(localAccessibilityNodeProvider); return null; }
public AccessibilityDelegate getAccessibilityDelegate() { return null; }
public static void setAccessibilityDelegate(View v, @Nullable Object delegate) { v.setAccessibilityDelegate((AccessibilityDelegate) delegate); }
/** * @see View#setAccessibilityDelegate(AccessibilityDelegate) */ public W setAccessibilityDelegate(AccessibilityDelegate delegate) { mView.setAccessibilityDelegate(delegate); return (W)this; }
public void setAccessibilityDelegate(AccessibilityDelegate delegate) { if (!this.mLockAccessibilityDelegate) { super.setAccessibilityDelegate(delegate); } }
public static Object getAccessibilityNodeProvider(Object delegate, View host) { return ((AccessibilityDelegate) delegate).getAccessibilityNodeProvider(host); }
public static boolean performAccessibilityAction(Object delegate, View host, int action, Bundle args) { return ((AccessibilityDelegate) delegate).performAccessibilityAction(host, action, args); }
public static Object newAccessibilityDelegateDefaultImpl() { return new AccessibilityDelegate(); }
public static boolean dispatchPopulateAccessibilityEvent(Object delegate, View host, AccessibilityEvent event) { return ((AccessibilityDelegate) delegate).dispatchPopulateAccessibilityEvent(host, event); }
public static void onInitializeAccessibilityEvent(Object delegate, View host, AccessibilityEvent event) { ((AccessibilityDelegate) delegate).onInitializeAccessibilityEvent(host, event); }
public static void onInitializeAccessibilityNodeInfo(Object delegate, View host, Object info) { ((AccessibilityDelegate) delegate).onInitializeAccessibilityNodeInfo(host, (AccessibilityNodeInfo) info); }
public static void onPopulateAccessibilityEvent(Object delegate, View host, AccessibilityEvent event) { ((AccessibilityDelegate) delegate).onPopulateAccessibilityEvent(host, event); }
public static boolean onRequestSendAccessibilityEvent(Object delegate, ViewGroup host, View child, AccessibilityEvent event) { return ((AccessibilityDelegate) delegate).onRequestSendAccessibilityEvent(host, child, event); }
public static void sendAccessibilityEvent(Object delegate, View host, int eventType) { ((AccessibilityDelegate) delegate).sendAccessibilityEvent(host, eventType); }
public static void sendAccessibilityEventUnchecked(Object delegate, View host, AccessibilityEvent event) { ((AccessibilityDelegate) delegate).sendAccessibilityEventUnchecked(host, event); }
public static Object m1322a() { return new AccessibilityDelegate(); }
public static void m1324a(Object obj, View view, int i) { ((AccessibilityDelegate) obj).sendAccessibilityEvent(view, i); }
public static void m1325a(Object obj, View view, Object obj2) { ((AccessibilityDelegate) obj).onInitializeAccessibilityNodeInfo(view, (AccessibilityNodeInfo) obj2); }
public static boolean m1326a(Object obj, View view, AccessibilityEvent accessibilityEvent) { return ((AccessibilityDelegate) obj).dispatchPopulateAccessibilityEvent(view, accessibilityEvent); }
public static boolean m1327a(Object obj, ViewGroup viewGroup, View view, AccessibilityEvent accessibilityEvent) { return ((AccessibilityDelegate) obj).onRequestSendAccessibilityEvent(viewGroup, view, accessibilityEvent); }
public static void m1328b(Object obj, View view, AccessibilityEvent accessibilityEvent) { ((AccessibilityDelegate) obj).onInitializeAccessibilityEvent(view, accessibilityEvent); }
public static void m1329c(Object obj, View view, AccessibilityEvent accessibilityEvent) { ((AccessibilityDelegate) obj).onPopulateAccessibilityEvent(view, accessibilityEvent); }
public static void m1330d(Object obj, View view, AccessibilityEvent accessibilityEvent) { ((AccessibilityDelegate) obj).sendAccessibilityEventUnchecked(view, accessibilityEvent); }
public static void m1154a(View view, Object obj) { view.setAccessibilityDelegate((AccessibilityDelegate) obj); }
public static Object m1332a(Object obj, View view) { return ((AccessibilityDelegate) obj).getAccessibilityNodeProvider(view); }
public static boolean m1333a(Object obj, View view, int i, Bundle bundle) { return ((AccessibilityDelegate) obj).performAccessibilityAction(view, i, bundle); }