.class Lcom/amap/api/mapcore2d/ar;
.super Landroid/view/View;
.source "MapOverlayImageView.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/amap/api/mapcore2d/ar$a;
    }
.end annotation


# instance fields
.field a:Lcom/amap/api/mapcore2d/b;

.field b:Lcom/amap/api/mapcore2d/ar$a;

.field private c:Ljava/util/ArrayList;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/ArrayList<",
            "Lcom/amap/api/mapcore2d/ah;",
            ">;"
        }
    .end annotation
.end field

.field private d:Ljava/util/ArrayList;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/ArrayList<",
            "Lcom/amap/api/mapcore2d/z;",
            ">;"
        }
    .end annotation
.end field

.field private volatile e:I

.field private f:Landroid/os/Handler;

.field private g:Ljava/lang/Runnable;

.field private h:Lcom/amap/api/mapcore2d/ac;

.field private i:Lcom/amap/api/mapcore2d/z;

.field private j:Lcom/amap/api/mapcore2d/z;

.field private k:F

.field private l:Ljava/util/concurrent/CopyOnWriteArrayList;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/concurrent/CopyOnWriteArrayList<",
            "Ljava/lang/Integer;",
            ">;"
        }
    .end annotation
.end field


# direct methods
.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;Lcom/amap/api/mapcore2d/b;)V
    .locals 0

    .line 101
    invoke-direct {p0, p1, p2}, Landroid/view/View;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V

    .line 39
    new-instance p1, Ljava/util/ArrayList;

    const/16 p2, 0x8

    invoke-direct {p1, p2}, Ljava/util/ArrayList;-><init>(I)V

    iput-object p1, p0, Lcom/amap/api/mapcore2d/ar;->c:Ljava/util/ArrayList;

    .line 41
    new-instance p1, Ljava/util/ArrayList;

    invoke-direct {p1, p2}, Ljava/util/ArrayList;-><init>(I)V

    iput-object p1, p0, Lcom/amap/api/mapcore2d/ar;->d:Ljava/util/ArrayList;

    const/4 p1, 0x0

    .line 44
    iput p1, p0, Lcom/amap/api/mapcore2d/ar;->e:I

    .line 51
    new-instance p1, Lcom/amap/api/mapcore2d/ar$a;

    invoke-direct {p1}, Lcom/amap/api/mapcore2d/ar$a;-><init>()V

    iput-object p1, p0, Lcom/amap/api/mapcore2d/ar;->b:Lcom/amap/api/mapcore2d/ar$a;

    .line 76
    new-instance p1, Landroid/os/Handler;

    invoke-direct {p1}, Landroid/os/Handler;-><init>()V

    iput-object p1, p0, Lcom/amap/api/mapcore2d/ar;->f:Landroid/os/Handler;

    .line 77
    new-instance p1, Lcom/amap/api/mapcore2d/ar$1;

    invoke-direct {p1, p0}, Lcom/amap/api/mapcore2d/ar$1;-><init>(Lcom/amap/api/mapcore2d/ar;)V

    iput-object p1, p0, Lcom/amap/api/mapcore2d/ar;->g:Ljava/lang/Runnable;

    const/4 p1, 0x0

    .line 192
    iput-object p1, p0, Lcom/amap/api/mapcore2d/ar;->j:Lcom/amap/api/mapcore2d/z;

    const/4 p1, 0x0

    .line 193
    iput p1, p0, Lcom/amap/api/mapcore2d/ar;->k:F

    .line 272
    new-instance p1, Ljava/util/concurrent/CopyOnWriteArrayList;

    invoke-direct {p1}, Ljava/util/concurrent/CopyOnWriteArrayList;-><init>()V

    iput-object p1, p0, Lcom/amap/api/mapcore2d/ar;->l:Ljava/util/concurrent/CopyOnWriteArrayList;

    .line 102
    iput-object p3, p0, Lcom/amap/api/mapcore2d/ar;->a:Lcom/amap/api/mapcore2d/b;

    return-void
.end method

.method private a(Ljava/util/Iterator;Landroid/graphics/Rect;Lcom/amap/api/mapcore2d/ac;)Lcom/amap/api/mapcore2d/ah;
    .locals 8
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/Iterator<",
            "Lcom/amap/api/mapcore2d/ah;",
            ">;",
            "Landroid/graphics/Rect;",
            "Lcom/amap/api/mapcore2d/ac;",
            ")",
            "Lcom/amap/api/mapcore2d/ah;"
        }
    .end annotation

    .line 364
    :cond_0
    :goto_0
    invoke-interface {p1}, Ljava/util/Iterator;->hasNext()Z

    move-result v0

    if-eqz v0, :cond_2

    .line 365
    invoke-interface {p1}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/amap/api/mapcore2d/ah;

    .line 366
    invoke-interface {v0}, Lcom/amap/api/mapcore2d/ah;->getPosition()Lcom/amap/api/maps2d/model/LatLng;

    move-result-object v1

    if-nez v1, :cond_1

    goto :goto_0

    .line 370
    :cond_1
    iget-object v2, p0, Lcom/amap/api/mapcore2d/ar;->a:Lcom/amap/api/mapcore2d/b;

    iget-wide v3, v1, Lcom/amap/api/maps2d/model/LatLng;->latitude:D

    iget-wide v5, v1, Lcom/amap/api/maps2d/model/LatLng;->longitude:D

    move-object v7, p3

    invoke-virtual/range {v2 .. v7}, Lcom/amap/api/mapcore2d/b;->b(DDLcom/amap/api/mapcore2d/ac;)V

    .line 371
    iget v1, p3, Lcom/amap/api/mapcore2d/ac;->a:I

    iget v2, p3, Lcom/amap/api/mapcore2d/ac;->b:I

    invoke-virtual {p0, p2, v1, v2}, Lcom/amap/api/mapcore2d/ar;->a(Landroid/graphics/Rect;II)Z

    move-result v1

    if-eqz v1, :cond_0

    return-object v0

    :cond_2
    const/4 p1, 0x0

    return-object p1
