APSService.smali

.class public Lcom/amap/api/location/APSService;
.super Landroid/app/Service;


# instance fields
.field a:Lcom/amap/api/location/c;


# direct methods
.method public constructor <init>()V
    .registers 1

    invoke-direct {p0}, Landroid/app/Service;-><init>()V

    return-void
.end method


# virtual methods
.method public a(Landroid/content/Context;)V
    .registers 8

    :try_start_0
    invoke-static {p1}, Lcom/loc/ch;->d(Landroid/content/Context;)Z

    move-result v0

    if-eqz v0, :cond_3a

    invoke-static {}, Lcom/loc/ca;->b()Lcom/loc/cy;

    move-result-object v1

    const-string/jumbo v2, "com.amap.api.location.APSServiceWrapper"

    const-class v3, Lcom/loc/cm;

    const/4 v0, 0x1

    new-array v4, v0, [Ljava/lang/Class;

    const/4 v0, 0x0

    const-class v5, Landroid/content/Context;

    aput-object v5, v4, v0

    const/4 v0, 0x1

    new-array v5, v0, [Ljava/lang/Object;

    const/4 v0, 0x0

    aput-object p1, v5, v0

    move-object v0, p1

    invoke-static/range {v0 .. v5}, Lcom/loc/u;->a(Landroid/content/Context;Lcom/loc/cy;Ljava/lang/String;Ljava/lang/Class;[Ljava/lang/Class;[Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/amap/api/location/c;

    iput-object v0, p0, Lcom/amap/api/location/APSService;->a:Lcom/amap/api/location/c;
    :try_end_26
    .catch Ljava/lang/Throwable; {:try_start_0 .. :try_end_26} :catch_46

    :cond_26
    :goto_26
    :try_start_26
    iget-object v0, p0, Lcom/amap/api/location/APSService;->a:Lcom/amap/api/location/c;

    if-nez v0, :cond_31

    new-instance v0, Lcom/loc/cm;

    invoke-direct {v0, p1}, Lcom/loc/cm;-><init>(Landroid/content/Context;)V

    iput-object v0, p0, Lcom/amap/api/location/APSService;->a:Lcom/amap/api/location/c;

    :cond_31
    iget-object v0, p0, Lcom/amap/api/location/APSService;->a:Lcom/amap/api/location/c;

    invoke-interface {v0}, Lcom/amap/api/location/c;->a()V
    :try_end_36
    .catch Ljava/lang/Throwable; {:try_start_26 .. :try_end_36} :catch_48

    :goto_36
    invoke-super {p0}, Landroid/app/Service;->onCreate()V

    return-void

    :cond_3a
    :try_start_3a
    iget-object v0, p0, Lcom/amap/api/location/APSService;->a:Lcom/amap/api/location/c;

    if-nez v0, :cond_26

    new-instance v0, Lcom/loc/cm;

    invoke-direct {v0, p1}, Lcom/loc/cm;-><init>(Landroid/content/Context;)V

    iput-object v0, p0, Lcom/amap/api/location/APSService;->a:Lcom/amap/api/location/c;
    :try_end_45
    .catch Ljava/lang/Throwable; {:try_start_3a .. :try_end_45} :catch_46

    goto :goto_26

    :catch_46
    move-exception v0

    goto :goto_26

    :catch_48
    move-exception v0

    const-string/jumbo v1, "APSService"

    const-string/jumbo v2, "onCreate"

    invoke-static {v0, v1, v2}, Lcom/loc/ca;->a(Ljava/lang/Throwable;Ljava/lang/String;Ljava/lang/String;)V

    goto :goto_36
.end method

.method public onBind(Landroid/content/Intent;)Landroid/os/IBinder;
    .registers 5

    :try_start_0
    iget-object v0, p0, Lcom/amap/api/location/APSService;->a:Lcom/amap/api/location/c;

    invoke-interface {v0, p1}, Lcom/amap/api/location/c;->a(Landroid/content/Intent;)Landroid/os/IBinder;
    :try_end_5
    .catch Ljava/lang/Throwable; {:try_start_0 .. :try_end_5} :catch_7

    move-result-object v0

    :goto_6
    return-object v0

    :catch_7
    move-exception v0

    const-string/jumbo v1, "APSService"

    const-string/jumbo v2, "onBind"

    invoke-static {v0, v1, v2}, Lcom/loc/ca;->a(Ljava/lang/Throwable;Ljava/lang/String;Ljava/lang/String;)V

    const/4 v0, 0x0

    goto :goto_6
.end method

.method public onCreate()V
    .registers 1

    invoke-virtual {p0, p0}, Lcom/amap/api/location/APSService;->a(Landroid/content/Context;)V

    return-void
.end method

.method public onDestroy()V
    .registers 4

    :try_start_0
    iget-object v0, p0, Lcom/amap/api/location/APSService;->a:Lcom/amap/api/location/c;

    invoke-interface {v0}, Lcom/amap/api/location/c;->b()V
    :try_end_5
    .catch Ljava/lang/Throwable; {:try_start_0 .. :try_end_5} :catch_9

    :goto_5
    invoke-super {p0}, Landroid/app/Service;->onDestroy()V

    return-void

    :catch_9
    move-exception v0

    const-string/jumbo v1, "APSService"

    const-string/jumbo v2, "onDestroy"

    invoke-static {v0, v1, v2}, Lcom/loc/ca;->a(Ljava/lang/Throwable;Ljava/lang/String;Ljava/lang/String;)V

    goto :goto_5
.end method

.method public onStartCommand(Landroid/content/Intent;II)I
    .registers 7

    :try_start_0
    iget-object v0, p0, Lcom/amap/api/location/APSService;->a:Lcom/amap/api/location/c;

    invoke-interface {v0, p1, p2, p3}, Lcom/amap/api/location/c;->a(Landroid/content/Intent;II)I
    :try_end_5
    .catch Ljava/lang/Throwable; {:try_start_0 .. :try_end_5} :catch_7

    move-result v0

    :goto_6
    return v0

    :catch_7
    move-exception v0

    const-string/jumbo v1, "APSService"

    const-string/jumbo v2, "onStartCommand"

    invoke-static {v0, v1, v2}, Lcom/loc/ca;->a(Ljava/lang/Throwable;Ljava/lang/String;Ljava/lang/String;)V

    invoke-super {p0, p1, p2, p3}, Landroid/app/Service;->onStartCommand(Landroid/content/Intent;II)I

    move-result v0

    goto :goto_6
.end method