package com.google.android.m4b.maps.bu;

import android.app.Activity;
import android.os.Bundle;
import android.os.Handler;
import android.os.Looper;
import android.os.RemoteException;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import com.google.android.m4b.maps.StreetViewPanoramaOptions;
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.ad;
import com.google.android.m4b.maps.r.ag;
import com.google.android.m4b.maps.r.ah.a;
import com.google.android.m4b.maps.r.al;
import com.google.common.base.Preconditions;

public final class bq extends ah.a
{
  private final a a;
  private br b;
  private StreetViewPanoramaOptions c;
  private Handler d;

  private bq(a parama)
  {
    this.a = ((a)Preconditions.checkNotNull(parama));
    this.d = new Handler(Looper.getMainLooper());
  }

  public static bq a(Activity paramActivity)
  {
    return new bq(new a()
    {
      public final br a(LayoutInflater paramAnonymousLayoutInflater, StreetViewPanoramaOptions paramAnonymousStreetViewPanoramaOptions)
      {
        return br.a(paramAnonymousLayoutInflater, paramAnonymousStreetViewPanoramaOptions, this.a);
      }
    });
  }

  public final b a(b paramb1, b paramb2, Bundle paramBundle)
  {
    if (this.b == null)
    {
      LayoutInflater localLayoutInflater = (LayoutInflater)d.a(paramb1);
      this.b = this.a.a(localLayoutInflater, this.c);
      this.b.a(paramBundle);
    }
    View localView;
    for (Object localObject = this.b.j(); ; localObject = localView)
    {
      return d.a(localObject);
      localView = this.b.j();
      ViewGroup localViewGroup = (ViewGroup)localView.getParent();
      if (localViewGroup != null)
        localViewGroup.removeView(localView);
    }
  }

  @Deprecated
  public final ag a()
  {
    return this.b;
  }

  public final void a(Bundle paramBundle)
  {
    if (this.c == null)
      this.c = ((StreetViewPanoramaOptions)al.a(paramBundle, "StreetViewPanoramaOptions"));
    if (this.c == null)
      this.c = new StreetViewPanoramaOptions();
  }

  public final void a(b paramb, StreetViewPanoramaOptions paramStreetViewPanoramaOptions, Bundle paramBundle)
  {
    this.c = paramStreetViewPanoramaOptions;
  }

  public final void a(final ad paramad)
  {
    if (this.b != null)
      this.d.post(new Runnable()
      {
        public final void run()
        {
          try
          {
            if (bq.a(bq.this) != null)
              paramad.a(bq.a(bq.this));
            return;
          }
          catch (RemoteException localRemoteException)
          {
            throw new RuntimeRemoteException(localRemoteException);
          }
        }
      });
  }

  public final void b()
  {
    this.b.g();
  }

  public final void b(Bundle paramBundle)
  {
    if (this.b == null)
    {
      if (this.c != null)
        al.a(paramBundle, "StreetViewPanoramaOptions", this.c);
      return;
    }
    this.b.b(paramBundle);
  }

  public final void c()
  {
    this.b.h();
  }

  public final void d()
  {
    if (this.b.k())
    {
      this.b.i();
      this.b = null;
    }
  }

  public final void e()
  {
    if (this.b != null)
    {
      this.b.i();
      this.b = null;
    }
    this.c = null;
  }

  public final void f()
  {
  }

  public final boolean g()
  {
    return this.b != null;
  }

  public static abstract interface a
  {
    public abstract br a(LayoutInflater paramLayoutInflater, StreetViewPanoramaOptions paramStreetViewPanoramaOptions);
  }
}

/* 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.bq
 * JD-Core Version:    0.6.2
 */