.end method

.method static synthetic a(Lcom/amap/api/mapcore2d/ar;)Ljava/util/ArrayList;
    .locals 0

    .line 32
    iget-object p0, p0, Lcom/amap/api/mapcore2d/ar;->d:Ljava/util/ArrayList;

    return-object p0
.end method

.method private b(Ljava/util/Iterator;Landroid/graphics/Rect;Lcom/amap/api/mapcore2d/ac;)Lcom/amap/api/mapcore2d/z;
    .locals 8
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/Iterator<",
            "Lcom/amap/api/mapcore2d/z;",
            ">;",
            "Landroid/graphics/Rect;",
            "Lcom/amap/api/mapcore2d/ac;",
            ")",
            "Lcom/amap/api/mapcore2d/z;"
        }
    .end annotation

    .line 387
    :cond_0
    :goto_0
    invoke-interface {p1}, Ljava/util/Iterator;->hasNext()Z

    move-result v0

    if-eqz v0, :cond_2

    .line 388
    invoke-interface {p1}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/amap/api/mapcore2d/z;

    .line 389
    invoke-interface {v0}, Lcom/amap/api/mapcore2d/z;->getRealPosition()Lcom/amap/api/maps2d/model/LatLng;

    move-result-object v1

    if-nez v1, :cond_1

    goto :goto_0

    .line 393
    :cond_1
    iget-object v2, p0, Lcom/amap/api/mapcore2d/ar;->a:Lcom/amap/api/mapcore2d/b;

    iget-wide v3, v1, Lcom/amap/api/maps2d/model/LatLng;->latitude:D

    iget-wide v5, v1, Lcom/amap/api/maps2d/model/LatLng;->longitude:D

    move-object v7, p3

    invoke-virtual/range {v2 .. v7}, Lcom/amap/api/mapcore2d/b;->b(DDLcom/amap/api/mapcore2d/ac;)V

    .line 394
    iget v1, p3, Lcom/amap/api/mapcore2d/ac;->a:I

    iget v2, p3, Lcom/amap/api/mapcore2d/ac;->b:I

    invoke-virtual {p0, p2, v1, v2}, Lcom/amap/api/mapcore2d/ar;->a(Landroid/graphics/Rect;II)Z

    move-result v1

    if-eqz v1, :cond_0

    return-object v0

    :cond_2
    const/4 p1, 0x0

    return-object p1
.end method

.method static synthetic b(Lcom/amap/api/mapcore2d/ar;)Ljava/util/ArrayList;
    .locals 0

    .line 32
    iget-object p0, p0, Lcom/amap/api/mapcore2d/ar;->c:Ljava/util/ArrayList;

    return-object p0
.end method

.method private h()I
    .locals 2

    .line 47
    iget v0, p0, Lcom/amap/api/mapcore2d/ar;->e:I

    add-int/lit8 v1, v0, 0x1

    iput v1, p0, Lcom/amap/api/mapcore2d/ar;->e:I

    return v0
.end method

.method private i()V
    .locals 6

    const-string v0, "redrawInfoWindow"

    .line 411
    iget-object v1, p0, Lcom/amap/api/mapcore2d/ar;->d:Ljava/util/ArrayList;

    invoke-virtual {v1}, Ljava/util/ArrayList;->iterator()Ljava/util/Iterator;

    move-result-object v1

    :cond_0
    :goto_0
    invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z

    move-result v2

    if-eqz v2, :cond_2

    invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Lcom/amap/api/mapcore2d/z;

    if-eqz v2, :cond_0

    .line 412
    iget-object v3, p0, Lcom/amap/api/mapcore2d/ar;->i:Lcom/amap/api/mapcore2d/z;

    if-eqz v3, :cond_0

    iget-object v3, p0, Lcom/amap/api/mapcore2d/ar;->i:Lcom/amap/api/mapcore2d/z;

    invoke-interface {v3}, Lcom/amap/api/mapcore2d/z;->getId()Ljava/lang/String;

    move-result-object v3

    invoke-interface {v2}, Lcom/amap/api/mapcore2d/z;->getId()Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v3, v4}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v3

    if-eqz v3, :cond_0

    .line 414
    :try_start_0
    iget-object v3, p0, Lcom/amap/api/mapcore2d/ar;->i:Lcom/amap/api/mapcore2d/z;

    invoke-interface {v3}, Lcom/amap/api/mapcore2d/z;->isViewMode()Z

    move-result v3
    :try_end_0
    .catch Landroid/os/RemoteException; {:try_start_0 .. :try_end_0} :catch_0

    if-eqz v3, :cond_1

    return-void

    :catch_0
    move-exception v3

    const-string v4, "MapOverlayImageView"

    .line 419
    invoke-static {v3, v4, v0}, Lcom/amap/api/mapcore2d/ci;->a(Ljava/lang/Throwable;Ljava/lang/String;Ljava/lang/String;)V

    .line 421
    :cond_1
    invoke-interface {v2}, Lcom/amap/api/mapcore2d/z;->a()Landroid/graphics/Rect;

    move-result-object v3

    .line 422
    new-instance v4, Lcom/amap/api/mapcore2d/ac;

    iget v5, v3, Landroid/graphics/Rect;->left:I

    invoke-interface {v2}, Lcom/amap/api/mapcore2d/z;->getWidth()I

    move-result v2

    div-int/lit8 v2, v2, 0x2

    add-int/2addr v5, v2

    iget v2, v3, Landroid/graphics/Rect;->top:I

    invoke-direct {v4, v5, v2}, Lcom/amap/api/mapcore2d/ac;-><init>(II)V

    iput-object v4, p0, Lcom/amap/api/mapcore2d/ar;->h:Lcom/amap/api/mapcore2d/ac;

    .line 424
    iget-object v2, p0, Lcom/amap/api/mapcore2d/ar;->a:Lcom/amap/api/mapcore2d/b;

    invoke-virtual {v2}, Lcom/amap/api/mapcore2d/b;->redrawInfoWindow()V

    goto :goto_0

    :cond_2
    return-void
