135 lines
3.6 KiB
Smali
135 lines
3.6 KiB
Smali
.class public Lcom/moji/external/service/ExternalWeatherUpdateService;
|
|
.super Landroid/app/Service;
|
|
.source "ExternalWeatherUpdateService.java"
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>()V
|
|
.locals 0
|
|
|
|
.line 19
|
|
invoke-direct {p0}, Landroid/app/Service;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public onBind(Landroid/content/Intent;)Landroid/os/IBinder;
|
|
.locals 0
|
|
|
|
const/4 p1, 0x0
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public onCreate()V
|
|
.locals 2
|
|
|
|
.line 24
|
|
invoke-super {p0}, Landroid/app/Service;->onCreate()V
|
|
|
|
const-string v0, "ExternalWeatherUpdateService"
|
|
|
|
const-string v1, "onCreate"
|
|
|
|
.line 25
|
|
invoke-static {v0, v1}, Lcom/moji/tool/log/MJLogger;->b(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public onStartCommand(Landroid/content/Intent;II)I
|
|
.locals 6
|
|
|
|
const-string v0, "ExternalWeatherUpdateService"
|
|
|
|
const-string v1, "onStartCommand"
|
|
|
|
.line 35
|
|
invoke-static {v0, v1}, Lcom/moji/tool/log/MJLogger;->c(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
const-string v0, "city_id"
|
|
|
|
.line 37
|
|
invoke-virtual {p1, v0}, Landroid/content/Intent;->hasExtra(Ljava/lang/String;)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
const-string v0, "city_id"
|
|
|
|
const/4 v1, -0x1
|
|
|
|
.line 38
|
|
invoke-virtual {p1, v0, v1}, Landroid/content/Intent;->getIntExtra(Ljava/lang/String;I)I
|
|
|
|
move-result v0
|
|
|
|
if-eq v0, v1, :cond_1
|
|
|
|
.line 40
|
|
new-instance v1, Lcom/moji/weatherprovider/update/WeatherUpdater;
|
|
|
|
const/4 v2, 0x0
|
|
|
|
invoke-direct {v1, v2}, Lcom/moji/weatherprovider/update/WeatherUpdater;-><init>(Z)V
|
|
|
|
.line 41
|
|
new-instance v3, Lcom/moji/common/area/AreaInfo;
|
|
|
|
invoke-direct {v3}, Lcom/moji/common/area/AreaInfo;-><init>()V
|
|
|
|
.line 42
|
|
iput v0, v3, Lcom/moji/common/area/AreaInfo;->cityId:I
|
|
|
|
const/16 v4, -0x63
|
|
|
|
if-ne v0, v4, :cond_0
|
|
|
|
const/4 v2, 0x1
|
|
|
|
.line 43
|
|
:cond_0
|
|
iput-boolean v2, v3, Lcom/moji/common/area/AreaInfo;->isLocation:Z
|
|
|
|
const-string v2, "ExternalWeatherUpdateService"
|
|
|
|
.line 44
|
|
new-instance v4, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v4}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v5, " \u66f4\u65b0\u5929\u6c14\u670d\u52a1\u88ab\u6d77\u4fe1Provider\u8bfb\u53d6\u64cd\u4f5c\u5f00\u542f\uff0c\u66f4\u65b0\u5929\u6c14 cityId = "
|
|
|
|
invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v4, v0}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {v2, v0}, Lcom/moji/tool/log/MJLogger;->e(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
.line 45
|
|
new-instance v0, Lcom/moji/external/service/ExternalWeatherUpdateService$1;
|
|
|
|
invoke-direct {v0, p0}, Lcom/moji/external/service/ExternalWeatherUpdateService$1;-><init>(Lcom/moji/external/service/ExternalWeatherUpdateService;)V
|
|
|
|
sget-object v2, Lcom/moji/weatherprovider/update/WeatherUpdater$UPDATE_TYPE;->EXTERNAL_NOT_CITYLIST:Lcom/moji/weatherprovider/update/WeatherUpdater$UPDATE_TYPE;
|
|
|
|
invoke-virtual {v1, v3, v0, v2}, Lcom/moji/weatherprovider/update/WeatherUpdater;->a(Lcom/moji/common/area/AreaInfo;Lcom/moji/weatherprovider/update/WeatherUpdateListener;Lcom/moji/weatherprovider/update/WeatherUpdater$UPDATE_TYPE;)V
|
|
|
|
.line 65
|
|
:cond_1
|
|
invoke-super {p0, p1, p2, p3}, Landroid/app/Service;->onStartCommand(Landroid/content/Intent;II)I
|
|
|
|
move-result p1
|
|
|
|
return p1
|
|
.end method
|