package com.google.android.m4b.maps;

import android.app.Activity;
import android.content.Context;
import android.os.Bundle;
import android.os.RemoteException;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.FrameLayout;
import com.google.android.m4b.maps.d.c;
import com.google.android.m4b.maps.j.a;
import com.google.android.m4b.maps.j.d;
import com.google.android.m4b.maps.j.e;
import com.google.android.m4b.maps.model.RuntimeRemoteException;
import com.google.android.m4b.maps.r.ak;
import com.google.android.m4b.maps.r.am;
import com.google.android.m4b.maps.r.f;
import com.google.android.m4b.maps.r.g;
import com.google.android.m4b.maps.r.u.a;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

public class MapView extends FrameLayout
{
  private final b a;
  private GoogleMap b;

  public MapView(Context paramContext)
  {
    super(paramContext);
    this.a = new b(this, paramContext, null);
  }

  public MapView(Context paramContext, AttributeSet paramAttributeSet)
  {
    super(paramContext, paramAttributeSet);
    this.a = new b(this, paramContext, GoogleMapOptions.createFromAttributes(paramContext, paramAttributeSet));
  }

  public MapView(Context paramContext, AttributeSet paramAttributeSet, int paramInt)
  {
    super(paramContext, paramAttributeSet, paramInt);
    this.a = new b(this, paramContext, GoogleMapOptions.createFromAttributes(paramContext, paramAttributeSet));
  }

  public MapView(Context paramContext, GoogleMapOptions paramGoogleMapOptions)
  {
    super(paramContext);
    this.a = new b(this, paramContext, paramGoogleMapOptions);
  }

  @Deprecated
  public final GoogleMap getMap()
  {
    if (this.b != null)
      return this.b;
    this.a.g();
    if (this.a.a() == null)
      return null;
    try
    {
      this.b = new GoogleMap(((a)this.a.a()).f().a());
      return this.b;
    }
    catch (RemoteException localRemoteException)
    {
      throw new RuntimeRemoteException(localRemoteException);
    }
  }

  public void getMapAsync(OnMapReadyCallback paramOnMapReadyCallback)
  {
    com.google.android.m4b.maps.g.l.b("getMapAsync() must be called on the main thread");
    this.a.a(paramOnMapReadyCallback);
  }

  public final void onCreate(Bundle paramBundle)
  {
    this.a.a(paramBundle);
    if (this.a.a() == null)
      a.a(this);
  }

  public final void onDestroy()
  {
    this.a.e();
  }

  public final void onLowMemory()
  {
    this.a.f();
  }

  public final void onPause()
  {
    this.a.c();
  }

  public final void onResume()
  {
    this.a.b();
  }

  public final void onSaveInstanceState(Bundle paramBundle)
  {
    this.a.b(paramBundle);
  }

  static final class a
    implements ak
  {
    private final ViewGroup a;
    private final com.google.android.m4b.maps.r.l b;
    private View c;

    public a(ViewGroup paramViewGroup, com.google.android.m4b.maps.r.l paraml)
    {
      this.b = ((com.google.android.m4b.maps.r.l)com.google.android.m4b.maps.g.l.a(paraml));
      this.a = ((ViewGroup)com.google.android.m4b.maps.g.l.a(paramViewGroup));
    }

    public final View a(LayoutInflater paramLayoutInflater, ViewGroup paramViewGroup, Bundle paramBundle)
    {
      throw new UnsupportedOperationException("onCreateView not allowed on MapViewDelegate");
    }

    public final void a()
    {
      try
      {
        this.b.b();
        return;
      }
      catch (RemoteException localRemoteException)
      {
        throw new RuntimeRemoteException(localRemoteException);
      }
    }

    public final void a(Activity paramActivity, Bundle paramBundle1, Bundle paramBundle2)
    {
      throw new UnsupportedOperationException("onInflate not allowed on MapViewDelegate");
    }

    public final void a(Bundle paramBundle)
    {
      try
      {
        this.b.a(paramBundle);
        this.c = ((View)d.a(this.b.f()));
        this.a.removeAllViews();
        this.a.addView(this.c);
        return;
      }
      catch (RemoteException localRemoteException)
      {
        throw new RuntimeRemoteException(localRemoteException);
      }
    }

    public final void a(final OnMapReadyCallback paramOnMapReadyCallback)
    {
      try
      {
        this.b.a(new u.a()
        {
          public final void a(g paramAnonymousg)
          {
            paramOnMapReadyCallback.onMapReady(new GoogleMap(paramAnonymousg));
          }
        });
        return;
      }
      catch (RemoteException localRemoteException)
      {
        throw new RuntimeRemoteException(localRemoteException);
      }
    }

    public final void b()
    {
      try
      {
        this.b.c();
        return;
      }
      catch (RemoteException localRemoteException)
      {
        throw new RuntimeRemoteException(localRemoteException);
      }
    }

    public final void b(Bundle paramBundle)
    {
      try
      {
        this.b.b(paramBundle);
        return;
      }
      catch (RemoteException localRemoteException)
      {
        throw new RuntimeRemoteException(localRemoteException);
      }
    }

    public final void c()
    {
      throw new UnsupportedOperationException("onDestroyView not allowed on MapViewDelegate");
    }

    public final void d()
    {
      try
      {
        this.b.d();
        return;
      }
      catch (RemoteException localRemoteException)
      {
        throw new RuntimeRemoteException(localRemoteException);
      }
    }

    public final void e()
    {
      try
      {
        this.b.e();
        return;
      }
      catch (RemoteException localRemoteException)
      {
        throw new RuntimeRemoteException(localRemoteException);
      }
    }

    public final com.google.android.m4b.maps.r.l f()
    {
      return this.b;
    }
  }

  static final class b extends a<MapView.a>
  {
    private final ViewGroup a;
    private final Context b;
    private e<MapView.a> c;
    private final GoogleMapOptions d;
    private final List<OnMapReadyCallback> e = new ArrayList();

    b(ViewGroup paramViewGroup, Context paramContext, GoogleMapOptions paramGoogleMapOptions)
    {
      this.a = paramViewGroup;
      this.b = paramContext;
      this.d = paramGoogleMapOptions;
    }

    public final void a(OnMapReadyCallback paramOnMapReadyCallback)
    {
      if (a() != null)
      {
        ((MapView.a)a()).a(paramOnMapReadyCallback);
        return;
      }
      this.e.add(paramOnMapReadyCallback);
    }

    protected final void a(e<MapView.a> parame)
    {
      this.c = parame;
      g();
    }

    public final void g()
    {
      if ((this.c != null) && (a() == null));
      try
      {
        com.google.android.m4b.maps.r.l locall = am.a(this.b).a(d.a(this.b), this.d);
        this.c.a(new MapView.a(this.a, locall));
        Iterator localIterator = this.e.iterator();
        while (localIterator.hasNext())
        {
          OnMapReadyCallback localOnMapReadyCallback = (OnMapReadyCallback)localIterator.next();
          ((MapView.a)a()).a(localOnMapReadyCallback);
        }
      }
      catch (RemoteException localRemoteException)
      {
        throw new RuntimeRemoteException(localRemoteException);
        this.e.clear();
        return;
      }
      catch (c localc)
      {
      }
    }
  }
}

/* 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.MapView
 * JD-Core Version:    0.6.2
 */