550 lines
15 KiB
Smali
550 lines
15 KiB
Smali
.class Lcom/mojiweather/area/FootStepManager$1;
|
|
.super Ljava/lang/Object;
|
|
.source "FootStepManager.java"
|
|
|
|
# interfaces
|
|
.implements Lcom/moji/weatherprovider/listener/LocationUpdateListener;
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/EnclosingClass;
|
|
value = Lcom/mojiweather/area/FootStepManager;
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/InnerClass;
|
|
accessFlags = 0x0
|
|
name = null
|
|
.end annotation
|
|
|
|
|
|
# instance fields
|
|
.field final synthetic a:Lcom/mojiweather/area/FootStepManager;
|
|
|
|
|
|
# direct methods
|
|
.method constructor <init>(Lcom/mojiweather/area/FootStepManager;)V
|
|
.locals 0
|
|
|
|
.line 76
|
|
iput-object p1, p0, Lcom/mojiweather/area/FootStepManager$1;->a:Lcom/mojiweather/area/FootStepManager;
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public declared-synchronized a(Lcom/moji/common/area/AreaInfo;Lcom/moji/weatherprovider/data/Weather;)V
|
|
.locals 12
|
|
|
|
monitor-enter p0
|
|
|
|
.line 96
|
|
:try_start_0
|
|
iget-object v0, p0, Lcom/mojiweather/area/FootStepManager$1;->a:Lcom/mojiweather/area/FootStepManager;
|
|
|
|
invoke-static {v0, p2}, Lcom/mojiweather/area/FootStepManager;->a(Lcom/mojiweather/area/FootStepManager;Lcom/moji/weatherprovider/data/Weather;)J
|
|
|
|
move-result-wide v0
|
|
|
|
.line 97
|
|
iget-object v2, p0, Lcom/mojiweather/area/FootStepManager$1;->a:Lcom/mojiweather/area/FootStepManager;
|
|
|
|
invoke-static {v2}, Lcom/mojiweather/area/FootStepManager;->d(Lcom/mojiweather/area/FootStepManager;)Lcom/google/gson/Gson;
|
|
|
|
move-result-object v2
|
|
|
|
iget-object v3, p0, Lcom/mojiweather/area/FootStepManager$1;->a:Lcom/mojiweather/area/FootStepManager;
|
|
|
|
invoke-static {v3}, Lcom/mojiweather/area/FootStepManager;->c(Lcom/mojiweather/area/FootStepManager;)Lcom/moji/preferences/DefaultPrefer;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-virtual {v3}, Lcom/moji/preferences/DefaultPrefer;->r()Ljava/lang/String;
|
|
|
|
move-result-object v3
|
|
|
|
const-class v4, Lcom/mojiweather/area/FootStepManager$FootPrintLoc;
|
|
|
|
invoke-virtual {v2, v3, v4}, Lcom/google/gson/Gson;->fromJson(Ljava/lang/String;Ljava/lang/Class;)Ljava/lang/Object;
|
|
|
|
move-result-object v2
|
|
|
|
check-cast v2, Lcom/mojiweather/area/FootStepManager$FootPrintLoc;
|
|
|
|
const/4 v3, 0x0
|
|
|
|
const-wide/16 v4, 0x0
|
|
|
|
const/4 v6, 0x1
|
|
|
|
if-nez v2, :cond_0
|
|
|
|
.line 99
|
|
new-instance v2, Lcom/mojiweather/area/FootStepManager$FootPrintLoc;
|
|
|
|
iget-object v7, p0, Lcom/mojiweather/area/FootStepManager$1;->a:Lcom/mojiweather/area/FootStepManager;
|
|
|
|
invoke-direct {v2, v7, v3}, Lcom/mojiweather/area/FootStepManager$FootPrintLoc;-><init>(Lcom/mojiweather/area/FootStepManager;Lcom/mojiweather/area/FootStepManager$1;)V
|
|
|
|
.line 100
|
|
invoke-static {}, Ljava/lang/System;->currentTimeMillis()J
|
|
|
|
move-result-wide v7
|
|
|
|
iput-wide v7, v2, Lcom/mojiweather/area/FootStepManager$FootPrintLoc;->a:J
|
|
|
|
.line 101
|
|
iput v6, v2, Lcom/mojiweather/area/FootStepManager$FootPrintLoc;->c:I
|
|
|
|
.line 102
|
|
iput-wide v4, v2, Lcom/mojiweather/area/FootStepManager$FootPrintLoc;->b:J
|
|
|
|
.line 103
|
|
iput-wide v0, v2, Lcom/mojiweather/area/FootStepManager$FootPrintLoc;->d:J
|
|
|
|
goto :goto_0
|
|
|
|
.line 104
|
|
:cond_0
|
|
iget-wide v7, v2, Lcom/mojiweather/area/FootStepManager$FootPrintLoc;->d:J
|
|
|
|
cmp-long v9, v7, v0
|
|
|
|
if-nez v9, :cond_1
|
|
|
|
.line 105
|
|
iget v7, v2, Lcom/mojiweather/area/FootStepManager$FootPrintLoc;->c:I
|
|
|
|
add-int/2addr v7, v6
|
|
|
|
iput v7, v2, Lcom/mojiweather/area/FootStepManager$FootPrintLoc;->c:I
|
|
|
|
.line 106
|
|
invoke-static {}, Ljava/lang/System;->currentTimeMillis()J
|
|
|
|
move-result-wide v7
|
|
|
|
iget-wide v9, v2, Lcom/mojiweather/area/FootStepManager$FootPrintLoc;->a:J
|
|
|
|
const/4 v11, 0x0
|
|
|
|
sub-long/2addr v7, v9
|
|
|
|
iput-wide v7, v2, Lcom/mojiweather/area/FootStepManager$FootPrintLoc;->b:J
|
|
|
|
.line 108
|
|
:cond_1
|
|
:goto_0
|
|
iget-object v7, p0, Lcom/mojiweather/area/FootStepManager$1;->a:Lcom/mojiweather/area/FootStepManager;
|
|
|
|
invoke-static {v7}, Lcom/mojiweather/area/FootStepManager;->c(Lcom/mojiweather/area/FootStepManager;)Lcom/moji/preferences/DefaultPrefer;
|
|
|
|
move-result-object v7
|
|
|
|
iget-object v8, p0, Lcom/mojiweather/area/FootStepManager$1;->a:Lcom/mojiweather/area/FootStepManager;
|
|
|
|
invoke-static {v8}, Lcom/mojiweather/area/FootStepManager;->d(Lcom/mojiweather/area/FootStepManager;)Lcom/google/gson/Gson;
|
|
|
|
move-result-object v8
|
|
|
|
invoke-virtual {v8, v2}, Lcom/google/gson/Gson;->toJson(Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object v8
|
|
|
|
invoke-virtual {v7, v8}, Lcom/moji/preferences/DefaultPrefer;->c(Ljava/lang/String;)V
|
|
|
|
.line 111
|
|
iget-object v7, p0, Lcom/mojiweather/area/FootStepManager$1;->a:Lcom/mojiweather/area/FootStepManager;
|
|
|
|
invoke-static {v7}, Lcom/mojiweather/area/FootStepManager;->b(Lcom/mojiweather/area/FootStepManager;)Lcom/moji/preferences/ActivityLifePrefer;
|
|
|
|
move-result-object v7
|
|
|
|
invoke-virtual {v7}, Lcom/moji/preferences/ActivityLifePrefer;->i()Z
|
|
|
|
move-result v7
|
|
|
|
if-nez v7, :cond_2
|
|
|
|
.line 112
|
|
iget-object v7, p0, Lcom/mojiweather/area/FootStepManager$1;->a:Lcom/mojiweather/area/FootStepManager;
|
|
|
|
invoke-static {v7}, Lcom/mojiweather/area/FootStepManager;->c(Lcom/mojiweather/area/FootStepManager;)Lcom/moji/preferences/DefaultPrefer;
|
|
|
|
move-result-object v7
|
|
|
|
invoke-virtual {v7, v0, v1}, Lcom/moji/preferences/DefaultPrefer;->a(J)V
|
|
|
|
goto :goto_1
|
|
|
|
.line 114
|
|
:cond_2
|
|
iget-object v7, p0, Lcom/mojiweather/area/FootStepManager$1;->a:Lcom/mojiweather/area/FootStepManager;
|
|
|
|
invoke-static {v7}, Lcom/mojiweather/area/FootStepManager;->e(Lcom/mojiweather/area/FootStepManager;)J
|
|
|
|
move-result-wide v7
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
cmp-long v9, v7, v4
|
|
|
|
if-gez v9, :cond_3
|
|
|
|
.line 115
|
|
monitor-exit p0
|
|
|
|
return-void
|
|
|
|
.line 119
|
|
:cond_3
|
|
:goto_1
|
|
:try_start_1
|
|
iget-object v7, p0, Lcom/mojiweather/area/FootStepManager$1;->a:Lcom/mojiweather/area/FootStepManager;
|
|
|
|
invoke-static {v7}, Lcom/mojiweather/area/FootStepManager;->a(Lcom/mojiweather/area/FootStepManager;)Z
|
|
|
|
move-result v7
|
|
:try_end_1
|
|
.catchall {:try_start_1 .. :try_end_1} :catchall_0
|
|
|
|
if-nez v7, :cond_4
|
|
|
|
monitor-exit p0
|
|
|
|
return-void
|
|
|
|
.line 121
|
|
:cond_4
|
|
:try_start_2
|
|
iget-wide v7, v2, Lcom/mojiweather/area/FootStepManager$FootPrintLoc;->b:J
|
|
|
|
const-wide/32 v9, 0x2932e00
|
|
|
|
cmp-long v11, v7, v9
|
|
|
|
if-lez v11, :cond_5
|
|
|
|
const/4 v7, 0x1
|
|
|
|
goto :goto_2
|
|
|
|
:cond_5
|
|
const/4 v7, 0x0
|
|
|
|
:goto_2
|
|
if-eqz v7, :cond_9
|
|
|
|
.line 122
|
|
iget v7, v2, Lcom/mojiweather/area/FootStepManager$FootPrintLoc;->c:I
|
|
|
|
if-le v7, v6, :cond_9
|
|
|
|
.line 123
|
|
iget-boolean v6, p1, Lcom/moji/common/area/AreaInfo;->isLocation:Z
|
|
|
|
if-eqz v6, :cond_8
|
|
|
|
.line 125
|
|
iget-object v6, p0, Lcom/mojiweather/area/FootStepManager$1;->a:Lcom/mojiweather/area/FootStepManager;
|
|
|
|
invoke-static {v6, p2}, Lcom/mojiweather/area/FootStepManager;->b(Lcom/mojiweather/area/FootStepManager;Lcom/moji/weatherprovider/data/Weather;)V
|
|
|
|
.line 126
|
|
invoke-static {}, Lcom/moji/areamanagement/MJAreaManager;->c()Ljava/util/List;
|
|
|
|
move-result-object p2
|
|
|
|
if-eqz p2, :cond_7
|
|
|
|
.line 128
|
|
invoke-interface {p2}, Ljava/util/List;->isEmpty()Z
|
|
|
|
move-result v6
|
|
|
|
if-nez v6, :cond_7
|
|
|
|
.line 129
|
|
invoke-interface {p2}, Ljava/util/List;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object p2
|
|
|
|
:cond_6
|
|
invoke-interface {p2}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v6
|
|
|
|
if-eqz v6, :cond_7
|
|
|
|
invoke-interface {p2}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v6
|
|
|
|
check-cast v6, Lcom/moji/common/area/AreaInfo;
|
|
|
|
.line 130
|
|
iget v7, v6, Lcom/moji/common/area/AreaInfo;->cityId:I
|
|
|
|
int-to-long v7, v7
|
|
|
|
cmp-long v9, v7, v0
|
|
|
|
if-nez v9, :cond_6
|
|
|
|
move-object v3, v6
|
|
|
|
:cond_7
|
|
if-eqz v3, :cond_8
|
|
|
|
.line 137
|
|
invoke-static {}, Lcom/moji/tool/AppDelegate;->a()Landroid/content/Context;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-static {p2, v3}, Lcom/moji/areamanagement/MJAreaManager;->a(Landroid/content/Context;Lcom/moji/common/area/AreaInfo;)Z
|
|
|
|
move-result p2
|
|
|
|
if-eqz p2, :cond_8
|
|
|
|
.line 140
|
|
invoke-static {}, Lcom/moji/weatherprovider/provider/WeatherProvider;->b()Lcom/moji/weatherprovider/provider/WeatherProvider;
|
|
|
|
move-result-object p2
|
|
|
|
long-to-int v3, v0
|
|
|
|
invoke-static {v3}, Lcom/moji/areamanagement/MJAreaManager;->a(I)Lcom/moji/common/area/AreaInfo;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-virtual {p2, v3}, Lcom/moji/weatherprovider/provider/WeatherProvider;->b(Lcom/moji/common/area/AreaInfo;)Z
|
|
|
|
.line 142
|
|
invoke-static {}, Lcom/moji/bus/Bus;->a()Lcom/moji/bus/Bus;
|
|
|
|
move-result-object p2
|
|
|
|
new-instance v3, Lcom/mojiweather/area/event/DeleteAreaEvent;
|
|
|
|
invoke-direct {v3}, Lcom/mojiweather/area/event/DeleteAreaEvent;-><init>()V
|
|
|
|
invoke-virtual {p2, v3}, Lcom/moji/bus/Bus;->c(Ljava/lang/Object;)V
|
|
|
|
.line 147
|
|
:cond_8
|
|
iget-object p2, p0, Lcom/mojiweather/area/FootStepManager$1;->a:Lcom/mojiweather/area/FootStepManager;
|
|
|
|
invoke-static {p2}, Lcom/mojiweather/area/FootStepManager;->e(Lcom/mojiweather/area/FootStepManager;)J
|
|
|
|
move-result-wide v6
|
|
|
|
cmp-long p2, v6, v4
|
|
|
|
if-lez p2, :cond_a
|
|
|
|
iget-object p2, p0, Lcom/mojiweather/area/FootStepManager$1;->a:Lcom/mojiweather/area/FootStepManager;
|
|
|
|
invoke-static {p2}, Lcom/mojiweather/area/FootStepManager;->e(Lcom/mojiweather/area/FootStepManager;)J
|
|
|
|
move-result-wide v3
|
|
|
|
cmp-long p2, v3, v0
|
|
|
|
if-eqz p2, :cond_a
|
|
|
|
iget-boolean p1, p1, Lcom/moji/common/area/AreaInfo;->isLocation:Z
|
|
|
|
if-eqz p1, :cond_a
|
|
|
|
.line 149
|
|
invoke-static {}, Landroid/os/Message;->obtain()Landroid/os/Message;
|
|
|
|
move-result-object p1
|
|
|
|
const/16 p2, 0x65
|
|
|
|
.line 150
|
|
iput p2, p1, Landroid/os/Message;->what:I
|
|
|
|
.line 151
|
|
iget-object p2, p0, Lcom/mojiweather/area/FootStepManager$1;->a:Lcom/mojiweather/area/FootStepManager;
|
|
|
|
invoke-static {p2}, Lcom/mojiweather/area/FootStepManager;->e(Lcom/mojiweather/area/FootStepManager;)J
|
|
|
|
move-result-wide v3
|
|
|
|
long-to-int p2, v3
|
|
|
|
iput p2, p1, Landroid/os/Message;->arg1:I
|
|
|
|
.line 152
|
|
iget-object p2, p0, Lcom/mojiweather/area/FootStepManager$1;->a:Lcom/mojiweather/area/FootStepManager;
|
|
|
|
invoke-static {p2}, Lcom/mojiweather/area/FootStepManager;->f(Lcom/mojiweather/area/FootStepManager;)Lcom/mojiweather/area/FootStepManager$FootStepHandler;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-virtual {p2, p1}, Lcom/mojiweather/area/FootStepManager$FootStepHandler;->sendMessage(Landroid/os/Message;)Z
|
|
|
|
.line 155
|
|
iget-object p1, p0, Lcom/mojiweather/area/FootStepManager$1;->a:Lcom/mojiweather/area/FootStepManager;
|
|
|
|
invoke-static {p1, v0, v1, v2}, Lcom/mojiweather/area/FootStepManager;->a(Lcom/mojiweather/area/FootStepManager;JLcom/mojiweather/area/FootStepManager$FootPrintLoc;)V
|
|
|
|
goto :goto_3
|
|
|
|
.line 159
|
|
:cond_9
|
|
iget-wide p1, v2, Lcom/mojiweather/area/FootStepManager$FootPrintLoc;->d:J
|
|
|
|
cmp-long v3, p1, v0
|
|
|
|
if-eqz v3, :cond_a
|
|
|
|
.line 160
|
|
iget-object p1, p0, Lcom/mojiweather/area/FootStepManager$1;->a:Lcom/mojiweather/area/FootStepManager;
|
|
|
|
invoke-static {p1, v0, v1, v2}, Lcom/mojiweather/area/FootStepManager;->a(Lcom/mojiweather/area/FootStepManager;JLcom/mojiweather/area/FootStepManager$FootPrintLoc;)V
|
|
:try_end_2
|
|
.catchall {:try_start_2 .. :try_end_2} :catchall_0
|
|
|
|
.line 163
|
|
:cond_a
|
|
:goto_3
|
|
monitor-exit p0
|
|
|
|
return-void
|
|
|
|
:catchall_0
|
|
move-exception p1
|
|
|
|
.line 95
|
|
monitor-exit p0
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public declared-synchronized a(Lcom/moji/location/entity/MJLocation;)V
|
|
.locals 3
|
|
|
|
monitor-enter p0
|
|
|
|
.line 79
|
|
:try_start_0
|
|
iget-object p1, p0, Lcom/mojiweather/area/FootStepManager$1;->a:Lcom/mojiweather/area/FootStepManager;
|
|
|
|
invoke-static {p1}, Lcom/mojiweather/area/FootStepManager;->a(Lcom/mojiweather/area/FootStepManager;)Z
|
|
|
|
move-result p1
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
if-nez p1, :cond_0
|
|
|
|
monitor-exit p0
|
|
|
|
return-void
|
|
|
|
.line 81
|
|
:cond_0
|
|
:try_start_1
|
|
new-instance p1, Lcom/moji/common/area/AreaInfo;
|
|
|
|
invoke-direct {p1}, Lcom/moji/common/area/AreaInfo;-><init>()V
|
|
|
|
const/4 v0, 0x1
|
|
|
|
.line 82
|
|
iput-boolean v0, p1, Lcom/moji/common/area/AreaInfo;->isLocation:Z
|
|
|
|
.line 83
|
|
invoke-static {}, Lcom/moji/weatherprovider/provider/WeatherProvider;->b()Lcom/moji/weatherprovider/provider/WeatherProvider;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0, p1}, Lcom/moji/weatherprovider/provider/WeatherProvider;->a(Lcom/moji/common/area/AreaInfo;)Lcom/moji/weatherprovider/data/Weather;
|
|
|
|
move-result-object p1
|
|
|
|
if-eqz p1, :cond_2
|
|
|
|
.line 85
|
|
iget-object v0, p0, Lcom/mojiweather/area/FootStepManager$1;->a:Lcom/mojiweather/area/FootStepManager;
|
|
|
|
invoke-static {v0}, Lcom/mojiweather/area/FootStepManager;->b(Lcom/mojiweather/area/FootStepManager;)Lcom/moji/preferences/ActivityLifePrefer;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Lcom/moji/preferences/ActivityLifePrefer;->i()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
.line 86
|
|
iget-object p1, p0, Lcom/mojiweather/area/FootStepManager$1;->a:Lcom/mojiweather/area/FootStepManager;
|
|
|
|
iget-object v0, p0, Lcom/mojiweather/area/FootStepManager$1;->a:Lcom/mojiweather/area/FootStepManager;
|
|
|
|
invoke-static {v0}, Lcom/mojiweather/area/FootStepManager;->c(Lcom/mojiweather/area/FootStepManager;)Lcom/moji/preferences/DefaultPrefer;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Lcom/moji/preferences/DefaultPrefer;->q()J
|
|
|
|
move-result-wide v0
|
|
|
|
invoke-static {p1, v0, v1}, Lcom/mojiweather/area/FootStepManager;->a(Lcom/mojiweather/area/FootStepManager;J)J
|
|
|
|
.line 87
|
|
iget-object p1, p0, Lcom/mojiweather/area/FootStepManager$1;->a:Lcom/mojiweather/area/FootStepManager;
|
|
|
|
invoke-static {p1}, Lcom/mojiweather/area/FootStepManager;->c(Lcom/mojiweather/area/FootStepManager;)Lcom/moji/preferences/DefaultPrefer;
|
|
|
|
move-result-object p1
|
|
|
|
const-wide/16 v0, -0x1
|
|
|
|
invoke-virtual {p1, v0, v1}, Lcom/moji/preferences/DefaultPrefer;->a(J)V
|
|
|
|
goto :goto_0
|
|
|
|
.line 89
|
|
:cond_1
|
|
iget-object v0, p0, Lcom/mojiweather/area/FootStepManager$1;->a:Lcom/mojiweather/area/FootStepManager;
|
|
|
|
iget-object v1, p0, Lcom/mojiweather/area/FootStepManager$1;->a:Lcom/mojiweather/area/FootStepManager;
|
|
|
|
invoke-static {v1, p1}, Lcom/mojiweather/area/FootStepManager;->a(Lcom/mojiweather/area/FootStepManager;Lcom/moji/weatherprovider/data/Weather;)J
|
|
|
|
move-result-wide v1
|
|
|
|
invoke-static {v0, v1, v2}, Lcom/mojiweather/area/FootStepManager;->a(Lcom/mojiweather/area/FootStepManager;J)J
|
|
:try_end_1
|
|
.catchall {:try_start_1 .. :try_end_1} :catchall_0
|
|
|
|
.line 92
|
|
:cond_2
|
|
:goto_0
|
|
monitor-exit p0
|
|
|
|
return-void
|
|
|
|
:catchall_0
|
|
move-exception p1
|
|
|
|
.line 78
|
|
monitor-exit p0
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public b(Lcom/moji/location/entity/MJLocation;)V
|
|
.locals 0
|
|
|
|
return-void
|
|
.end method
|