.end method


# virtual methods
.method public a()Lcom/amap/api/mapcore2d/b;
    .locals 1

    .line 96
    iget-object v0, p0, Lcom/amap/api/mapcore2d/ar;->a:Lcom/amap/api/mapcore2d/b;

    return-object v0
.end method

.method public declared-synchronized a(Landroid/view/MotionEvent;)Lcom/amap/api/mapcore2d/z;
    .locals 5

    monitor-enter p0

    .line 439
    :try_start_0
    iget-object v0, p0, Lcom/amap/api/mapcore2d/ar;->d:Ljava/util/ArrayList;

    invoke-virtual {v0}, Ljava/util/ArrayList;->size()I

    move-result v0

    add-int/lit8 v0, v0, -0x1

    :goto_0
    if-ltz v0, :cond_2

    .line 442
    iget-object v1, p0, Lcom/amap/api/mapcore2d/ar;->d:Ljava/util/ArrayList;

    invoke-virtual {v1, v0}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Lcom/amap/api/mapcore2d/z;

    if-nez v1, :cond_0

    goto :goto_1

    .line 446
    :cond_0
    invoke-interface {v1}, Lcom/amap/api/mapcore2d/z;->a()Landroid/graphics/Rect;

    move-result-object v2

    .line 447
    invoke-virtual {p1}, Landroid/view/MotionEvent;->getX()F

    move-result v3

    float-to-int v3, v3

    invoke-virtual {p1}, Landroid/view/MotionEvent;->getY()F

    move-result v4

    float-to-int v4, v4

    invoke-virtual {p0, v2, v3, v4}, Lcom/amap/api/mapcore2d/ar;->a(Landroid/graphics/Rect;II)Z

    move-result v2
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    if-eqz v2, :cond_1

    .line 449
    monitor-exit p0

    return-object v1

    :cond_1
    :goto_1
    add-int/lit8 v0, v0, -0x1

    goto :goto_0

    :cond_2
    const/4 p1, 0x0

    .line 454
    monitor-exit p0

    return-object p1

    :catchall_0
    move-exception p1

    .line 438
    monitor-exit p0

    throw p1
.end method

.method public declared-synchronized a(Ljava/lang/String;)Lcom/amap/api/mapcore2d/z;
    .locals 3
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Landroid/os/RemoteException;
        }
    .end annotation

    monitor-enter p0

    .line 107
    :try_start_0
    iget-object v0, p0, Lcom/amap/api/mapcore2d/ar;->d:Ljava/util/ArrayList;

    invoke-virtual {v0}, Ljava/util/ArrayList;->iterator()Ljava/util/Iterator;

    move-result-object v0

    :cond_0
    invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z

    move-result v1

    if-eqz v1, :cond_1

    invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Lcom/amap/api/mapcore2d/z;

    if-eqz v1, :cond_0

    .line 108
    invoke-interface {v1}, Lcom/amap/api/mapcore2d/z;->getId()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v2, p1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v2
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    if-eqz v2, :cond_0

    .line 109
    monitor-exit p0

    return-object v1

    :cond_1
    const/4 p1, 0x0

    .line 112
    monitor-exit p0

    return-object p1

    :catchall_0
    move-exception p1

    .line 106
    monitor-exit p0

    throw p1
.end method

