x.smali
.class public Lcom/baidu/location/a/x;
.super Ljava/lang/Object;
# static fields
.field private static a:Ljava/lang/Object;
.field private static b:Lcom/baidu/location/a/x;
# instance fields
.field private c:Landroid/os/HandlerThread;
.field private d:Landroid/os/Handler;
.field private e:Z
# direct methods
.method static constructor <clinit>()V
.registers 1
new-instance v0, Ljava/lang/Object;
invoke-direct {v0}, Ljava/lang/Object;-><init>()V
sput-object v0, Lcom/baidu/location/a/x;->a:Ljava/lang/Object;
const/4 v0, 0x0
sput-object v0, Lcom/baidu/location/a/x;->b:Lcom/baidu/location/a/x;
return-void
.end method
.method constructor <init>()V
.registers 2
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
const/4 v0, 0x0
iput-boolean v0, p0, Lcom/baidu/location/a/x;->e:Z
return-void
.end method
.method static synthetic a(Lcom/baidu/location/a/x;)Landroid/os/Handler;
.registers 2
iget-object v0, p0, Lcom/baidu/location/a/x;->d:Landroid/os/Handler;
return-object v0
.end method
.method public static a()Lcom/baidu/location/a/x;
.registers 2
sget-object v1, Lcom/baidu/location/a/x;->a:Ljava/lang/Object;
monitor-enter v1
:try_start_3
sget-object v0, Lcom/baidu/location/a/x;->b:Lcom/baidu/location/a/x;
if-nez v0, :cond_e
new-instance v0, Lcom/baidu/location/a/x;
invoke-direct {v0}, Lcom/baidu/location/a/x;-><init>()V
sput-object v0, Lcom/baidu/location/a/x;->b:Lcom/baidu/location/a/x;
:cond_e
sget-object v0, Lcom/baidu/location/a/x;->b:Lcom/baidu/location/a/x;
monitor-exit v1
return-object v0
:catchall_12
move-exception v0
monitor-exit v1
:try_end_14
.catchall {:try_start_3 .. :try_end_14} :catchall_12
throw v0
.end method
# virtual methods
.method public a(Landroid/location/Location;I)V
.registers 7
iget-boolean v0, p0, Lcom/baidu/location/a/x;->e:Z
if-eqz v0, :cond_6
if-nez p1, :cond_7
:cond_6
:goto_6
return-void
:cond_7
:try_start_7
iget-object v0, p0, Lcom/baidu/location/a/x;->d:Landroid/os/Handler;
if-eqz v0, :cond_6
iget-object v0, p0, Lcom/baidu/location/a/x;->d:Landroid/os/Handler;
const/4 v1, 0x1
invoke-virtual {v0, v1}, Landroid/os/Handler;->obtainMessage(I)Landroid/os/Message;
move-result-object v0
new-instance v1, Landroid/os/Bundle;
invoke-direct {v1}, Landroid/os/Bundle;-><init>()V
const-string v2, "loc"
new-instance v3, Landroid/location/Location;
invoke-direct {v3, p1}, Landroid/location/Location;-><init>(Landroid/location/Location;)V
invoke-virtual {v1, v2, v3}, Landroid/os/Bundle;->putParcelable(Ljava/lang/String;Landroid/os/Parcelable;)V
const-string v2, "satnum"
invoke-virtual {v1, v2, p2}, Landroid/os/Bundle;->putInt(Ljava/lang/String;I)V
invoke-virtual {v0, v1}, Landroid/os/Message;->setData(Landroid/os/Bundle;)V
invoke-virtual {v0}, Landroid/os/Message;->sendToTarget()V
:try_end_2c
.catch Ljava/lang/Exception; {:try_start_7 .. :try_end_2c} :catch_2d
goto :goto_6
:catch_2d
move-exception v0
invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V
goto :goto_6
.end method
.method public b()V
.registers 3
iget-boolean v0, p0, Lcom/baidu/location/a/x;->e:Z
if-nez v0, :cond_5
:cond_4
:goto_4
return-void
:cond_5
:try_start_5
iget-object v0, p0, Lcom/baidu/location/a/x;->d:Landroid/os/Handler;
if-eqz v0, :cond_4
iget-object v0, p0, Lcom/baidu/location/a/x;->d:Landroid/os/Handler;
const/4 v1, 0x3
invoke-virtual {v0, v1}, Landroid/os/Handler;->obtainMessage(I)Landroid/os/Message;
move-result-object v0
invoke-virtual {v0}, Landroid/os/Message;->sendToTarget()V
:try_end_13
.catch Ljava/lang/Exception; {:try_start_5 .. :try_end_13} :catch_14
goto :goto_4
:catch_14
move-exception v0
invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V
goto :goto_4
.end method
.method public c()V
.registers 3
iget-boolean v0, p0, Lcom/baidu/location/a/x;->e:Z
if-nez v0, :cond_5
:cond_4
:goto_4
return-void
:cond_5
:try_start_5
iget-object v0, p0, Lcom/baidu/location/a/x;->d:Landroid/os/Handler;
if-eqz v0, :cond_4
iget-object v0, p0, Lcom/baidu/location/a/x;->d:Landroid/os/Handler;
const/4 v1, 0x2
invoke-virtual {v0, v1}, Landroid/os/Handler;->obtainMessage(I)Landroid/os/Message;
move-result-object v0
invoke-virtual {v0}, Landroid/os/Message;->sendToTarget()V
:try_end_13
.catch Ljava/lang/Exception; {:try_start_5 .. :try_end_13} :catch_14
goto :goto_4
:catch_14
move-exception v0
invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V
goto :goto_4
.end method
.method public d()V
.registers 3
iget-boolean v0, p0, Lcom/baidu/location/a/x;->e:Z
if-nez v0, :cond_5
:cond_4
:goto_4
return-void
:cond_5
:try_start_5
iget-object v0, p0, Lcom/baidu/location/a/x;->d:Landroid/os/Handler;
if-eqz v0, :cond_4
iget-object v0, p0, Lcom/baidu/location/a/x;->d:Landroid/os/Handler;
const/4 v1, 0x7
invoke-virtual {v0, v1}, Landroid/os/Handler;->obtainMessage(I)Landroid/os/Message;
move-result-object v0
invoke-virtual {v0}, Landroid/os/Message;->sendToTarget()V
:try_end_13
.catch Ljava/lang/Exception; {:try_start_5 .. :try_end_13} :catch_14
goto :goto_4
:catch_14
move-exception v0
invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V
goto :goto_4
.end method
.method public e()V
.registers 5
iget-boolean v0, p0, Lcom/baidu/location/a/x;->e:Z
if-eqz v0, :cond_5
:cond_4
:goto_4
return-void
:cond_5
const/4 v0, 0x1
iput-boolean v0, p0, Lcom/baidu/location/a/x;->e:Z
iget-object v0, p0, Lcom/baidu/location/a/x;->c:Landroid/os/HandlerThread;
if-nez v0, :cond_27
new-instance v0, Landroid/os/HandlerThread;
const-string v1, "LocUploadThreadManager"
invoke-direct {v0, v1}, Landroid/os/HandlerThread;-><init>(Ljava/lang/String;)V
iput-object v0, p0, Lcom/baidu/location/a/x;->c:Landroid/os/HandlerThread;
iget-object v0, p0, Lcom/baidu/location/a/x;->c:Landroid/os/HandlerThread;
invoke-virtual {v0}, Landroid/os/HandlerThread;->start()V
new-instance v0, Lcom/baidu/location/a/y;
iget-object v1, p0, Lcom/baidu/location/a/x;->c:Landroid/os/HandlerThread;
invoke-virtual {v1}, Landroid/os/HandlerThread;->getLooper()Landroid/os/Looper;
move-result-object v1
invoke-direct {v0, p0, v1}, Lcom/baidu/location/a/y;-><init>(Lcom/baidu/location/a/x;Landroid/os/Looper;)V
iput-object v0, p0, Lcom/baidu/location/a/x;->d:Landroid/os/Handler;
:cond_27
:try_start_27
iget-object v0, p0, Lcom/baidu/location/a/x;->d:Landroid/os/Handler;
if-eqz v0, :cond_35
iget-object v0, p0, Lcom/baidu/location/a/x;->d:Landroid/os/Handler;
const/4 v1, 0x5
invoke-virtual {v0, v1}, Landroid/os/Handler;->obtainMessage(I)Landroid/os/Message;
move-result-object v0
invoke-virtual {v0}, Landroid/os/Message;->sendToTarget()V
:try_end_35
.catch Ljava/lang/Exception; {:try_start_27 .. :try_end_35} :catch_48
:cond_35
:goto_35
:try_start_35
iget-object v0, p0, Lcom/baidu/location/a/x;->d:Landroid/os/Handler;
if-eqz v0, :cond_4
iget-object v0, p0, Lcom/baidu/location/a/x;->d:Landroid/os/Handler;
const/4 v1, 0x4
sget v2, Lcom/baidu/location/d/j;->Q:I
int-to-long v2, v2
invoke-virtual {v0, v1, v2, v3}, Landroid/os/Handler;->sendEmptyMessageDelayed(IJ)Z
:try_end_42
.catch Ljava/lang/Exception; {:try_start_35 .. :try_end_42} :catch_43
goto :goto_4
:catch_43
move-exception v0
invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V
goto :goto_4
:catch_48
move-exception v0
invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V
goto :goto_35
.end method
.method public f()V
.registers 4
const/4 v2, 0x0
iget-boolean v0, p0, Lcom/baidu/location/a/x;->e:Z
if-nez v0, :cond_6
:goto_5
return-void
:cond_6
invoke-static {}, Lcom/baidu/location/a/d;->a()Lcom/baidu/location/a/d;
move-result-object v0
invoke-virtual {v0}, Lcom/baidu/location/a/d;->b()V
:try_start_d
iget-object v0, p0, Lcom/baidu/location/a/x;->d:Landroid/os/Handler;
if-eqz v0, :cond_17
iget-object v0, p0, Lcom/baidu/location/a/x;->d:Landroid/os/Handler;
const/4 v1, 0x0
invoke-virtual {v0, v1}, Landroid/os/Handler;->removeCallbacksAndMessages(Ljava/lang/Object;)V
:try_end_17
.catch Ljava/lang/Exception; {:try_start_d .. :try_end_17} :catch_2d
:cond_17
:goto_17
iput-object v2, p0, Lcom/baidu/location/a/x;->d:Landroid/os/Handler;
:try_start_19
iget-object v0, p0, Lcom/baidu/location/a/x;->c:Landroid/os/HandlerThread;
if-eqz v0, :cond_27
iget-object v0, p0, Lcom/baidu/location/a/x;->c:Landroid/os/HandlerThread;
invoke-virtual {v0}, Landroid/os/HandlerThread;->quit()Z
iget-object v0, p0, Lcom/baidu/location/a/x;->c:Landroid/os/HandlerThread;
invoke-virtual {v0}, Landroid/os/HandlerThread;->interrupt()V
:try_end_27
.catch Ljava/lang/Exception; {:try_start_19 .. :try_end_27} :catch_32
:cond_27
:goto_27
iput-object v2, p0, Lcom/baidu/location/a/x;->c:Landroid/os/HandlerThread;
const/4 v0, 0x0
iput-boolean v0, p0, Lcom/baidu/location/a/x;->e:Z
goto :goto_5
:catch_2d
move-exception v0
invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V
goto :goto_17
:catch_32
move-exception v0
invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V
goto :goto_27
.end method