RecyclerViewAccessibilityDelegate.java 3.73 KB
package android.support.v7.widget;

import android.os.Bundle;
import android.support.v4.view.AccessibilityDelegateCompat;
import android.support.v4.view.accessibility.AccessibilityNodeInfoCompat;
import android.view.View;
import android.view.accessibility.AccessibilityEvent;

public class RecyclerViewAccessibilityDelegate
  extends AccessibilityDelegateCompat
{
  final RecyclerView a;
  final AccessibilityDelegateCompat c = new AccessibilityDelegateCompat()
  {
    public final void onInitializeAccessibilityNodeInfo(View paramAnonymousView, AccessibilityNodeInfoCompat paramAnonymousAccessibilityNodeInfoCompat)
    {
      super.onInitializeAccessibilityNodeInfo(paramAnonymousView, paramAnonymousAccessibilityNodeInfoCompat);
      if ((!RecyclerViewAccessibilityDelegate.this.a.hasPendingAdapterUpdates()) && (RecyclerViewAccessibilityDelegate.this.a.getLayoutManager() != null)) {
        RecyclerViewAccessibilityDelegate.this.a.getLayoutManager().a(paramAnonymousView, paramAnonymousAccessibilityNodeInfoCompat);
      }
    }
    
    public final boolean performAccessibilityAction(View paramAnonymousView, int paramAnonymousInt, Bundle paramAnonymousBundle)
    {
      if (super.performAccessibilityAction(paramAnonymousView, paramAnonymousInt, paramAnonymousBundle)) {
        return true;
      }
      if ((!RecyclerViewAccessibilityDelegate.this.a.hasPendingAdapterUpdates()) && (RecyclerViewAccessibilityDelegate.this.a.getLayoutManager() != null))
      {
        RecyclerView.LayoutManager localLayoutManager = RecyclerViewAccessibilityDelegate.this.a.getLayoutManager();
        return localLayoutManager.performAccessibilityActionForItem(localLayoutManager.q.d, localLayoutManager.q.F, paramAnonymousView, paramAnonymousInt, paramAnonymousBundle);
      }
      return false;
    }
  };
  
  public RecyclerViewAccessibilityDelegate(RecyclerView paramRecyclerView)
  {
    this.a = paramRecyclerView;
  }
  
  public AccessibilityDelegateCompat getItemDelegate()
  {
    return this.c;
  }
  
  public void onInitializeAccessibilityEvent(View paramView, AccessibilityEvent paramAccessibilityEvent)
  {
    super.onInitializeAccessibilityEvent(paramView, paramAccessibilityEvent);
    paramAccessibilityEvent.setClassName(RecyclerView.class.getName());
    if (((paramView instanceof RecyclerView)) && (!this.a.hasPendingAdapterUpdates()))
    {
      paramView = (RecyclerView)paramView;
      if (paramView.getLayoutManager() != null) {
        paramView.getLayoutManager().onInitializeAccessibilityEvent(paramAccessibilityEvent);
      }
    }
  }
  
  public void onInitializeAccessibilityNodeInfo(View paramView, AccessibilityNodeInfoCompat paramAccessibilityNodeInfoCompat)
  {
    super.onInitializeAccessibilityNodeInfo(paramView, paramAccessibilityNodeInfoCompat);
    paramAccessibilityNodeInfoCompat.setClassName(RecyclerView.class.getName());
    if ((!this.a.hasPendingAdapterUpdates()) && (this.a.getLayoutManager() != null))
    {
      paramView = this.a.getLayoutManager();
      paramView.onInitializeAccessibilityNodeInfo(paramView.q.d, paramView.q.F, paramAccessibilityNodeInfoCompat);
    }
  }
  
  public boolean performAccessibilityAction(View paramView, int paramInt, Bundle paramBundle)
  {
    if (super.performAccessibilityAction(paramView, paramInt, paramBundle)) {
      return true;
    }
    if ((!this.a.hasPendingAdapterUpdates()) && (this.a.getLayoutManager() != null))
    {
      paramView = this.a.getLayoutManager();
      return paramView.performAccessibilityAction(paramView.q.d, paramView.q.F, paramInt, paramBundle);
    }
    return false;
  }
}


/* Location:              /home/merong/decompile/hackery-dex2jar.jar!/android/support/v7/widget/RecyclerViewAccessibilityDelegate.class
 * Java compiler version: 6 (50.0)
 * JD-Core Version:       0.7.1
 */