.method public declared-synchronized a(Landroid/graphics/Canvas;)V
    .locals 8

    monitor-enter p0

    .line 288
    :try_start_0
    invoke-direct {p0}, Lcom/amap/api/mapcore2d/ar;->i()V

    .line 292
    new-instance v0, Landroid/graphics/Rect;

    iget-object v1, p0, Lcom/amap/api/mapcore2d/ar;->a:Lcom/amap/api/mapcore2d/b;

    invoke-virtual {v1}, Lcom/amap/api/mapcore2d/b;->getMapWidth()I

    move-result v1

    iget-object v2, p0, Lcom/amap/api/mapcore2d/ar;->a:Lcom/amap/api/mapcore2d/b;

    .line 293
    invoke-virtual {v2}, Lcom/amap/api/mapcore2d/b;->getMapHeight()I

    move-result v2

    const/4 v3, 0x0

    invoke-direct {v0, v3, v3, v1, v2}, Landroid/graphics/Rect;-><init>(IIII)V

    .line 294
    new-instance v1, Lcom/amap/api/mapcore2d/ac;

    invoke-direct {v1}, Lcom/amap/api/mapcore2d/ac;-><init>()V

    .line 295
    iget-object v2, p0, Lcom/amap/api/mapcore2d/ar;->d:Ljava/util/ArrayList;

    invoke-virtual {v2}, Ljava/util/ArrayList;->iterator()Ljava/util/Iterator;

    move-result-object v2

    .line 296
    iget-object v3, p0, Lcom/amap/api/mapcore2d/ar;->c:Ljava/util/ArrayList;

    invoke-virtual {v3}, Ljava/util/ArrayList;->iterator()Ljava/util/Iterator;

    move-result-object v3

    .line 297
    invoke-direct {p0, v2, v0, v1}, Lcom/amap/api/mapcore2d/ar;->b(Ljava/util/Iterator;Landroid/graphics/Rect;Lcom/amap/api/mapcore2d/ac;)Lcom/amap/api/mapcore2d/z;

    move-result-object v4

    .line 298
    invoke-direct {p0, v3, v0, v1}, Lcom/amap/api/mapcore2d/ar;->a(Ljava/util/Iterator;Landroid/graphics/Rect;Lcom/amap/api/mapcore2d/ac;)Lcom/amap/api/mapcore2d/ah;

    move-result-object v5
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    :goto_0
    if-nez v4, :cond_1

    if-eqz v5, :cond_0

    goto :goto_1

    .line 359
    :cond_0
    monitor-exit p0

    return-void

    :cond_1
    :goto_1
    if-nez v4, :cond_2

    .line 301
    :try_start_1
    invoke-interface {v5, p1}, Lcom/amap/api/mapcore2d/ah;->draw(Landroid/graphics/Canvas;)V

    .line 302
    invoke-direct {p0, v3, v0, v1}, Lcom/amap/api/mapcore2d/ar;->a(Ljava/util/Iterator;Landroid/graphics/Rect;Lcom/amap/api/mapcore2d/ac;)Lcom/amap/api/mapcore2d/ah;

    move-result-object v5

    goto :goto_0

    :cond_2
    if-nez v5, :cond_3

    .line 304
    iget-object v6, p0, Lcom/amap/api/mapcore2d/ar;->a:Lcom/amap/api/mapcore2d/b;

    invoke-interface {v4, p1, v6}, Lcom/amap/api/mapcore2d/z;->a(Landroid/graphics/Canvas;Lcom/amap/api/mapcore2d/w;)V

    .line 305
    invoke-direct {p0, v2, v0, v1}, Lcom/amap/api/mapcore2d/ar;->b(Ljava/util/Iterator;Landroid/graphics/Rect;Lcom/amap/api/mapcore2d/ac;)Lcom/amap/api/mapcore2d/z;

    move-result-object v4

    goto :goto_0

    .line 310
    :cond_3
    invoke-interface {v4}, Lcom/amap/api/mapcore2d/z;->getZIndex()F

    move-result v6

    invoke-interface {v5}, Lcom/amap/api/mapcore2d/ah;->getZIndex()F

    move-result v7

    cmpg-float v6, v6, v7

    if-ltz v6, :cond_5

    .line 311
    invoke-interface {v4}, Lcom/amap/api/mapcore2d/z;->getZIndex()F

    move-result v6

    .line 312
    invoke-interface {v5}, Lcom/amap/api/mapcore2d/ah;->getZIndex()F

    move-result v7

    cmpl-float v6, v6, v7

    if-nez v6, :cond_4

    invoke-interface {v4}, Lcom/amap/api/mapcore2d/z;->getAddIndex()I

    move-result v6

    .line 313
    invoke-interface {v5}, Lcom/amap/api/mapcore2d/ah;->getAddIndex()I

    move-result v7

    if-ge v6, v7, :cond_4

    goto :goto_2

    .line 317
    :cond_4
    invoke-interface {v5, p1}, Lcom/amap/api/mapcore2d/ah;->draw(Landroid/graphics/Canvas;)V

    .line 318
    invoke-direct {p0, v3, v0, v1}, Lcom/amap/api/mapcore2d/ar;->a(Ljava/util/Iterator;Landroid/graphics/Rect;Lcom/amap/api/mapcore2d/ac;)Lcom/amap/api/mapcore2d/ah;

    move-result-object v5

    goto :goto_0

    .line 314
    :cond_5
    :goto_2
    iget-object v6, p0, Lcom/amap/api/mapcore2d/ar;->a:Lcom/amap/api/mapcore2d/b;

    invoke-interface {v4, p1, v6}, Lcom/amap/api/mapcore2d/z;->a(Landroid/graphics/Canvas;Lcom/amap/api/mapcore2d/w;)V

    .line 315
    invoke-direct {p0, v2, v0, v1}, Lcom/amap/api/mapcore2d/ar;->b(Ljava/util/Iterator;Landroid/graphics/Rect;Lcom/amap/api/mapcore2d/ac;)Lcom/amap/api/mapcore2d/z;

    move-result-object v4
    :try_end_1
    .catchall {:try_start_1 .. :try_end_1} :catchall_0

    goto :goto_0

    :catchall_0
    move-exception p1

    .line 287
    monitor-exit p0

    throw p1
.end method

