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.ad.a;
import com.google.android.m4b.maps.r.ag;
import com.google.android.m4b.maps.r.ah;
import com.google.android.m4b.maps.r.al;
import com.google.android.m4b.maps.r.am;
import com.google.android.m4b.maps.r.aq;
import com.google.android.m4b.maps.r.f;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

public class SupportStreetViewPanoramaFragment extends Fragment
{
  public static final String ARG_OPTIONS = "StreetViewPanoramaOptions";
  private final b a = new b(this);
  private StreetViewPanorama b;

  public static SupportStreetViewPanoramaFragment newInstance()
  {
    return new SupportStreetViewPanoramaFragment();
  }

  public static SupportStreetViewPanoramaFragment newInstance(StreetViewPanoramaOptions paramStreetViewPanoramaOptions)
  {
    SupportStreetViewPanoramaFragment localSupportStreetViewPanoramaFragment = new SupportStreetViewPanoramaFragment();
    Bundle localBundle = new Bundle();
    localBundle.putParcelable("StreetViewPanoramaOptions", paramStreetViewPanoramaOptions);
    localSupportStreetViewPanoramaFragment.setArguments(localBundle);
    return localSupportStreetViewPanoramaFragment;
  }

  @Deprecated
  public final StreetViewPanorama getStreetViewPanorama()
  {
    this.a.g();
    if (this.a.a() == null);
    for (ah localah = null; localah == null; localah = ((a)this.a.a()).f())
      return null;
    ag localag;
    try
    {
      localag = localah.a();
      if (localag == null)
        return null;
    }
    catch (RemoteException localRemoteException)
    {
      throw new RuntimeRemoteException(localRemoteException);
    }
    if ((this.b == null) || (this.b.a().asBinder() != localag.asBinder()))
      this.b = new StreetViewPanorama(localag);
    return this.b;
  }

  public void getStreetViewPanoramaAsync(OnStreetViewPanoramaReadyCallback paramOnStreetViewPanoramaReadyCallback)
  {
    l.b("getStreetViewPanoramaAsync() must be called on the main thread");
    this.a.a(paramOnStreetViewPanoramaReadyCallback);
  }

  public void onActivityCreated(Bundle paramBundle)
  {
    if (paramBundle != null)
      paramBundle.setClassLoader(SupportStreetViewPanoramaFragment.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);
    Bundle localBundle = new Bundle();
    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(SupportStreetViewPanoramaFragment.class.getClassLoader());
    super.onSaveInstanceState(paramBundle);
    this.a.b(paramBundle);
  }

  public void setArguments(Bundle paramBundle)
  {
    super.setArguments(paramBundle);
  }

  static final class a
    implements aq
  {
    private final Fragment a;
    private final ah b;

    public a(Fragment paramFragment, ah paramah)
    {
      this.b = ((ah)l.a(paramah));
      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)
    {
      try
      {
        this.b.a(d.a(paramActivity), null, 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("StreetViewPanoramaOptions")))
          al.a(paramBundle, "StreetViewPanoramaOptions", localBundle.getParcelable("StreetViewPanoramaOptions"));
        this.b.a(paramBundle);
        return;
      }
      catch (RemoteException localRemoteException)
      {
        throw new RuntimeRemoteException(localRemoteException);
      }
    }

    public final void a(final OnStreetViewPanoramaReadyCallback paramOnStreetViewPanoramaReadyCallback)
    {
      try
      {
        this.b.a(new ad.a()
        {
          public final void a(ag paramAnonymousag)
          {
            paramOnStreetViewPanoramaReadyCallback.onStreetViewPanoramaReady(new StreetViewPanorama(paramAnonymousag));
          }
        });
        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 ah f()
    {
      return this.b;
    }
  }

  static final class b extends a<SupportStreetViewPanoramaFragment.a>
  {
    private final Fragment a;
    private e<SupportStreetViewPanoramaFragment.a> b;
    private Activity c;
    private final List<OnStreetViewPanoramaReadyCallback> d = new ArrayList();

    b(Fragment paramFragment)
    {
      this.a = paramFragment;
    }

    public final void a(OnStreetViewPanoramaReadyCallback paramOnStreetViewPanoramaReadyCallback)
    {
      if (a() != null)
      {
        ((SupportStreetViewPanoramaFragment.a)a()).a(paramOnStreetViewPanoramaReadyCallback);
        return;
      }
      this.d.add(paramOnStreetViewPanoramaReadyCallback);
    }

    protected final void a(e<SupportStreetViewPanoramaFragment.a> parame)
    {
      this.b = parame;
      g();
    }

    public final void g()
    {
      if ((this.c != null) && (this.b != null) && (a() == null));
      try
      {
        MapsInitializer.initialize(this.c);
        ah localah = am.a(this.c).c(d.a(this.c));
        this.b.a(new SupportStreetViewPanoramaFragment.a(this.a, localah));
        Iterator localIterator = this.d.iterator();
        while (localIterator.hasNext())
        {
          OnStreetViewPanoramaReadyCallback localOnStreetViewPanoramaReadyCallback = (OnStreetViewPanoramaReadyCallback)localIterator.next();
          ((SupportStreetViewPanoramaFragment.a)a()).a(localOnStreetViewPanoramaReadyCallback);
        }
      }
      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.SupportStreetViewPanoramaFragment
 * JD-Core Version:    0.6.2
 */