package com.google.android.m4b.maps.bu;

import android.app.Activity;
import android.os.Bundle;
import android.os.RemoteException;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import com.google.android.m4b.maps.GoogleMapOptions;
import com.google.android.m4b.maps.j.b;
import com.google.android.m4b.maps.j.d;
import com.google.android.m4b.maps.model.RuntimeRemoteException;
import com.google.android.m4b.maps.r.al;
import com.google.android.m4b.maps.r.g;
import com.google.android.m4b.maps.r.k.a;
import com.google.android.m4b.maps.r.u;
import com.google.common.base.Preconditions;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

public class an extends k.a
{
  private final a a;
  private x b;
  private GoogleMapOptions c;
  private final List<u> d;

  static
  {
    an.class.getSimpleName();
  }

  private an(a parama)
  {
    this.a = ((a)Preconditions.checkNotNull(parama));
    this.d = new ArrayList();
  }

  public static an a(Activity paramActivity)
  {
    return new an(new a()
    {
      public final x a(LayoutInflater paramAnonymousLayoutInflater, GoogleMapOptions paramAnonymousGoogleMapOptions)
      {
        return s.a(paramAnonymousLayoutInflater, paramAnonymousGoogleMapOptions, this.a);
      }
    });
  }

  public final b a(b paramb1, b paramb2, Bundle paramBundle)
  {
    View localView2;
    if (this.b == null)
    {
      LayoutInflater localLayoutInflater = (LayoutInflater)d.a(paramb1);
      this.b = this.a.a(localLayoutInflater, this.c);
      this.b.a(paramBundle);
      localView2 = this.b.D();
      Iterator localIterator = this.d.iterator();
      while (localIterator.hasNext())
      {
        u localu = (u)localIterator.next();
        try
        {
          this.b.a(localu);
        }
        catch (RemoteException localRemoteException)
        {
          throw new RuntimeRemoteException(localRemoteException);
        }
      }
      this.d.clear();
    }
    View localView1;
    for (Object localObject = localView2; ; localObject = localView1)
    {
      return d.a(localObject);
      localView1 = this.b.D();
      ViewGroup localViewGroup = (ViewGroup)localView1.getParent();
      if (localViewGroup != null)
        localViewGroup.removeView(localView1);
    }
  }

  @Deprecated
  public final g a()
  {
    return this.b;
  }

  public final void a(Bundle paramBundle)
  {
    if (this.c == null)
      this.c = ((GoogleMapOptions)al.a(paramBundle, "MapOptions"));
    if (this.c == null)
      this.c = new GoogleMapOptions();
  }

  public final void a(b paramb, GoogleMapOptions paramGoogleMapOptions, Bundle paramBundle)
  {
    this.c = paramGoogleMapOptions;
  }

  public final void a(u paramu)
  {
    if (this.b != null)
      try
      {
        this.b.a(paramu);
        return;
      }
      catch (RemoteException localRemoteException)
      {
        throw new RuntimeRemoteException(localRemoteException);
      }
    this.d.add(paramu);
  }

  public final void b()
  {
    this.b.p();
  }

  public final void b(Bundle paramBundle)
  {
    if (this.b == null)
    {
      if (this.c != null)
        al.a(paramBundle, "MapOptions", this.c);
      return;
    }
    this.b.b(paramBundle);
  }

  public final void c()
  {
    this.b.q();
  }

  public final void d()
  {
    if (this.b.t())
    {
      this.b.r();
      this.b = null;
    }
  }

  public final void e()
  {
    if (this.b != null)
    {
      this.b.r();
      this.b = null;
    }
    this.c = null;
  }

  public final void f()
  {
    this.b.s();
  }

  public final boolean g()
  {
    return this.b != null;
  }

  public static abstract interface a
  {
    public abstract x a(LayoutInflater paramLayoutInflater, GoogleMapOptions paramGoogleMapOptions);
  }
}

/* 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.an
 * JD-Core Version:    0.6.2
 */