package com.google.android.m4b.maps.bl;

import android.view.GestureDetector.SimpleOnGestureListener;
import android.view.MotionEvent;
import com.google.android.m4b.maps.ak.e;
import com.google.android.m4b.maps.ak.r;
import com.google.android.m4b.maps.am.b;
import com.google.android.m4b.maps.az.h;
import com.google.android.m4b.maps.az.i.a;
import com.google.android.m4b.maps.az.j;
import com.google.android.m4b.maps.az.l;
import com.google.android.m4b.maps.az.p;

public final class aq extends GestureDetector.SimpleOnGestureListener
  implements i.a
{
  private static final float c;
  private static final float d;
  private static final double e;
  private final float a;
  private final float b;
  private final b f;
  private c g;
  private MotionEvent h;
  private float i;
  private float j;
  private a k = a.a;

  static
  {
    if (b.d);
    for (float f1 = 0.997F; ; f1 = 0.999F)
    {
      c = f1;
      d = 1.0F / c;
      e = Math.log(2.0D);
      return;
    }
  }

  public aq(b paramb)
  {
    this.f = paramb;
    this.g = new c();
    this.b = e.e().a(20);
    this.a = e.e().a(20);
  }

  public final void a(boolean paramBoolean)
  {
    this.g.a = paramBoolean;
  }

  public final boolean a()
  {
    return this.g.a;
  }

  public final boolean a(j paramj)
  {
    if (this.g.e)
    {
      paramj.a(this.f.getWidth(), this.f.getHeight());
      float f1 = 57.295776F * paramj.c();
      float f2 = paramj.a();
      float f3 = paramj.b();
      this.f.x().b(f2, f3, f1);
      return true;
    }
    return false;
  }

  public final boolean a(l paraml)
  {
    if (this.g.b)
    {
      if (paraml.e())
      {
        float f5 = this.f.x().a(-1.0F, 330);
        this.f.a(f5, this.f.getWidth() / 2.0F, this.f.getHeight() / 2.0F);
      }
    }
    else
      return true;
    float f1 = (float)(Math.log(paraml.c()) / e);
    float f2 = paraml.a();
    float f3 = paraml.b();
    if ((paraml.d()) && (paraml.c() > c) && (paraml.c() < d));
    for (int m = 1; ; m = 0)
    {
      if (m != 0)
        f1 = 0.0F;
      float f4 = this.f.x().a(f1, f2, f3);
      this.f.a(f4, f2, f3);
      return true;
    }
  }

  public final boolean a(p paramp)
  {
    boolean bool1 = this.g.d;
    boolean bool2 = false;
    if (bool1)
    {
      this.f.x().b(paramp.a(), 0);
      bool2 = true;
    }
    return bool2;
  }

  public final void b(boolean paramBoolean)
  {
    this.g.b = paramBoolean;
  }

  public final boolean b()
  {
    return this.g.b;
  }

  public final void c(boolean paramBoolean)
  {
    this.g.d = paramBoolean;
  }

  public final boolean c()
  {
    return this.g.d;
  }

  public final void d(boolean paramBoolean)
  {
    this.g.e = paramBoolean;
  }

  public final boolean d()
  {
    return this.g.e;
  }

  public final boolean onDoubleTap(MotionEvent paramMotionEvent)
  {
    this.f.y();
    if (this.f.b(paramMotionEvent.getX(), paramMotionEvent.getY()))
      return true;
    this.k = a.b;
    this.h = paramMotionEvent;
    this.i = paramMotionEvent.getX();
    this.j = paramMotionEvent.getY();
    return false;
  }

  public final boolean onDoubleTapEvent(MotionEvent paramMotionEvent)
  {
    this.f.y();
    if ((this.h != null) && (paramMotionEvent.getAction() == 1))
      if ((this.g.b) && (this.k == a.b))
      {
        float f9 = paramMotionEvent.getX();
        float f10 = paramMotionEvent.getY();
        float f11 = this.f.x().a(1.0F, f9, f10, 330);
        this.f.a(f11, f9, f10);
        this.h = null;
        this.k = a.a;
      }
    float f1;
    do
    {
      return true;
      this.h = null;
      this.k = a.a;
      if ((this.h == null) || (paramMotionEvent.getAction() != 2))
        break label483;
      f1 = paramMotionEvent.getY() - this.j;
      float f2 = paramMotionEvent.getX() - this.i;
      if ((this.k != a.b) || (Math.abs(f1) >= this.b) || (Math.abs(f2) >= this.b))
        break;
      Math.round(Math.abs(this.h.getX() - paramMotionEvent.getX()));
    }
    while ((Math.round(Math.abs(this.h.getY() - paramMotionEvent.getY())) <= this.a) || (!this.g.b));
    this.k = a.c;
    r.a(99, "d");
    if ((this.k == a.c) && (this.g.b))
    {
      float f7 = 6.0F * (f1 / this.f.getHeight());
      float f8 = this.f.x().a(f7, 0);
      this.f.a(f8, this.h.getX(), this.h.getY());
    }
    while (true)
    {
      this.i = paramMotionEvent.getX();
      this.j = paramMotionEvent.getY();
      return true;
      if ((this.k == a.d) && (this.g.e))
      {
        float f3 = 0.5F * this.f.getWidth();
        float f4 = 0.5F * this.f.getHeight();
        float f5 = h.a(f3, f4, this.i, this.j);
        float f6 = h.a(f3, f4, paramMotionEvent.getX(), paramMotionEvent.getY());
        this.f.x().b(f3, f4, (float)(180.0F * (f6 - f5) / 3.141592653589793D));
      }
    }
    label483: return false;
  }

  public final boolean onDown(MotionEvent paramMotionEvent)
  {
    if (this.k == a.a)
      this.f.e(paramMotionEvent.getX(), paramMotionEvent.getY());
    return true;
  }

  public final boolean onFling(MotionEvent paramMotionEvent1, MotionEvent paramMotionEvent2, float paramFloat1, float paramFloat2)
  {
    if ((this.g.a) && (!onSingleTapUp(paramMotionEvent2)))
    {
      this.f.x().b(paramFloat1, paramFloat2);
      this.f.y();
    }
    return true;
  }

  public final void onLongPress(MotionEvent paramMotionEvent)
  {
    if ((this.h == null) && (this.g.f))
      this.f.d(paramMotionEvent.getX(), paramMotionEvent.getY());
  }

  public final boolean onScroll(MotionEvent paramMotionEvent1, MotionEvent paramMotionEvent2, float paramFloat1, float paramFloat2)
  {
    if (this.f.a(paramMotionEvent2));
    while (!this.g.a)
      return true;
    this.f.x().a(paramFloat1, paramFloat2);
    this.f.a(paramFloat1, paramFloat2);
    this.f.y();
    return true;
  }

  public final boolean onSingleTapConfirmed(MotionEvent paramMotionEvent)
  {
    if (this.g.g)
    {
      this.f.y();
      this.f.c(paramMotionEvent.getX(), paramMotionEvent.getY());
    }
    return true;
  }

  public final boolean onSingleTapUp(MotionEvent paramMotionEvent)
  {
    return this.f.f(paramMotionEvent.getX(), paramMotionEvent.getY());
  }

  static enum a
  {
    static
    {
      a[] arrayOfa = new a[4];
      arrayOfa[0] = a;
      arrayOfa[1] = b;
      arrayOfa[2] = c;
      arrayOfa[3] = d;
    }
  }

  public static abstract interface b
  {
    public abstract void a(float paramFloat1, float paramFloat2);

    public abstract void a(float paramFloat1, float paramFloat2, float paramFloat3);

    public abstract boolean a(MotionEvent paramMotionEvent);

    public abstract boolean b(float paramFloat1, float paramFloat2);

    public abstract void c(float paramFloat1, float paramFloat2);

    public abstract void d(float paramFloat1, float paramFloat2);

    public abstract void e(float paramFloat1, float paramFloat2);

    public abstract boolean f(float paramFloat1, float paramFloat2);

    public abstract int getHeight();

    public abstract int getWidth();

    public abstract ap x();

    public abstract void y();
  }

  static final class c
  {
    boolean a = true;
    boolean b = true;
    boolean c = false;
    boolean d = true;
    boolean e = true;
    boolean f = true;
    boolean g = true;
  }
}

/* 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.bl.aq
 * JD-Core Version:    0.6.2
 */