gq$a.java 2.63 KB
import android.support.v7.widget.RecyclerView;
import android.support.v7.widget.RecyclerView.Adapter;
import android.support.v7.widget.RecyclerView.LayoutManager;
import android.support.v7.widget.RecyclerView.LayoutManager.LayoutPrefetchRegistry;
import android.support.v7.widget.RecyclerView.Recycler;
import java.util.Arrays;

public final class gq$a
  implements RecyclerView.LayoutManager.LayoutPrefetchRegistry
{
  int a;
  int b;
  int[] c;
  int d;
  
  public final void a()
  {
    if (this.c != null) {
      Arrays.fill(this.c, -1);
    }
  }
  
  final void a(RecyclerView paramRecyclerView, boolean paramBoolean)
  {
    this.d = 0;
    if (this.c != null) {
      Arrays.fill(this.c, -1);
    }
    RecyclerView.LayoutManager localLayoutManager = paramRecyclerView.m;
    if ((paramRecyclerView.l != null) && (localLayoutManager != null) && (localLayoutManager.isItemPrefetchEnabled()))
    {
      if (!paramBoolean) {
        break label101;
      }
      if (!paramRecyclerView.e.d()) {
        localLayoutManager.collectInitialPrefetchPositions(paramRecyclerView.l.getItemCount(), this);
      }
    }
    for (;;)
    {
      if (this.d > localLayoutManager.w)
      {
        localLayoutManager.w = this.d;
        localLayoutManager.x = paramBoolean;
        paramRecyclerView.d.a();
      }
      return;
      label101:
      if (!paramRecyclerView.hasPendingAdapterUpdates()) {
        localLayoutManager.collectAdjacentPrefetchPositions(this.a, this.b, paramRecyclerView.F, this);
      }
    }
  }
  
  public final boolean a(int paramInt)
  {
    boolean bool2 = false;
    boolean bool1 = bool2;
    int j;
    int i;
    if (this.c != null)
    {
      j = this.d;
      i = 0;
    }
    for (;;)
    {
      bool1 = bool2;
      if (i < j * 2)
      {
        if (this.c[i] == paramInt) {
          bool1 = true;
        }
      }
      else {
        return bool1;
      }
      i += 2;
    }
  }
  
  public final void addPosition(int paramInt1, int paramInt2)
  {
    if (paramInt2 < 0) {
      throw new IllegalArgumentException("Pixel distance must be non-negative");
    }
    int i = this.d * 2;
    if (this.c == null)
    {
      this.c = new int[4];
      Arrays.fill(this.c, -1);
    }
    for (;;)
    {
      this.c[i] = paramInt1;
      this.c[(i + 1)] = paramInt2;
      this.d += 1;
      return;
      if (i >= this.c.length)
      {
        int[] arrayOfInt = this.c;
        this.c = new int[i * 2];
        System.arraycopy(arrayOfInt, 0, this.c, 0, arrayOfInt.length);
      }
    }
  }
}


/* Location:              /home/merong/decompile/hackery-dex2jar.jar!/gq$a.class
 * Java compiler version: 6 (50.0)
 * JD-Core Version:       0.7.1
 */