.method public declared-synchronized a(Lcom/amap/api/mapcore2d/ah;)V
    .locals 1
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Landroid/os/RemoteException;
        }
    .end annotation

    monitor-enter p0

    .line 166
    :try_start_0
    iget-object v0, p0, Lcom/amap/api/mapcore2d/ar;->c:Ljava/util/ArrayList;

    invoke-virtual {v0, p1}, Ljava/util/ArrayList;->remove(Ljava/lang/Object;)Z

    .line 174
    invoke-direct {p0}, Lcom/amap/api/mapcore2d/ar;->h()I

    move-result v0

    invoke-interface {p1, v0}, Lcom/amap/api/mapcore2d/ah;->setAddIndex(I)V

    .line 175
    iget-object v0, p0, Lcom/amap/api/mapcore2d/ar;->c:Ljava/util/ArrayList;

    invoke-virtual {v0, p1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    .line 176
    iget-object p1, p0, Lcom/amap/api/mapcore2d/ar;->c:Ljava/util/ArrayList;

    iget-object v0, p0, Lcom/amap/api/mapcore2d/ar;->b:Lcom/amap/api/mapcore2d/ar$a;

    invoke-static {p1, v0}, Ljava/util/Collections;->sort(Ljava/util/List;Ljava/util/Comparator;)V
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    .line 177
    monitor-exit p0

    return-void

    :catchall_0
    move-exception p1

    .line 165
    monitor-exit p0

    throw p1
.end method

.method public declared-synchronized a(Lcom/amap/api/mapcore2d/z;)V
    .locals 2

    monitor-enter p0

    :try_start_0
    const-string v0, "addMarker"
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    .line 152
    :try_start_1
    invoke-virtual {p0, p1}, Lcom/amap/api/mapcore2d/ar;->e(Lcom/amap/api/mapcore2d/z;)V

    .line 153
    invoke-direct {p0}, Lcom/amap/api/mapcore2d/ar;->h()I

    move-result v1

    invoke-interface {p1, v1}, Lcom/amap/api/mapcore2d/z;->setAddIndex(I)V

    .line 154
    iget-object v1, p0, Lcom/amap/api/mapcore2d/ar;->d:Ljava/util/ArrayList;

    invoke-virtual {v1, p1}, Ljava/util/ArrayList;->remove(Ljava/lang/Object;)Z

    .line 155
    iget-object v1, p0, Lcom/amap/api/mapcore2d/ar;->d:Ljava/util/ArrayList;

    invoke-virtual {v1, p1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    .line 156
    iget-object p1, p0, Lcom/amap/api/mapcore2d/ar;->d:Ljava/util/ArrayList;

    iget-object v1, p0, Lcom/amap/api/mapcore2d/ar;->b:Lcom/amap/api/mapcore2d/ar$a;

    invoke-static {p1, v1}, Ljava/util/Collections;->sort(Ljava/util/List;Ljava/util/Comparator;)V
    :try_end_1
    .catch Ljava/lang/Throwable; {:try_start_1 .. :try_end_1} :catch_0
    .catchall {:try_start_1 .. :try_end_1} :catchall_0

    goto :goto_0

    :catch_0
    move-exception p1

    :try_start_2
    const-string v1, "MapOverlayImageView"

    .line 158
    invoke-static {p1, v1, v0}, Lcom/amap/api/mapcore2d/ci;->a(Ljava/lang/Throwable;Ljava/lang/String;Ljava/lang/String;)V
    :try_end_2
    .catchall {:try_start_2 .. :try_end_2} :catchall_0

    .line 163
    :goto_0
    monitor-exit p0

    return-void

    :catchall_0
    move-exception p1

    .line 149
    monitor-exit p0

    throw p1
.end method

.method public a(Landroid/graphics/Rect;II)Z
    .locals 0

    .line 528
    invoke-virtual {p1, p2, p3}, Landroid/graphics/Rect;->contains(II)Z

    move-result p1

    return p1
.end method

.method protected b()I
    .locals 1

    .line 120
    iget-object v0, p0, Lcom/amap/api/mapcore2d/ar;->d:Ljava/util/ArrayList;

    invoke-virtual {v0}, Ljava/util/ArrayList;->size()I

    move-result v0

    return v0
.end method

.method public declared-synchronized b(Lcom/amap/api/mapcore2d/ah;)V
    .locals 1

    monitor-enter p0

    .line 180
    :try_start_0
    iget-object v0, p0, Lcom/amap/api/mapcore2d/ar;->c:Ljava/util/ArrayList;

    invoke-virtual {v0, p1}, Ljava/util/ArrayList;->remove(Ljava/lang/Object;)Z

    .line 181
    invoke-virtual {p0}, Lcom/amap/api/mapcore2d/ar;->postInvalidate()V
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    .line 182
    monitor-exit p0

    return-void

    :catchall_0
    move-exception p1

    .line 179
    monitor-exit p0

    throw p1
.end method

.method public declared-synchronized b(Landroid/view/MotionEvent;)Z
    .locals 6

    monitor-enter p0

    const/4 v0, 0x0

    .line 480
    :try_start_0
    iget-object v1, p0, Lcom/amap/api/mapcore2d/ar;->d:Ljava/util/ArrayList;

    invoke-virtual {v1}, Ljava/util/ArrayList;->size()I

    move-result v1

    add-int/lit8 v1, v1, -0x1

    :goto_0
    if-ltz v1, :cond_2

    .line 482
    iget-object v2, p0, Lcom/amap/api/mapcore2d/ar;->d:Ljava/util/ArrayList;

    invoke-virtual {v2, v1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Lcom/amap/api/mapcore2d/z;

    if-nez v2, :cond_0

    goto :goto_1

    .line 486
    :cond_0
    invoke-interface {v2}, Lcom/amap/api/mapcore2d/z;->a()Landroid/graphics/Rect;

    move-result-object v3

    .line 487
    invoke-virtual {p1}, Landroid/view/MotionEvent;->getX()F

    move-result v4

    float-to-int v4, v4

    invoke-virtual {p1}, Landroid/view/MotionEvent;->getY()F

    move-result v5

    float-to-int v5, v5

    invoke-virtual {p0, v3, v4, v5}, Lcom/amap/api/mapcore2d/ar;->a(Landroid/graphics/Rect;II)Z

    move-result v4

    if-eqz v4, :cond_1

    .line 490
    new-instance p1, Lcom/amap/api/mapcore2d/ac;

    iget v0, v3, Landroid/graphics/Rect;->left:I

    invoke-interface {v2}, Lcom/amap/api/mapcore2d/z;->getWidth()I

    move-result v1

    div-int/lit8 v1, v1, 0x2

    add-int/2addr v0, v1

    iget v1, v3, Landroid/graphics/Rect;->top:I

    invoke-direct {p1, v0, v1}, Lcom/amap/api/mapcore2d/ac;-><init>(II)V

    iput-object p1, p0, Lcom/amap/api/mapcore2d/ar;->h:Lcom/amap/api/mapcore2d/ac;

    .line 492
    iput-object v2, p0, Lcom/amap/api/mapcore2d/ar;->i:Lcom/amap/api/mapcore2d/z;
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    move v0, v4

    goto :goto_2

    :cond_1
    :goto_1
    add-int/lit8 v1, v1, -0x1

    goto :goto_0

    .line 496
    :cond_2
    :goto_2
    monitor-exit p0

    return v0

    :catchall_0
    move-exception p1

    .line 478
    monitor-exit p0

    throw p1
.end method

.method public declared-synchronized b(Lcom/amap/api/mapcore2d/z;)Z
    .locals 1

    monitor-enter p0

    .line 185
    :try_start_0
    invoke-virtual {p0, p1}, Lcom/amap/api/mapcore2d/ar;->e(Lcom/amap/api/mapcore2d/z;)V

    .line 186
    iget-object v0, p0, Lcom/amap/api/mapcore2d/ar;->d:Ljava/util/ArrayList;

    invoke-virtual {v0, p1}, Ljava/util/ArrayList;->remove(Ljava/lang/Object;)Z

    move-result p1

    .line 187
    invoke-virtual {p0}, Lcom/amap/api/mapcore2d/ar;->postInvalidate()V

    .line 188
    iget-object v0, p0, Lcom/amap/api/mapcore2d/ar;->a:Lcom/amap/api/mapcore2d/b;

    invoke-virtual {v0}, Lcom/amap/api/mapcore2d/b;->invalidate()V
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    .line 189
    monitor-exit p0

    return p1

    :catchall_0
    move-exception p1

    .line 184
    monitor-exit p0

    throw p1
.end method

.method public declared-synchronized c()V
    .locals 3

    monitor-enter p0

    :try_start_0
    const-string v0, "clear"
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    .line 126
    :try_start_1
    iget-object v1, p0, Lcom/amap/api/mapcore2d/ar;->d:Ljava/util/ArrayList;

    if-eqz v1, :cond_1

    .line 128
    iget-object v1, p0, Lcom/amap/api/mapcore2d/ar;->d:Ljava/util/ArrayList;

    invoke-virtual {v1}, Ljava/util/ArrayList;->iterator()Ljava/util/Iterator;

    move-result-object v1

    :goto_0
    invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z

    move-result v2

    if-eqz v2, :cond_0

    invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Lcom/amap/api/mapcore2d/z;

    .line 129
    invoke-interface {v2}, Lcom/amap/api/mapcore2d/z;->destroy()V

    goto :goto_0

    .line 131
    :cond_0
    iget-object v1, p0, Lcom/amap/api/mapcore2d/ar;->d:Ljava/util/ArrayList;

    invoke-virtual {v1}, Ljava/util/ArrayList;->clear()V

    .line 134
    :cond_1
    iget-object v1, p0, Lcom/amap/api/mapcore2d/ar;->c:Ljava/util/ArrayList;

    if-eqz v1, :cond_2

    .line 135
    iget-object v1, p0, Lcom/amap/api/mapcore2d/ar;->c:Ljava/util/ArrayList;

    invoke-virtual {v1}, Ljava/util/ArrayList;->clear()V

    .line 138
    :cond_2
    iget-object v1, p0, Lcom/amap/api/mapcore2d/ar;->a:Lcom/amap/api/mapcore2d/b;

    invoke-virtual {v1}, Lcom/amap/api/mapcore2d/b;->invalidate()V
    :try_end_1
    .catch Ljava/lang/Throwable; {:try_start_1 .. :try_end_1} :catch_0
    .catchall {:try_start_1 .. :try_end_1} :catchall_0

    goto :goto_1

    :catch_0
    move-exception v1

    :try_start_2
    const-string v2, "MapOverlayImageView"

    .line 140
    invoke-static {v1, v2, v0}, Lcom/amap/api/mapcore2d/ci;->a(Ljava/lang/Throwable;Ljava/lang/String;Ljava/lang/String;)V
    :try_end_2
    .catchall {:try_start_2 .. :try_end_2} :catchall_0

    .line 142
    :goto_1
    monitor-exit p0

    return-void

    :catchall_0
    move-exception v0

    .line 123
    monitor-exit p0

    throw v0
.end method

.method public declared-synchronized c(Lcom/amap/api/mapcore2d/z;)V
    .locals 3

    monitor-enter p0

    if-eqz p1, :cond_2

    .line 199
    :try_start_0
    iget-object v0, p0, Lcom/amap/api/mapcore2d/ar;->j:Lcom/amap/api/mapcore2d/z;

    if-ne v0, p1, :cond_0

    goto :goto_0

    .line 202
    :cond_0
    iget-object v0, p0, Lcom/amap/api/mapcore2d/ar;->j:Lcom/amap/api/mapcore2d/z;

    const/high16 v1, 0x4f000000

    if-eqz v0, :cond_1

    .line 205
    iget-object v0, p0, Lcom/amap/api/mapcore2d/ar;->j:Lcom/amap/api/mapcore2d/z;

    invoke-interface {v0}, Lcom/amap/api/mapcore2d/z;->getZIndex()F

    move-result v0

    cmpl-float v0, v0, v1

    if-nez v0, :cond_1

    .line 206
    iget-object v0, p0, Lcom/amap/api/mapcore2d/ar;->j:Lcom/amap/api/mapcore2d/z;

    iget v2, p0, Lcom/amap/api/mapcore2d/ar;->k:F

    invoke-interface {v0, v2}, Lcom/amap/api/mapcore2d/z;->setZIndex(F)V

    .line 210
    :cond_1
    invoke-interface {p1}, Lcom/amap/api/mapcore2d/z;->getZIndex()F

    move-result v0

    iput v0, p0, Lcom/amap/api/mapcore2d/ar;->k:F

    .line 211
    iput-object p1, p0, Lcom/amap/api/mapcore2d/ar;->j:Lcom/amap/api/mapcore2d/z;

    .line 214
    invoke-interface {p1, v1}, Lcom/amap/api/mapcore2d/z;->setZIndex(F)V

    .line 216
    invoke-virtual {p0}, Lcom/amap/api/mapcore2d/ar;->d()V
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    .line 226
    monitor-exit p0

    return-void

    :catchall_0
    move-exception p1

    .line 198
    monitor-exit p0

    throw p1

    .line 200
    :cond_2
    :goto_0
    monitor-exit p0

    return-void
.end method

.method d()V
    .locals 4

    .line 145
    iget-object v0, p0, Lcom/amap/api/mapcore2d/ar;->f:Landroid/os/Handler;

    iget-object v1, p0, Lcom/amap/api/mapcore2d/ar;->g:Ljava/lang/Runnable;

    invoke-virtual {v0, v1}, Landroid/os/Handler;->removeCallbacks(Ljava/lang/Runnable;)V

    .line 146
    iget-object v0, p0, Lcom/amap/api/mapcore2d/ar;->f:Landroid/os/Handler;

    iget-object v1, p0, Lcom/amap/api/mapcore2d/ar;->g:Ljava/lang/Runnable;

    const-wide/16 v2, 0x5

    invoke-virtual {v0, v1, v2, v3}, Landroid/os/Handler;->postDelayed(Ljava/lang/Runnable;J)Z

    return-void
.end method

.method public d(Lcom/amap/api/mapcore2d/z;)V
    .locals 5

    const-string v0, "showInfoWindow"

    if-nez p1, :cond_0

    return-void

    .line 233
    :cond_0
    iget-object v1, p0, Lcom/amap/api/mapcore2d/ar;->h:Lcom/amap/api/mapcore2d/ac;

    if-nez v1, :cond_1

    .line 234
    new-instance v1, Lcom/amap/api/mapcore2d/ac;

    invoke-direct {v1}, Lcom/amap/api/mapcore2d/ac;-><init>()V

    iput-object v1, p0, Lcom/amap/api/mapcore2d/ar;->h:Lcom/amap/api/mapcore2d/ac;

    .line 237
    :cond_1
    invoke-interface {p1}, Lcom/amap/api/mapcore2d/z;->a()Landroid/graphics/Rect;

    move-result-object v1

    .line 238
    new-instance v2, Lcom/amap/api/mapcore2d/ac;

    iget v3, v1, Landroid/graphics/Rect;->left:I

    invoke-interface {p1}, Lcom/amap/api/mapcore2d/z;->getWidth()I

    move-result v4

    div-int/lit8 v4, v4, 0x2

    add-int/2addr v3, v4

    iget v1, v1, Landroid/graphics/Rect;->top:I

    invoke-direct {v2, v3, v1}, Lcom/amap/api/mapcore2d/ac;-><init>(II)V

    iput-object v2, p0, Lcom/amap/api/mapcore2d/ar;->h:Lcom/amap/api/mapcore2d/ac;

    .line 239
    iput-object p1, p0, Lcom/amap/api/mapcore2d/ar;->i:Lcom/amap/api/mapcore2d/z;

    .line 241
    :try_start_0
    iget-object p1, p0, Lcom/amap/api/mapcore2d/ar;->a:Lcom/amap/api/mapcore2d/b;

    invoke-virtual {p0}, Lcom/amap/api/mapcore2d/ar;->e()Lcom/amap/api/mapcore2d/z;

    move-result-object v1

    invoke-virtual {p1, v1}, Lcom/amap/api/mapcore2d/b;->a(Lcom/amap/api/mapcore2d/z;)V
    :try_end_0
    .catch Ljava/lang/Throwable; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    :catch_0
    move-exception p1

    const-string v1, "MapOverlayImageView"

    .line 243
    invoke-static {p1, v1, v0}, Lcom/amap/api/mapcore2d/ci;->a(Ljava/lang/Throwable;Ljava/lang/String;Ljava/lang/String;)V

    :goto_0
    return-void
.end method

.method public e()Lcom/amap/api/mapcore2d/z;
    .locals 1

    .line 430
    iget-object v0, p0, Lcom/amap/api/mapcore2d/ar;->i:Lcom/amap/api/mapcore2d/z;

    return-object v0
.end method

.method public e(Lcom/amap/api/mapcore2d/z;)V
    .locals 0

    .line 248
    invoke-virtual {p0, p1}, Lcom/amap/api/mapcore2d/ar;->f(Lcom/amap/api/mapcore2d/z;)Z

    move-result p1

    if-eqz p1, :cond_0

    .line 249
    iget-object p1, p0, Lcom/amap/api/mapcore2d/ar;->a:Lcom/amap/api/mapcore2d/b;

    invoke-virtual {p1}, Lcom/amap/api/mapcore2d/b;->e()V

    :cond_0
    return-void
.end method

.method public f()V
    .locals 4

    const-string v0, "destory"

    .line 466
    :try_start_0
    iget-object v1, p0, Lcom/amap/api/mapcore2d/ar;->f:Landroid/os/Handler;

    if-eqz v1, :cond_0

    .line 467
    iget-object v1, p0, Lcom/amap/api/mapcore2d/ar;->f:Landroid/os/Handler;

    const/4 v2, 0x0

    invoke-virtual {v1, v2}, Landroid/os/Handler;->removeCallbacksAndMessages(Ljava/lang/Object;)V

    .line 469
    :cond_0
    invoke-virtual {p0}, Lcom/amap/api/mapcore2d/ar;->c()V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    :catch_0
    move-exception v1

    const-string v2, "MapOverlayImageView"

    .line 471
    invoke-static {v1, v2, v0}, Lcom/amap/api/mapcore2d/ci;->a(Ljava/lang/Throwable;Ljava/lang/String;Ljava/lang/String;)V

    const-string v0, "amapApi"

    .line 472
    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    const-string v3, "MapOverlayImageView clear erro"

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v1}, Ljava/lang/Exception;->getMessage()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v2, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-static {v0, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    :goto_0
    return-void
.end method

.method public f(Lcom/amap/api/mapcore2d/z;)Z
    .locals 1

    .line 255
    iget-object v0, p0, Lcom/amap/api/mapcore2d/ar;->a:Lcom/amap/api/mapcore2d/b;

    invoke-virtual {v0, p1}, Lcom/amap/api/mapcore2d/b;->b(Lcom/amap/api/mapcore2d/z;)Z

    move-result p1

    return p1
.end method

.method public declared-synchronized g()Ljava/util/List;
    .locals 11
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "()",
            "Ljava/util/List<",
            "Lcom/amap/api/maps2d/model/Marker;",
            ">;"
        }
    .end annotation

    monitor-enter p0

    .line 500
    :try_start_0
    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    .line 501
    new-instance v1, Landroid/graphics/Rect;

    iget-object v2, p0, Lcom/amap/api/mapcore2d/ar;->a:Lcom/amap/api/mapcore2d/b;

    invoke-virtual {v2}, Lcom/amap/api/mapcore2d/b;->getMapWidth()I

    move-result v2

    iget-object v3, p0, Lcom/amap/api/mapcore2d/ar;->a:Lcom/amap/api/mapcore2d/b;

    .line 502
    invoke-virtual {v3}, Lcom/amap/api/mapcore2d/b;->getMapHeight()I

    move-result v3

    const/4 v4, 0x0

    invoke-direct {v1, v4, v4, v2, v3}, Landroid/graphics/Rect;-><init>(IIII)V

    .line 504
    new-instance v2, Lcom/amap/api/mapcore2d/ac;

    invoke-direct {v2}, Lcom/amap/api/mapcore2d/ac;-><init>()V

    .line 505
    iget-object v3, p0, Lcom/amap/api/mapcore2d/ar;->d:Ljava/util/ArrayList;

    invoke-virtual {v3}, Ljava/util/ArrayList;->iterator()Ljava/util/Iterator;

    move-result-object v3

    :cond_0
    :goto_0
    invoke-interface {v3}, Ljava/util/Iterator;->hasNext()Z

    move-result v4

    if-eqz v4, :cond_2

    invoke-interface {v3}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v4

    check-cast v4, Lcom/amap/api/mapcore2d/z;

    .line 506
    invoke-interface {v4}, Lcom/amap/api/mapcore2d/z;->getRealPosition()Lcom/amap/api/maps2d/model/LatLng;

    move-result-object v5

    if-nez v5, :cond_1

    goto :goto_1

    .line 510
    :cond_1
    iget-object v6, p0, Lcom/amap/api/mapcore2d/ar;->a:Lcom/amap/api/mapcore2d/b;

    iget-wide v7, v5, Lcom/amap/api/maps2d/model/LatLng;->latitude:D

    iget-wide v9, v5, Lcom/amap/api/maps2d/model/LatLng;->longitude:D

    move-object v5, v6

    move-wide v6, v7

    move-wide v8, v9

    move-object v10, v2

    invoke-virtual/range {v5 .. v10}, Lcom/amap/api/mapcore2d/b;->b(DDLcom/amap/api/mapcore2d/ac;)V

    .line 511
    iget v5, v2, Lcom/amap/api/mapcore2d/ac;->a:I

    iget v6, v2, Lcom/amap/api/mapcore2d/ac;->b:I

    invoke-virtual {p0, v1, v5, v6}, Lcom/amap/api/mapcore2d/ar;->a(Landroid/graphics/Rect;II)Z

    move-result v5

    if-eqz v5, :cond_0

    .line 512
    new-instance v5, Lcom/amap/api/maps2d/model/Marker;

    invoke-direct {v5, v4}, Lcom/amap/api/maps2d/model/Marker;-><init>(Lcom/amap/api/interfaces/IMarker;)V

    invoke-interface {v0, v5}, Ljava/util/List;->add(Ljava/lang/Object;)Z
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    goto :goto_0

    .line 524
    :cond_2
    :goto_1
    monitor-exit p0

    return-object v0

    :catchall_0
    move-exception v0

    .line 499
    monitor-exit p0

    throw v0
.end method
