package com.google.android.m4b.maps.bu;

import android.graphics.Bitmap;
import android.graphics.Bitmap.Config;
import android.graphics.Canvas;
import android.os.RemoteException;
import android.view.TextureView;
import android.view.View;
import com.google.android.m4b.maps.j.d;
import com.google.android.m4b.maps.model.RuntimeRemoteException;
import com.google.android.m4b.maps.r.af;
import java.util.concurrent.Executor;

public abstract class a
  implements bo
{
  protected final View a;
  protected final Executor b;
  private final boolean c;
  private final View d;
  private final View e;

  protected a(View paramView1, View paramView2, View paramView3, boolean paramBoolean, Executor paramExecutor)
  {
    this.a = paramView1;
    this.d = paramView2;
    this.e = paramView3;
    this.c = paramBoolean;
    this.b = paramExecutor;
  }

  protected static void a(af paramaf, Bitmap paramBitmap)
  {
    try
    {
      if (cd.a())
      {
        paramaf.a(paramBitmap);
        return;
      }
      paramaf.a(d.a(paramBitmap));
      return;
    }
    catch (RemoteException localRemoteException)
    {
      throw new RuntimeRemoteException(localRemoteException);
    }
  }

  protected abstract void a(Bitmap paramBitmap, af paramaf, boolean paramBoolean);

  protected final void a(Bitmap paramBitmap, boolean paramBoolean)
  {
    Canvas localCanvas = new Canvas(paramBitmap);
    this.d.draw(localCanvas);
    if (paramBoolean)
      this.e.draw(localCanvas);
  }

  public final void b(final Bitmap paramBitmap, final af paramaf, boolean paramBoolean)
  {
    try
    {
      int i = this.a.getWidth();
      int j = this.a.getHeight();
      if (paramBitmap == null)
      {
        paramBitmap = Bitmap.createBitmap(i, j, Bitmap.Config.ARGB_8888);
        if (!this.c)
          break label103;
        this.b.execute(new Runnable()
        {
          public final void run()
          {
            int i = a.this.a.getWidth();
            int j = a.this.a.getHeight();
            if ((paramBitmap.getWidth() != i) || (paramBitmap.getHeight() != j));
            for (Bitmap localBitmap = Bitmap.createBitmap(i, j, Bitmap.Config.ARGB_8888); ; localBitmap = paramBitmap)
            {
              ((TextureView)a.this.a).getBitmap(localBitmap);
              a.this.a(localBitmap, this.b);
              a.a(paramaf, localBitmap);
              return;
            }
          }
        });
      }
      while (true)
      {
        return;
        if ((paramBitmap.getWidth() == i) && (paramBitmap.getHeight() == j))
          break;
        bx.a(5, "The Bitmap provided in the snapshot() method does not match the map's dimensions, hence another Bitmap is allocated with the right dimensions. If you think this is due to the fact that the map was resized, you can ignore this message. Otherwise, you should check the dimensions of the Bitmap passed to the method.");
        paramBitmap = Bitmap.createBitmap(i, j, Bitmap.Config.ARGB_8888);
        break;
        label103: a(paramBitmap, paramaf, false);
      }
    }
    finally
    {
    }
  }
}

/* Location:           C:\Documents and Settings\Cesar Cabello Cea\Mis documentos\Downloads\apk-downloader\com.ikea.kompis-6_dex2jar.jar
 * Qualified Name:     com.google.android.m4b.maps.bu.a
 * JD-Core Version:    0.6.2
 */