package com.google.android.m4b.maps.bu;

import android.content.Context;
import android.content.res.Resources;
import android.graphics.Bitmap;
import android.graphics.Bitmap.Config;
import android.graphics.Canvas;
import android.os.RemoteException;
import android.view.View;
import android.view.View.MeasureSpec;
import android.view.ViewGroup;
import android.view.ViewGroup.LayoutParams;
import android.widget.LinearLayout;
import com.google.android.m4b.maps.R.drawable;
import com.google.android.m4b.maps.model.internal.IMarkerDelegate;
import com.google.android.m4b.maps.r.h;
import com.google.android.m4b.maps.r.i.a;
import com.google.common.annotations.VisibleForTesting;

public class af extends i.a
{
  private final by a;
  private final ViewGroup b;
  private final ae c;
  private h d;

  static
  {
    af.class.getSimpleName();
  }

  @VisibleForTesting
  private af(by paramby, ViewGroup paramViewGroup, ae paramae)
  {
    this.a = paramby;
    this.b = paramViewGroup;
    this.c = paramae;
  }

  // ERROR //
  @VisibleForTesting
  private View a(IMarkerDelegate paramIMarkerDelegate)
  {
    // Byte code:
    //   0: aload_0
    //   1: getfield 36	com/google/android/m4b/maps/bu/af:d	Lcom/google/android/m4b/maps/r/h;
    //   4: ifnull +68 -> 72
    //   7: aload_0
    //   8: getfield 36	com/google/android/m4b/maps/bu/af:d	Lcom/google/android/m4b/maps/r/h;
    //   11: aload_1
    //   12: invokeinterface 41 2 0
    //   17: invokestatic 46	com/google/android/m4b/maps/j/d:a	(Lcom/google/android/m4b/maps/j/b;)Ljava/lang/Object;
    //   20: checkcast 48	android/view/View
    //   23: astore_3
    //   24: aload_3
    //   25: ifnonnull +133 -> 158
    //   28: aload_0
    //   29: getfield 36	com/google/android/m4b/maps/bu/af:d	Lcom/google/android/m4b/maps/r/h;
    //   32: ifnull +55 -> 87
    //   35: aload_0
    //   36: getfield 36	com/google/android/m4b/maps/bu/af:d	Lcom/google/android/m4b/maps/r/h;
    //   39: aload_1
    //   40: invokeinterface 50 2 0
    //   45: invokestatic 46	com/google/android/m4b/maps/j/d:a	(Lcom/google/android/m4b/maps/j/b;)Ljava/lang/Object;
    //   48: checkcast 48	android/view/View
    //   51: astore 5
    //   53: aload 5
    //   55: ifnonnull +82 -> 137
    //   58: aload_1
    //   59: invokeinterface 55 1 0
    //   64: invokestatic 61	com/google/common/base/Strings:isNullOrEmpty	(Ljava/lang/String;)Z
    //   67: ifeq +38 -> 105
    //   70: aconst_null
    //   71: areturn
    //   72: aconst_null
    //   73: astore_3
    //   74: goto -50 -> 24
    //   77: astore_2
    //   78: new 63	com/google/android/m4b/maps/model/RuntimeRemoteException
    //   81: dup
    //   82: aload_2
    //   83: invokespecial 66	com/google/android/m4b/maps/model/RuntimeRemoteException:<init>	(Landroid/os/RemoteException;)V
    //   86: athrow
    //   87: aconst_null
    //   88: astore 5
    //   90: goto -37 -> 53
    //   93: astore 4
    //   95: new 63	com/google/android/m4b/maps/model/RuntimeRemoteException
    //   98: dup
    //   99: aload 4
    //   101: invokespecial 66	com/google/android/m4b/maps/model/RuntimeRemoteException:<init>	(Landroid/os/RemoteException;)V
    //   104: athrow
    //   105: aload_0
    //   106: getfield 31	com/google/android/m4b/maps/bu/af:c	Lcom/google/android/m4b/maps/bu/ae;
    //   109: aload_1
    //   110: invokeinterface 55 1 0
    //   115: invokevirtual 71	com/google/android/m4b/maps/bu/ae:a	(Ljava/lang/String;)V
    //   118: aload_0
    //   119: getfield 31	com/google/android/m4b/maps/bu/af:c	Lcom/google/android/m4b/maps/bu/ae;
    //   122: aload_1
    //   123: invokeinterface 74 1 0
    //   128: invokevirtual 76	com/google/android/m4b/maps/bu/ae:b	(Ljava/lang/String;)V
    //   131: aload_0
    //   132: getfield 31	com/google/android/m4b/maps/bu/af:c	Lcom/google/android/m4b/maps/bu/ae;
    //   135: astore 5
    //   137: aload_0
    //   138: getfield 29	com/google/android/m4b/maps/bu/af:b	Landroid/view/ViewGroup;
    //   141: invokevirtual 81	android/view/ViewGroup:removeAllViews	()V
    //   144: aload_0
    //   145: getfield 29	com/google/android/m4b/maps/bu/af:b	Landroid/view/ViewGroup;
    //   148: aload 5
    //   150: invokevirtual 85	android/view/ViewGroup:addView	(Landroid/view/View;)V
    //   153: aload_0
    //   154: getfield 29	com/google/android/m4b/maps/bu/af:b	Landroid/view/ViewGroup;
    //   157: astore_3
    //   158: aload_3
    //   159: areturn
    //
    // Exception table:
    //   from	to	target	type
    //   0	24	77	android/os/RemoteException
    //   28	53	93	android/os/RemoteException
  }

  public static af a(by paramby, Context paramContext, Resources paramResources)
  {
    LinearLayout localLinearLayout = new LinearLayout(paramContext);
    localLinearLayout.setLayoutParams(new ViewGroup.LayoutParams(-2, -2));
    localLinearLayout.setOrientation(1);
    localLinearLayout.setBackgroundDrawable(paramResources.getDrawable(R.drawable.popup_pointer_button_normal));
    return new af(paramby, localLinearLayout, ae.a(paramContext));
  }

  public final Bitmap a(IMarkerDelegate paramIMarkerDelegate, int paramInt1, int paramInt2)
  {
    try
    {
      View localView2 = a(paramIMarkerDelegate);
      localView1 = localView2;
      if (localView1 == null)
        return null;
    }
    catch (RemoteException localRemoteException)
    {
      View localView1;
      int k;
      int m;
      do
      {
        while (true)
        {
          localRemoteException.printStackTrace();
          localView1 = null;
        }
        int i = View.MeasureSpec.makeMeasureSpec(paramInt1, -2147483648);
        int j = View.MeasureSpec.makeMeasureSpec(paramInt2, -2147483648);
        localView1.setLayoutParams(new ViewGroup.LayoutParams(-2, -2));
        localView1.measure(i, j);
        k = localView1.getMeasuredWidth();
        m = localView1.getMeasuredHeight();
      }
      while ((k == 0) || (m == 0));
      localView1.layout(0, 0, k, m);
      Bitmap localBitmap = Bitmap.createBitmap(k, m, Bitmap.Config.ARGB_8888);
      localView1.draw(new Canvas(localBitmap));
      return localBitmap;
    }
  }

  public final void a(h paramh)
  {
    this.a.a();
    this.d = paramh;
  }
}

/* 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.af
 * JD-Core Version:    0.6.2
 */