a.smali
.class public Lcom/amap/api/location/a;
.super Ljava/lang/Object;
# instance fields
.field a:Landroid/content/Context;
.field b:Lcom/amap/api/location/d;
# direct methods
.method public constructor <init>(Landroid/content/Context;)V
.registers 5
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
if-nez p1, :cond_19
:try_start_5
new-instance v0, Ljava/lang/IllegalArgumentException;
const-string/jumbo v1, "Context\u53c2\u6570\u4e0d\u80fd\u4e3anull"
invoke-direct {v0, v1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw v0
:try_end_e
.catch Ljava/lang/Throwable; {:try_start_5 .. :try_end_e} :catch_e
:catch_e
move-exception v0
const-string/jumbo v1, "AMapLocationClient"
const-string/jumbo v2, "AMapLocationClient 1"
invoke-static {v0, v1, v2}, Lcom/loc/ca;->a(Ljava/lang/Throwable;Ljava/lang/String;Ljava/lang/String;)V
:goto_18
return-void
:cond_19
:try_start_19
invoke-virtual {p1}, Landroid/content/Context;->getApplicationContext()Landroid/content/Context;
move-result-object v0
iput-object v0, p0, Lcom/amap/api/location/a;->a:Landroid/content/Context;
iget-object v0, p0, Lcom/amap/api/location/a;->a:Landroid/content/Context;
const/4 v1, 0x0
invoke-static {v0, v1}, Lcom/amap/api/location/a;->a(Landroid/content/Context;Landroid/content/Intent;)Lcom/amap/api/location/d;
move-result-object v0
iput-object v0, p0, Lcom/amap/api/location/a;->b:Lcom/amap/api/location/d;
:try_end_28
.catch Ljava/lang/Throwable; {:try_start_19 .. :try_end_28} :catch_e
goto :goto_18
.end method
.method private static a(Landroid/content/Context;Landroid/content/Intent;)Lcom/amap/api/location/d;
.registers 8
:try_start_0
invoke-static {}, Lcom/loc/ca;->b()Lcom/loc/cy;
move-result-object v1
invoke-static {p0, v1}, Lcom/loc/ch;->a(Landroid/content/Context;Lcom/loc/cy;)V
invoke-static {p0}, Lcom/loc/ch;->c(Landroid/content/Context;)Z
move-result v0
invoke-static {p0}, Lcom/loc/ch;->a(Landroid/content/Context;)V
if-eqz v0, :cond_3a
const-string/jumbo v2, "com.amap.api.location.LocationManagerWrapper"
const-class v3, Lcom/loc/ce;
const/4 v0, 0x2
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
const-class v5, Landroid/content/Intent;
aput-object v5, v4, v0
const/4 v0, 0x2
new-array v5, v0, [Ljava/lang/Object;
const/4 v0, 0x0
aput-object p0, v5, v0
const/4 v0, 0x1
aput-object p1, v5, v0
move-object v0, p0
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/d;
:try_end_32
.catch Ljava/lang/Throwable; {:try_start_0 .. :try_end_32} :catch_40
:goto_32
if-nez v0, :cond_39
new-instance v0, Lcom/loc/ce;
invoke-direct {v0, p0, p1}, Lcom/loc/ce;-><init>(Landroid/content/Context;Landroid/content/Intent;)V
:cond_39
return-object v0
:cond_3a
:try_start_3a
new-instance v0, Lcom/loc/ce;
invoke-direct {v0, p0, p1}, Lcom/loc/ce;-><init>(Landroid/content/Context;Landroid/content/Intent;)V
:try_end_3f
.catch Ljava/lang/Throwable; {:try_start_3a .. :try_end_3f} :catch_40
goto :goto_32
:catch_40
move-exception v0
new-instance v0, Lcom/loc/ce;
invoke-direct {v0, p0, p1}, Lcom/loc/ce;-><init>(Landroid/content/Context;Landroid/content/Intent;)V
goto :goto_32
.end method
# virtual methods
.method public a()V
.registers 4
:try_start_0
iget-object v0, p0, Lcom/amap/api/location/a;->b:Lcom/amap/api/location/d;
if-eqz v0, :cond_9
iget-object v0, p0, Lcom/amap/api/location/a;->b:Lcom/amap/api/location/d;
invoke-interface {v0}, Lcom/amap/api/location/d;->a()V
:try_end_9
.catch Ljava/lang/Throwable; {:try_start_0 .. :try_end_9} :catch_a
:cond_9
:goto_9
return-void
:catch_a
move-exception v0
const-string/jumbo v1, "AMapLocationClient"
const-string/jumbo v2, "startLocation"
invoke-static {v0, v1, v2}, Lcom/loc/ca;->a(Ljava/lang/Throwable;Ljava/lang/String;Ljava/lang/String;)V
goto :goto_9
.end method
.method public a(Lcom/amap/api/location/AMapLocationClientOption;)V
.registers 5
if-nez p1, :cond_16
:try_start_2
new-instance v0, Ljava/lang/IllegalArgumentException;
const-string/jumbo v1, "LocationManagerOption\u53c2\u6570\u4e0d\u80fd\u4e3anull"
invoke-direct {v0, v1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw v0
:try_end_b
.catch Ljava/lang/Throwable; {:try_start_2 .. :try_end_b} :catch_b
:catch_b
move-exception v0
const-string/jumbo v1, "AMapLocationClient"
const-string/jumbo v2, "setLocationOption"
invoke-static {v0, v1, v2}, Lcom/loc/ca;->a(Ljava/lang/Throwable;Ljava/lang/String;Ljava/lang/String;)V
:cond_15
:goto_15
return-void
:cond_16
:try_start_16
iget-object v0, p0, Lcom/amap/api/location/a;->b:Lcom/amap/api/location/d;
if-eqz v0, :cond_15
iget-object v0, p0, Lcom/amap/api/location/a;->b:Lcom/amap/api/location/d;
invoke-interface {v0, p1}, Lcom/amap/api/location/d;->a(Lcom/amap/api/location/AMapLocationClientOption;)V
:try_end_1f
.catch Ljava/lang/Throwable; {:try_start_16 .. :try_end_1f} :catch_b
goto :goto_15
.end method
.method public a(Lcom/amap/api/location/b;)V
.registers 5
if-nez p1, :cond_16
:try_start_2
new-instance v0, Ljava/lang/IllegalArgumentException;
const-string/jumbo v1, "listener\u53c2\u6570\u4e0d\u80fd\u4e3anull"
invoke-direct {v0, v1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw v0
:try_end_b
.catch Ljava/lang/Throwable; {:try_start_2 .. :try_end_b} :catch_b
:catch_b
move-exception v0
const-string/jumbo v1, "AMapLocationClient"
const-string/jumbo v2, "setLocationListener"
invoke-static {v0, v1, v2}, Lcom/loc/ca;->a(Ljava/lang/Throwable;Ljava/lang/String;Ljava/lang/String;)V
:cond_15
:goto_15
return-void
:cond_16
:try_start_16
iget-object v0, p0, Lcom/amap/api/location/a;->b:Lcom/amap/api/location/d;
if-eqz v0, :cond_15
iget-object v0, p0, Lcom/amap/api/location/a;->b:Lcom/amap/api/location/d;
invoke-interface {v0, p1}, Lcom/amap/api/location/d;->a(Lcom/amap/api/location/b;)V
:try_end_1f
.catch Ljava/lang/Throwable; {:try_start_16 .. :try_end_1f} :catch_b
goto :goto_15
.end method
.method public b()V
.registers 4
:try_start_0
iget-object v0, p0, Lcom/amap/api/location/a;->b:Lcom/amap/api/location/d;
if-eqz v0, :cond_9
iget-object v0, p0, Lcom/amap/api/location/a;->b:Lcom/amap/api/location/d;
invoke-interface {v0}, Lcom/amap/api/location/d;->b()V
:try_end_9
.catch Ljava/lang/Throwable; {:try_start_0 .. :try_end_9} :catch_a
:cond_9
:goto_9
return-void
:catch_a
move-exception v0
const-string/jumbo v1, "AMapLocationClient"
const-string/jumbo v2, "stopLocation"
invoke-static {v0, v1, v2}, Lcom/loc/ca;->a(Ljava/lang/Throwable;Ljava/lang/String;Ljava/lang/String;)V
goto :goto_9
.end method
.method public b(Lcom/amap/api/location/b;)V
.registers 5
:try_start_0
iget-object v0, p0, Lcom/amap/api/location/a;->b:Lcom/amap/api/location/d;
if-eqz v0, :cond_9
iget-object v0, p0, Lcom/amap/api/location/a;->b:Lcom/amap/api/location/d;
invoke-interface {v0, p1}, Lcom/amap/api/location/d;->b(Lcom/amap/api/location/b;)V
:try_end_9
.catch Ljava/lang/Throwable; {:try_start_0 .. :try_end_9} :catch_a
:cond_9
:goto_9
return-void
:catch_a
move-exception v0
const-string/jumbo v1, "AMapLocationClient"
const-string/jumbo v2, "unRegisterLocationListener"
invoke-static {v0, v1, v2}, Lcom/loc/ca;->a(Ljava/lang/Throwable;Ljava/lang/String;Ljava/lang/String;)V
goto :goto_9
.end method
.method public c()V
.registers 4
:try_start_0
iget-object v0, p0, Lcom/amap/api/location/a;->b:Lcom/amap/api/location/d;
if-eqz v0, :cond_9
iget-object v0, p0, Lcom/amap/api/location/a;->b:Lcom/amap/api/location/d;
invoke-interface {v0}, Lcom/amap/api/location/d;->c()V
:try_end_9
.catch Ljava/lang/Throwable; {:try_start_0 .. :try_end_9} :catch_a
:cond_9
:goto_9
return-void
:catch_a
move-exception v0
const-string/jumbo v1, "AMapLocationClient"
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_9
.end method