package com.google.android.m4b.maps;

import android.app.Activity;
import android.os.Bundle;
import android.os.RemoteException;
import android.support.v4.app.Fragment;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import com.google.android.m4b.maps.d.c;
import com.google.android.m4b.maps.g.l;
import com.google.android.m4b.maps.j.a;
import com.google.android.m4b.maps.j.b;
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.al;
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.k;
import com.google.android.m4b.maps.r.u.a;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

public class SupportMapFragment extends Fragment
{
  public static final String ARG_OPTIONS = "MapOptions";
  private final b a = new b(this);
  private GoogleMap b;

  public static SupportMapFragment newInstance()
  {
    return new SupportMapFragment();
  }

  public static SupportMapFragment newInstance(GoogleMapOptions paramGoogleMapOptions)
  {
    SupportMapFragment localSupportMapFragment = new SupportMapFragment();
    Bundle localBundle = new Bundle();
    localBundle.putParcelable("MapOptions", paramGoogleMapOptions);
    localSupportMapFragment.setArguments(localBundle);
    return localSupportMapFragment;
  }

  @Deprecated
  public final GoogleMap getMap()
  {
    this.a.g();
    if (this.a.a() == null);
    for (k localk = null; localk == null; localk = ((a)this.a.a()).f())
      return null;
    g localg;
    try
    {
      localg = localk.a();
      if (localg == null)
        return null;
    }
    catch (RemoteException localRemoteException)
    {
      throw new RuntimeRemoteException(localRemoteException);
    }
    if ((this.b == null) || (this.b.a().asBinder() != localg.asBinder()))
      this.b = new GoogleMap(localg);
    return this.b;
  }

  public void getMapAsync(OnMapReadyCallback paramOnMapReadyCallback)
  {
    l.b("getMapAsync must be called on the main thread.");
    this.a.a(paramOnMapReadyCallback);
  }

  public void onActivityCreated(Bundle paramBundle)
  {
    if (paramBundle != null)
      paramBundle.setClassLoader(SupportMapFragment.class.getClassLoader());
    super.onActivityCreated(paramBundle);
  }

  public void onAttach(Activity paramActivity)
  {
    super.onAttach(paramActivity);
    b.a(this.a, paramActivity);
  }

  public void onCreate(Bundle paramBundle)
  {
    super.onCreate(paramBundle);
    this.a.a(paramBundle);
  }

  public View onCreateView(LayoutInflater paramLayoutInflater, ViewGroup paramViewGroup, Bundle paramBundle)
  {
    return this.a.a(paramLayoutInflater, paramViewGroup, paramBundle);
  }

  public void onDestroy()
  {
    this.a.e();
    super.onDestroy();
  }

  public void onDestroyView()
  {
    this.a.d();
    super.onDestroyView();
  }

  public void onInflate(Activity paramActivity, AttributeSet paramAttributeSet, Bundle paramBundle)
  {
    super.onInflate(paramActivity, paramAttributeSet, paramBundle);
    b.a(this.a, paramActivity);
    GoogleMapOptions localGoogleMapOptions = GoogleMapOptions.createFromAttributes(paramActivity, paramAttributeSet);
    Bundle localBundle = new Bundle();
    localBundle.putParcelable("MapOptions", localGoogleMapOptions);
    this.a.a(paramActivity, localBundle, paramBundle);
  }

  public void onLowMemory()
  {
    this.a.f();
    super.onLowMemory();
  }

  public void onPause()
  {
    this.a.c();
    super.onPause();
  }

  public void onResume()
  {
    super.onResume();
    this.a.b();
  }

  public void onSaveInstanceState(Bundle paramBundle)
  {
    if (paramBundle != null)
      paramBundle.setClassLoader(SupportMapFragment.class.getClassLoader());
    super.onSaveInstanceState(paramBundle);
    this.a.b(paramBundle);
  }

  public void setArguments(Bundle paramBundle)
  {
    super.setArguments(paramBundle);
  }

  static final class a
    implements ak
  {
    private final Fragment a;
    private final k b;

    public a(Fragment paramFragment, k paramk)
    {
      this.b = ((k)l.a(paramk));
      this.a = ((Fragment)l.a(paramFragment));
    }

    public final View a(LayoutInflater paramLayoutInflater, ViewGroup paramViewGroup, Bundle paramBundle)
    {
      try
      {
        b localb = this.b.a(d.a(paramLayoutInflater), d.a(paramViewGroup), paramBundle);
        return (View)d.a(localb);
      }
      catch (RemoteException localRemoteException)
      {
        throw new RuntimeRemoteException(localRemoteException);
      }
    }

    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)
    {
      GoogleMapOptions localGoogleMapOptions = (GoogleMapOptions)paramBundle1.getParcelable("MapOptions");
      try
      {
        this.b.a(d.a(paramActivity), localGoogleMapOptions, paramBundle2);
        return;
      }
      catch (RemoteException localRemoteException)
      {
        throw new RuntimeRemoteException(localRemoteException);
      }
    }

    public final void a(Bundle paramBundle)
    {
      if (paramBundle == null);
      try
      {
        paramBundle = new Bundle();
        Bundle localBundle = this.a.getArguments();
        if ((localBundle != null) && (localBundle.containsKey("MapOptions")))
          al.a(paramBundle, "MapOptions", localBundle.getParcelable("MapOptions"));
        this.b.a(paramBundle);
        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()
    {
      try
      {
        this.b.d();
        return;
      }
      catch (RemoteException localRemoteException)
      {
        throw new RuntimeRemoteException(localRemoteException);
      }
    }

    public final void d()
    {
      try
      {
        this.b.e();
        return;
      }
      catch (RemoteException localRemoteException)
      {
        throw new RuntimeRemoteException(localRemoteException);
      }
    }

    public final void e()
    {
      try
      {
        this.b.f();
        return;
      }
      catch (RemoteException localRemoteException)
      {
        throw new RuntimeRemoteException(localRemoteException);
      }
    }

    public final k f()
    {
      return this.b;
    }
  }

  static final class b extends a<SupportMapFragment.a>
  {
    private final Fragment a;
    private e<SupportMapFragment.a> b;
    private Activity c;
    private final List<OnMapReadyCallback> d = new ArrayList();

    b(Fragment paramFragment)
    {
      this.a = paramFragment;
    }

    public final void a(OnMapReadyCallback paramOnMapReadyCallback)
    {
      if (a() != null)
      {
        ((SupportMapFragment.a)a()).a(paramOnMapReadyCallback);
        return;
      }
      this.d.add(paramOnMapReadyCallback);
    }

    protected final void a(e<SupportMapFragment.a> parame)
    {
      this.b = parame;
      g();
    }

    public final void g()
    {
      if ((this.c != null) && (this.b != null) && (a() == null));
      try
      {
        MapsInitializer.initialize(this.c);
        k localk = am.a(this.c).b(d.a(this.c));
        this.b.a(new SupportMapFragment.a(this.a, localk));
        Iterator localIterator = this.d.iterator();
        while (localIterator.hasNext())
        {
          OnMapReadyCallback localOnMapReadyCallback = (OnMapReadyCallback)localIterator.next();
          ((SupportMapFragment.a)a()).a(localOnMapReadyCallback);
        }
      }
      catch (RemoteException localRemoteException)
      {
        throw new RuntimeRemoteException(localRemoteException);
        this.d.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.SupportMapFragment
 * JD-Core Version:    0.6.2
 */