EdgeEffectCompat.java 4.45 KB
package android.support.v4.widget;

import android.content.Context;
import android.graphics.Canvas;
import android.os.Build.VERSION;
import android.widget.EdgeEffect;
import ey;

public final class EdgeEffectCompat
{
  private static final c b = new a();
  private Object a;
  
  static
  {
    if (Build.VERSION.SDK_INT >= 21)
    {
      b = new d();
      return;
    }
    if (Build.VERSION.SDK_INT >= 14)
    {
      b = new b();
      return;
    }
  }
  
  public EdgeEffectCompat(Context paramContext)
  {
    this.a = b.a(paramContext);
  }
  
  public final boolean draw(Canvas paramCanvas)
  {
    return b.a(this.a, paramCanvas);
  }
  
  public final void finish()
  {
    b.b(this.a);
  }
  
  public final boolean isFinished()
  {
    return b.a(this.a);
  }
  
  public final boolean onAbsorb(int paramInt)
  {
    return b.a(this.a, paramInt);
  }
  
  @Deprecated
  public final boolean onPull(float paramFloat)
  {
    return b.a(this.a, paramFloat);
  }
  
  public final boolean onPull(float paramFloat1, float paramFloat2)
  {
    return b.a(this.a, paramFloat1, paramFloat2);
  }
  
  public final boolean onRelease()
  {
    return b.c(this.a);
  }
  
  public final void setSize(int paramInt1, int paramInt2)
  {
    b.a(this.a, paramInt1, paramInt2);
  }
  
  static final class a
    implements EdgeEffectCompat.c
  {
    public final Object a(Context paramContext)
    {
      return null;
    }
    
    public final void a(Object paramObject, int paramInt1, int paramInt2) {}
    
    public final boolean a(Object paramObject)
    {
      return true;
    }
    
    public final boolean a(Object paramObject, float paramFloat)
    {
      return false;
    }
    
    public final boolean a(Object paramObject, float paramFloat1, float paramFloat2)
    {
      return false;
    }
    
    public final boolean a(Object paramObject, int paramInt)
    {
      return false;
    }
    
    public final boolean a(Object paramObject, Canvas paramCanvas)
    {
      return false;
    }
    
    public final void b(Object paramObject) {}
    
    public final boolean c(Object paramObject)
    {
      return false;
    }
  }
  
  static class b
    implements EdgeEffectCompat.c
  {
    public final Object a(Context paramContext)
    {
      return new EdgeEffect(paramContext);
    }
    
    public final void a(Object paramObject, int paramInt1, int paramInt2)
    {
      ((EdgeEffect)paramObject).setSize(paramInt1, paramInt2);
    }
    
    public final boolean a(Object paramObject)
    {
      return ((EdgeEffect)paramObject).isFinished();
    }
    
    public final boolean a(Object paramObject, float paramFloat)
    {
      return ey.a(paramObject, paramFloat);
    }
    
    public boolean a(Object paramObject, float paramFloat1, float paramFloat2)
    {
      return ey.a(paramObject, paramFloat1);
    }
    
    public final boolean a(Object paramObject, int paramInt)
    {
      ((EdgeEffect)paramObject).onAbsorb(paramInt);
      return true;
    }
    
    public final boolean a(Object paramObject, Canvas paramCanvas)
    {
      return ((EdgeEffect)paramObject).draw(paramCanvas);
    }
    
    public final void b(Object paramObject)
    {
      ((EdgeEffect)paramObject).finish();
    }
    
    public final boolean c(Object paramObject)
    {
      paramObject = (EdgeEffect)paramObject;
      ((EdgeEffect)paramObject).onRelease();
      return ((EdgeEffect)paramObject).isFinished();
    }
  }
  
  static abstract interface c
  {
    public abstract Object a(Context paramContext);
    
    public abstract void a(Object paramObject, int paramInt1, int paramInt2);
    
    public abstract boolean a(Object paramObject);
    
    public abstract boolean a(Object paramObject, float paramFloat);
    
    public abstract boolean a(Object paramObject, float paramFloat1, float paramFloat2);
    
    public abstract boolean a(Object paramObject, int paramInt);
    
    public abstract boolean a(Object paramObject, Canvas paramCanvas);
    
    public abstract void b(Object paramObject);
    
    public abstract boolean c(Object paramObject);
  }
  
  static final class d
    extends EdgeEffectCompat.b
  {
    public final boolean a(Object paramObject, float paramFloat1, float paramFloat2)
    {
      ((EdgeEffect)paramObject).onPull(paramFloat1, paramFloat2);
      return true;
    }
  }
}


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