BitmapCompat.java 2 KB
package android.support.v4.graphics;

import android.graphics.Bitmap;
import android.os.Build.VERSION;

public final class BitmapCompat
{
  static final b a = new a();
  
  static
  {
    int i = Build.VERSION.SDK_INT;
    if (i >= 19)
    {
      a = new e();
      return;
    }
    if (i >= 18)
    {
      a = new d();
      return;
    }
    if (i >= 12)
    {
      a = new c();
      return;
    }
  }
  
  public static int getAllocationByteCount(Bitmap paramBitmap)
  {
    return a.b(paramBitmap);
  }
  
  public static boolean hasMipMap(Bitmap paramBitmap)
  {
    return a.a(paramBitmap);
  }
  
  public static void setHasMipMap(Bitmap paramBitmap, boolean paramBoolean)
  {
    a.a(paramBitmap, paramBoolean);
  }
  
  static class a
    implements BitmapCompat.b
  {
    public void a(Bitmap paramBitmap, boolean paramBoolean) {}
    
    public boolean a(Bitmap paramBitmap)
    {
      return false;
    }
    
    public int b(Bitmap paramBitmap)
    {
      return paramBitmap.getRowBytes() * paramBitmap.getHeight();
    }
  }
  
  static abstract interface b
  {
    public abstract void a(Bitmap paramBitmap, boolean paramBoolean);
    
    public abstract boolean a(Bitmap paramBitmap);
    
    public abstract int b(Bitmap paramBitmap);
  }
  
  static class c
    extends BitmapCompat.a
  {
    public int b(Bitmap paramBitmap)
    {
      return paramBitmap.getByteCount();
    }
  }
  
  static class d
    extends BitmapCompat.c
  {
    public final void a(Bitmap paramBitmap, boolean paramBoolean)
    {
      paramBitmap.setHasMipMap(paramBoolean);
    }
    
    public final boolean a(Bitmap paramBitmap)
    {
      return paramBitmap.hasMipMap();
    }
  }
  
  static final class e
    extends BitmapCompat.d
  {
    public final int b(Bitmap paramBitmap)
    {
      return paramBitmap.getAllocationByteCount();
    }
  }
}


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