4657 lines
112 KiB
Smali
4657 lines
112 KiB
Smali
.class public Lcom/moji/notify/NotifyService;
|
|
.super Landroid/app/Service;
|
|
.source "NotifyService.java"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
value = {
|
|
Lcom/moji/notify/NotifyService$NotifyPhone;
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# static fields
|
|
.field public static final a:I
|
|
|
|
.field private static final b:[Ljava/lang/String;
|
|
|
|
.field private static c:Z
|
|
|
|
.field private static d:Z
|
|
|
|
.field private static e:Z
|
|
|
|
.field private static f:Z
|
|
|
|
.field private static g:Z
|
|
|
|
.field private static h:Z
|
|
|
|
.field private static i:Z
|
|
|
|
.field private static j:Z
|
|
|
|
.field private static k:Z
|
|
|
|
.field private static l:Z
|
|
|
|
|
|
# direct methods
|
|
.method static constructor <clinit>()V
|
|
.locals 4
|
|
|
|
const/4 v0, 0x2
|
|
|
|
.line 51
|
|
new-array v0, v0, [Ljava/lang/String;
|
|
|
|
const-string v1, "android.permission.ACCESS_FINE_LOCATION"
|
|
|
|
const/4 v2, 0x0
|
|
|
|
aput-object v1, v0, v2
|
|
|
|
const-string v1, "android.permission.ACCESS_COARSE_LOCATION"
|
|
|
|
const/4 v3, 0x1
|
|
|
|
aput-object v1, v0, v3
|
|
|
|
sput-object v0, Lcom/moji/notify/NotifyService;->b:[Ljava/lang/String;
|
|
|
|
.line 69
|
|
sput-boolean v2, Lcom/moji/notify/NotifyService;->c:Z
|
|
|
|
.line 70
|
|
sput-boolean v2, Lcom/moji/notify/NotifyService;->d:Z
|
|
|
|
.line 71
|
|
sput-boolean v2, Lcom/moji/notify/NotifyService;->e:Z
|
|
|
|
.line 72
|
|
sput-boolean v2, Lcom/moji/notify/NotifyService;->f:Z
|
|
|
|
.line 73
|
|
sput-boolean v2, Lcom/moji/notify/NotifyService;->g:Z
|
|
|
|
.line 74
|
|
sput-boolean v2, Lcom/moji/notify/NotifyService;->h:Z
|
|
|
|
.line 75
|
|
sput-boolean v2, Lcom/moji/notify/NotifyService;->i:Z
|
|
|
|
.line 76
|
|
sput-boolean v2, Lcom/moji/notify/NotifyService;->j:Z
|
|
|
|
.line 78
|
|
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
|
|
|
|
sput v0, Lcom/moji/notify/NotifyService;->a:I
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>()V
|
|
.locals 0
|
|
|
|
.line 49
|
|
invoke-direct {p0}, Landroid/app/Service;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static a(Lcom/moji/weatherprovider/data/Weather;)I
|
|
.locals 9
|
|
|
|
const/4 v0, 0x1
|
|
|
|
if-eqz p0, :cond_3
|
|
|
|
.line 955
|
|
iget-object v1, p0, Lcom/moji/weatherprovider/data/Weather;->mDetail:Lcom/moji/weatherprovider/data/Detail;
|
|
|
|
if-eqz v1, :cond_3
|
|
|
|
iget-object v1, p0, Lcom/moji/weatherprovider/data/Weather;->mDetail:Lcom/moji/weatherprovider/data/Detail;
|
|
|
|
iget-object v1, v1, Lcom/moji/weatherprovider/data/Detail;->mForecastDayList:Lcom/moji/weatherprovider/data/ForecastDayList;
|
|
|
|
if-eqz v1, :cond_3
|
|
|
|
iget-object v1, p0, Lcom/moji/weatherprovider/data/Weather;->mDetail:Lcom/moji/weatherprovider/data/Detail;
|
|
|
|
iget-object v1, v1, Lcom/moji/weatherprovider/data/Detail;->mForecastDayList:Lcom/moji/weatherprovider/data/ForecastDayList;
|
|
|
|
iget-object v1, v1, Lcom/moji/weatherprovider/data/ForecastDayList;->mForecastDay:Ljava/util/List;
|
|
|
|
if-eqz v1, :cond_3
|
|
|
|
iget-object v1, p0, Lcom/moji/weatherprovider/data/Weather;->mDetail:Lcom/moji/weatherprovider/data/Detail;
|
|
|
|
iget-object v1, v1, Lcom/moji/weatherprovider/data/Detail;->mForecastDayList:Lcom/moji/weatherprovider/data/ForecastDayList;
|
|
|
|
iget-object v1, v1, Lcom/moji/weatherprovider/data/ForecastDayList;->mForecastDay:Ljava/util/List;
|
|
|
|
.line 956
|
|
invoke-interface {v1}, Ljava/util/List;->isEmpty()Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
goto :goto_2
|
|
|
|
.line 960
|
|
:cond_0
|
|
iget-object v1, p0, Lcom/moji/weatherprovider/data/Weather;->mDetail:Lcom/moji/weatherprovider/data/Detail;
|
|
|
|
iget-object v1, v1, Lcom/moji/weatherprovider/data/Detail;->mForecastDayList:Lcom/moji/weatherprovider/data/ForecastDayList;
|
|
|
|
iget-object v1, v1, Lcom/moji/weatherprovider/data/ForecastDayList;->mForecastDay:Ljava/util/List;
|
|
|
|
.line 962
|
|
iget-object p0, p0, Lcom/moji/weatherprovider/data/Weather;->mDetail:Lcom/moji/weatherprovider/data/Detail;
|
|
|
|
invoke-virtual {p0}, Lcom/moji/weatherprovider/data/Detail;->getTimeZone()Ljava/util/TimeZone;
|
|
|
|
move-result-object p0
|
|
|
|
.line 963
|
|
invoke-static {}, Ljava/util/Calendar;->getInstance()Ljava/util/Calendar;
|
|
|
|
move-result-object v2
|
|
|
|
.line 964
|
|
invoke-static {}, Ljava/util/Calendar;->getInstance()Ljava/util/Calendar;
|
|
|
|
move-result-object v3
|
|
|
|
.line 965
|
|
invoke-virtual {v2, p0}, Ljava/util/Calendar;->setTimeZone(Ljava/util/TimeZone;)V
|
|
|
|
.line 966
|
|
invoke-virtual {v3, p0}, Ljava/util/Calendar;->setTimeZone(Ljava/util/TimeZone;)V
|
|
|
|
const/4 p0, 0x0
|
|
|
|
.line 968
|
|
invoke-interface {v1}, Ljava/util/List;->size()I
|
|
|
|
move-result v4
|
|
|
|
:goto_0
|
|
if-ge p0, v4, :cond_2
|
|
|
|
.line 969
|
|
invoke-interface {v1, p0}, Ljava/util/List;->get(I)Ljava/lang/Object;
|
|
|
|
move-result-object v5
|
|
|
|
check-cast v5, Lcom/moji/weatherprovider/data/ForecastDayList$ForecastDay;
|
|
|
|
if-eqz v5, :cond_1
|
|
|
|
.line 972
|
|
:try_start_0
|
|
iget-wide v5, v5, Lcom/moji/weatherprovider/data/ForecastDayList$ForecastDay;->mPredictDate:J
|
|
|
|
invoke-virtual {v2, v5, v6}, Ljava/util/Calendar;->setTimeInMillis(J)V
|
|
|
|
const/4 v5, 0x6
|
|
|
|
.line 973
|
|
invoke-virtual {v2, v5}, Ljava/util/Calendar;->get(I)I
|
|
|
|
move-result v6
|
|
|
|
invoke-virtual {v3, v5}, Ljava/util/Calendar;->get(I)I
|
|
|
|
move-result v5
|
|
:try_end_0
|
|
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
if-ne v6, v5, :cond_1
|
|
|
|
goto :goto_1
|
|
|
|
:catch_0
|
|
move-exception v5
|
|
|
|
const-string v6, "NotifyService"
|
|
|
|
.line 978
|
|
new-instance v7, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v7}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v8, "Calendar ops error: "
|
|
|
|
invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v5}, Ljava/lang/Exception;->getMessage()Ljava/lang/String;
|
|
|
|
move-result-object v5
|
|
|
|
invoke-virtual {v7, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v7}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v5
|
|
|
|
invoke-static {v6, v5}, Lcom/moji/tool/log/MJLogger;->c(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
:cond_1
|
|
add-int/lit8 p0, p0, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_2
|
|
const/4 p0, 0x1
|
|
|
|
:goto_1
|
|
return p0
|
|
|
|
:cond_3
|
|
:goto_2
|
|
return v0
|
|
.end method
|
|
|
|
.method private static a(Landroid/content/Context;I)Landroid/widget/RemoteViews;
|
|
.locals 1
|
|
|
|
.line 229
|
|
new-instance v0, Landroid/widget/RemoteViews;
|
|
|
|
invoke-virtual {p0}, Landroid/content/Context;->getPackageName()Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-direct {v0, p0, p1}, Landroid/widget/RemoteViews;-><init>(Ljava/lang/String;I)V
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method private static a(Landroid/content/Context;Lcom/moji/weatherprovider/data/Weather;Landroid/widget/RemoteViews;IZI)Landroid/widget/RemoteViews;
|
|
.locals 33
|
|
|
|
move-object/from16 v0, p0
|
|
|
|
move-object/from16 v1, p1
|
|
|
|
move-object/from16 v8, p2
|
|
|
|
move/from16 v9, p3
|
|
|
|
move/from16 v2, p5
|
|
|
|
const-string v3, ""
|
|
|
|
.line 543
|
|
invoke-static/range {p0 .. p0}, Lcom/moji/notify/NotifyService;->e(Landroid/content/Context;)I
|
|
|
|
const/4 v4, 0x3
|
|
|
|
const/4 v10, 0x2
|
|
|
|
const/16 v11, 0x8
|
|
|
|
const/4 v12, 0x1
|
|
|
|
const/4 v13, 0x0
|
|
|
|
if-eqz v1, :cond_1d
|
|
|
|
.line 545
|
|
iget-object v5, v1, Lcom/moji/weatherprovider/data/Weather;->mDetail:Lcom/moji/weatherprovider/data/Detail;
|
|
|
|
if-eqz v5, :cond_1d
|
|
|
|
iget-object v5, v1, Lcom/moji/weatherprovider/data/Weather;->mDetail:Lcom/moji/weatherprovider/data/Detail;
|
|
|
|
iget-object v5, v5, Lcom/moji/weatherprovider/data/Detail;->mCondition:Lcom/moji/weatherprovider/data/Condition;
|
|
|
|
if-nez v5, :cond_0
|
|
|
|
iget-object v5, v1, Lcom/moji/weatherprovider/data/Weather;->mDetail:Lcom/moji/weatherprovider/data/Detail;
|
|
|
|
iget-object v5, v5, Lcom/moji/weatherprovider/data/Detail;->mAqi:Lcom/moji/weatherprovider/data/Aqi;
|
|
|
|
if-eqz v5, :cond_0
|
|
|
|
goto/16 :goto_f
|
|
|
|
.line 568
|
|
:cond_0
|
|
invoke-static {}, Ljava/lang/System;->currentTimeMillis()J
|
|
|
|
move-result-wide v5
|
|
|
|
iget-wide v14, v1, Lcom/moji/weatherprovider/data/Weather;->mUpdatetime:J
|
|
|
|
sub-long/2addr v5, v14
|
|
|
|
const-wide/32 v14, 0xf731400
|
|
|
|
cmp-long v7, v5, v14
|
|
|
|
if-lez v7, :cond_5
|
|
|
|
.line 570
|
|
sget v2, Lcom/moji/notify/R$layout;->notification_no_data1:I
|
|
|
|
.line 572
|
|
sget-boolean v3, Lcom/moji/notify/NotifyService;->d:Z
|
|
|
|
if-eqz v3, :cond_1
|
|
|
|
.line 573
|
|
sget v2, Lcom/moji/notify/R$layout;->notification_no_data_special:I
|
|
|
|
.line 576
|
|
:cond_1
|
|
new-instance v3, Landroid/widget/RemoteViews;
|
|
|
|
invoke-virtual/range {p0 .. p0}, Landroid/content/Context;->getPackageName()Ljava/lang/String;
|
|
|
|
move-result-object v5
|
|
|
|
invoke-direct {v3, v5, v2}, Landroid/widget/RemoteViews;-><init>(Ljava/lang/String;I)V
|
|
|
|
.line 577
|
|
invoke-static {}, Lcom/moji/notify/NotifyService;->c()Z
|
|
|
|
move-result v2
|
|
|
|
if-nez v2, :cond_2
|
|
|
|
sget-boolean v2, Lcom/moji/notify/NotifyService;->c:Z
|
|
|
|
if-eqz v2, :cond_3
|
|
|
|
.line 578
|
|
:cond_2
|
|
sget v2, Lcom/moji/notify/R$id;->iv_no_data_icon_bg:I
|
|
|
|
sget v5, Lcom/moji/notify/R$drawable;->notif_icon_bg_transparent:I
|
|
|
|
invoke-virtual {v3, v2, v5}, Landroid/widget/RemoteViews;->setImageViewResource(II)V
|
|
|
|
.line 580
|
|
:cond_3
|
|
new-array v2, v4, [I
|
|
|
|
sget v4, Lcom/moji/notify/R$id;->tv_no_data_city_name:I
|
|
|
|
aput v4, v2, v13
|
|
|
|
sget v4, Lcom/moji/notify/R$id;->tv_update_state_str:I
|
|
|
|
aput v4, v2, v12
|
|
|
|
sget v4, Lcom/moji/notify/R$id;->tv_no_net_update:I
|
|
|
|
aput v4, v2, v10
|
|
|
|
invoke-static {v0, v3, v2}, Lcom/moji/notify/NotifyService;->a(Landroid/content/Context;Landroid/widget/RemoteViews;[I)V
|
|
|
|
.line 582
|
|
iget-object v1, v1, Lcom/moji/weatherprovider/data/Weather;->mDetail:Lcom/moji/weatherprovider/data/Detail;
|
|
|
|
iget-object v1, v1, Lcom/moji/weatherprovider/data/Detail;->mCityName:Ljava/lang/String;
|
|
|
|
.line 583
|
|
invoke-static {v1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
|
|
|
|
move-result v2
|
|
|
|
if-nez v2, :cond_4
|
|
|
|
.line 584
|
|
sget v2, Lcom/moji/notify/R$id;->tv_no_data_city_name:I
|
|
|
|
invoke-virtual {v3, v2, v1}, Landroid/widget/RemoteViews;->setTextViewText(ILjava/lang/CharSequence;)V
|
|
|
|
goto :goto_0
|
|
|
|
.line 586
|
|
:cond_4
|
|
sget v1, Lcom/moji/notify/R$id;->tv_no_data_city_name:I
|
|
|
|
invoke-virtual {v3, v1, v11}, Landroid/widget/RemoteViews;->setViewVisibility(II)V
|
|
|
|
.line 588
|
|
:goto_0
|
|
sget v1, Lcom/moji/notify/R$id;->tv_update_state_str:I
|
|
|
|
invoke-virtual/range {p0 .. p0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
|
|
|
|
move-result-object v2
|
|
|
|
sget v4, Lcom/moji/notify/R$string;->notification_enter_update:I
|
|
|
|
invoke-virtual {v2, v4}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v3, v1, v2}, Landroid/widget/RemoteViews;->setTextViewText(ILjava/lang/CharSequence;)V
|
|
|
|
goto/16 :goto_13
|
|
|
|
.line 591
|
|
:cond_5
|
|
sput-boolean v12, Lcom/moji/notify/NotifyService;->h:Z
|
|
|
|
.line 592
|
|
iget-object v5, v1, Lcom/moji/weatherprovider/data/Weather;->mDetail:Lcom/moji/weatherprovider/data/Detail;
|
|
|
|
iget-object v5, v5, Lcom/moji/weatherprovider/data/Detail;->mCityName:Ljava/lang/String;
|
|
|
|
.line 593
|
|
iget-object v6, v1, Lcom/moji/weatherprovider/data/Weather;->mDetail:Lcom/moji/weatherprovider/data/Detail;
|
|
|
|
iget-object v6, v6, Lcom/moji/weatherprovider/data/Detail;->mCondition:Lcom/moji/weatherprovider/data/Condition;
|
|
|
|
iget v6, v6, Lcom/moji/weatherprovider/data/Condition;->mTemperature:I
|
|
|
|
const/16 v7, -0x64
|
|
|
|
if-ne v6, v7, :cond_6
|
|
|
|
const-string v6, ""
|
|
|
|
:goto_1
|
|
move-object v14, v6
|
|
|
|
goto :goto_2
|
|
|
|
:cond_6
|
|
int-to-double v6, v6
|
|
|
|
.line 597
|
|
invoke-static {v6, v7, v12}, Lcom/moji/preferences/units/UNIT_TEMP;->getValueStringByCurrentUnitTemp(DZ)Ljava/lang/String;
|
|
|
|
move-result-object v6
|
|
|
|
goto :goto_1
|
|
|
|
:goto_2
|
|
const/4 v6, 0x0
|
|
|
|
.line 604
|
|
iget-object v7, v1, Lcom/moji/weatherprovider/data/Weather;->mDetail:Lcom/moji/weatherprovider/data/Detail;
|
|
|
|
iget-object v7, v7, Lcom/moji/weatherprovider/data/Detail;->mForecastDayList:Lcom/moji/weatherprovider/data/ForecastDayList;
|
|
|
|
if-eqz v7, :cond_7
|
|
|
|
iget-object v7, v1, Lcom/moji/weatherprovider/data/Weather;->mDetail:Lcom/moji/weatherprovider/data/Detail;
|
|
|
|
iget-object v7, v7, Lcom/moji/weatherprovider/data/Detail;->mForecastDayList:Lcom/moji/weatherprovider/data/ForecastDayList;
|
|
|
|
iget-object v7, v7, Lcom/moji/weatherprovider/data/ForecastDayList;->mForecastDay:Ljava/util/List;
|
|
|
|
if-eqz v7, :cond_7
|
|
|
|
.line 605
|
|
iget-object v7, v1, Lcom/moji/weatherprovider/data/Weather;->mDetail:Lcom/moji/weatherprovider/data/Detail;
|
|
|
|
iget-object v7, v7, Lcom/moji/weatherprovider/data/Detail;->mForecastDayList:Lcom/moji/weatherprovider/data/ForecastDayList;
|
|
|
|
iget-object v7, v7, Lcom/moji/weatherprovider/data/ForecastDayList;->mForecastDay:Ljava/util/List;
|
|
|
|
invoke-interface {v7}, Ljava/util/List;->size()I
|
|
|
|
move-result v7
|
|
|
|
if-le v7, v2, :cond_7
|
|
|
|
.line 607
|
|
iget-object v6, v1, Lcom/moji/weatherprovider/data/Weather;->mDetail:Lcom/moji/weatherprovider/data/Detail;
|
|
|
|
iget-object v6, v6, Lcom/moji/weatherprovider/data/Detail;->mForecastDayList:Lcom/moji/weatherprovider/data/ForecastDayList;
|
|
|
|
iget-object v6, v6, Lcom/moji/weatherprovider/data/ForecastDayList;->mForecastDay:Ljava/util/List;
|
|
|
|
invoke-interface {v6, v2}, Ljava/util/List;->get(I)Ljava/lang/Object;
|
|
|
|
move-result-object v2
|
|
|
|
move-object v6, v2
|
|
|
|
check-cast v6, Lcom/moji/weatherprovider/data/ForecastDayList$ForecastDay;
|
|
|
|
:cond_7
|
|
const/16 v2, 0x64
|
|
|
|
const/16 v7, -0x112
|
|
|
|
if-eqz v6, :cond_8
|
|
|
|
.line 612
|
|
iget v15, v6, Lcom/moji/weatherprovider/data/ForecastDayList$ForecastDay;->mTemperatureLow:I
|
|
|
|
.line 613
|
|
iget v6, v6, Lcom/moji/weatherprovider/data/ForecastDayList$ForecastDay;->mTemperatureHigh:I
|
|
|
|
goto :goto_3
|
|
|
|
:cond_8
|
|
const/16 v6, 0x64
|
|
|
|
const/16 v15, -0x112
|
|
|
|
:goto_3
|
|
if-ne v15, v7, :cond_9
|
|
|
|
const-string v7, ""
|
|
|
|
move-object/from16 v17, v5
|
|
|
|
:goto_4
|
|
move-object v15, v7
|
|
|
|
goto :goto_5
|
|
|
|
:cond_9
|
|
move-object/from16 v17, v5
|
|
|
|
int-to-double v4, v15
|
|
|
|
.line 620
|
|
invoke-static {v4, v5, v13}, Lcom/moji/preferences/units/UNIT_TEMP;->getValueStringByCurrentUnitTemp(DZ)Ljava/lang/String;
|
|
|
|
move-result-object v7
|
|
|
|
goto :goto_4
|
|
|
|
:goto_5
|
|
if-ne v6, v2, :cond_a
|
|
|
|
const-string v2, ""
|
|
|
|
:goto_6
|
|
move-object v7, v2
|
|
|
|
goto :goto_7
|
|
|
|
:cond_a
|
|
int-to-double v4, v6
|
|
|
|
.line 627
|
|
invoke-static {v4, v5, v13}, Lcom/moji/preferences/units/UNIT_TEMP;->getValueStringByCurrentUnitTemp(DZ)Ljava/lang/String;
|
|
|
|
move-result-object v2
|
|
|
|
goto :goto_6
|
|
|
|
.line 630
|
|
:goto_7
|
|
iget-object v2, v1, Lcom/moji/weatherprovider/data/Weather;->mDetail:Lcom/moji/weatherprovider/data/Detail;
|
|
|
|
iget-object v2, v2, Lcom/moji/weatherprovider/data/Detail;->mCondition:Lcom/moji/weatherprovider/data/Condition;
|
|
|
|
iget-object v6, v2, Lcom/moji/weatherprovider/data/Condition;->mCondition:Ljava/lang/String;
|
|
|
|
.line 631
|
|
iget-object v2, v1, Lcom/moji/weatherprovider/data/Weather;->mDetail:Lcom/moji/weatherprovider/data/Detail;
|
|
|
|
iget-wide v4, v2, Lcom/moji/weatherprovider/data/Detail;->mTimeStamp:J
|
|
|
|
.line 632
|
|
iget-object v2, v1, Lcom/moji/weatherprovider/data/Weather;->mDetail:Lcom/moji/weatherprovider/data/Detail;
|
|
|
|
invoke-virtual {v2}, Lcom/moji/weatherprovider/data/Detail;->getTimeZone()Ljava/util/TimeZone;
|
|
|
|
move-result-object v2
|
|
|
|
const-wide/32 v18, 0x6ddd00
|
|
|
|
if-eqz v2, :cond_d
|
|
|
|
const-wide/16 v20, 0x0
|
|
|
|
cmp-long v22, v4, v20
|
|
|
|
if-lez v22, :cond_d
|
|
|
|
.line 637
|
|
invoke-virtual/range {p1 .. p1}, Lcom/moji/weatherprovider/data/Weather;->isLocation()Z
|
|
|
|
move-result v3
|
|
|
|
if-eqz v3, :cond_b
|
|
|
|
iget-object v3, v1, Lcom/moji/weatherprovider/data/Weather;->mDetail:Lcom/moji/weatherprovider/data/Detail;
|
|
|
|
iget v3, v3, Lcom/moji/weatherprovider/data/Detail;->mHasShort:I
|
|
|
|
if-ne v3, v12, :cond_b
|
|
|
|
iget-object v3, v1, Lcom/moji/weatherprovider/data/Weather;->mDetail:Lcom/moji/weatherprovider/data/Detail;
|
|
|
|
iget-object v3, v3, Lcom/moji/weatherprovider/data/Detail;->mShortData:Lcom/moji/http/sfc/forecast/ShortDataResp$RadarData;
|
|
|
|
if-eqz v3, :cond_b
|
|
|
|
iget-object v3, v1, Lcom/moji/weatherprovider/data/Weather;->mDetail:Lcom/moji/weatherprovider/data/Detail;
|
|
|
|
iget-object v3, v3, Lcom/moji/weatherprovider/data/Detail;->mShortData:Lcom/moji/http/sfc/forecast/ShortDataResp$RadarData;
|
|
|
|
iget-object v3, v3, Lcom/moji/http/sfc/forecast/ShortDataResp$RadarData;->percent:Ljava/util/List;
|
|
|
|
if-eqz v3, :cond_b
|
|
|
|
.line 639
|
|
invoke-static {}, Ljava/lang/System;->currentTimeMillis()J
|
|
|
|
move-result-wide v20
|
|
|
|
iget-object v3, v1, Lcom/moji/weatherprovider/data/Weather;->mDetail:Lcom/moji/weatherprovider/data/Detail;
|
|
|
|
iget-object v3, v3, Lcom/moji/weatherprovider/data/Detail;->mShortData:Lcom/moji/http/sfc/forecast/ShortDataResp$RadarData;
|
|
|
|
iget-wide v10, v3, Lcom/moji/http/sfc/forecast/ShortDataResp$RadarData;->timestamp:J
|
|
|
|
sub-long v20, v20, v10
|
|
|
|
cmp-long v3, v20, v18
|
|
|
|
if-gez v3, :cond_b
|
|
|
|
new-instance v3, Lcom/moji/preferences/ProcessPrefer;
|
|
|
|
invoke-direct {v3}, Lcom/moji/preferences/ProcessPrefer;-><init>()V
|
|
|
|
invoke-virtual {v3}, Lcom/moji/preferences/ProcessPrefer;->u()Z
|
|
|
|
move-result v3
|
|
|
|
if-eqz v3, :cond_b
|
|
|
|
.line 640
|
|
iget-object v3, v1, Lcom/moji/weatherprovider/data/Weather;->mDetail:Lcom/moji/weatherprovider/data/Detail;
|
|
|
|
iget-object v3, v3, Lcom/moji/weatherprovider/data/Detail;->mShortData:Lcom/moji/http/sfc/forecast/ShortDataResp$RadarData;
|
|
|
|
iget-wide v10, v3, Lcom/moji/http/sfc/forecast/ShortDataResp$RadarData;->timestamp:J
|
|
|
|
goto :goto_8
|
|
|
|
.line 642
|
|
:cond_b
|
|
iget-object v3, v1, Lcom/moji/weatherprovider/data/Weather;->mDetail:Lcom/moji/weatherprovider/data/Detail;
|
|
|
|
iget-object v3, v3, Lcom/moji/weatherprovider/data/Detail;->mCondition:Lcom/moji/weatherprovider/data/Condition;
|
|
|
|
iget-wide v10, v3, Lcom/moji/weatherprovider/data/Condition;->mUpdatetime:J
|
|
|
|
.line 644
|
|
:goto_8
|
|
invoke-static {v0, v10, v11, v2}, Lcom/moji/notify/NotifyService;->a(Landroid/content/Context;JLjava/util/TimeZone;)Ljava/lang/String;
|
|
|
|
move-result-object v3
|
|
|
|
.line 645
|
|
invoke-virtual {v3}, Ljava/lang/String;->length()I
|
|
|
|
move-result v10
|
|
|
|
if-nez v10, :cond_c
|
|
|
|
.line 646
|
|
invoke-static {v4, v5, v2}, Lcom/moji/notify/NotifyService;->a(JLjava/util/TimeZone;)Ljava/lang/String;
|
|
|
|
move-result-object v2
|
|
|
|
move-object v3, v2
|
|
|
|
.line 648
|
|
:cond_c
|
|
invoke-virtual/range {p0 .. p0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
|
|
|
|
move-result-object v2
|
|
|
|
sget v4, Lcom/moji/notify/R$string;->ago_publish_out:I
|
|
|
|
invoke-virtual {v2, v4}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v3, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result v2
|
|
|
|
if-nez v2, :cond_d
|
|
|
|
.line 649
|
|
new-instance v2, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual/range {p0 .. p0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
|
|
|
|
move-result-object v3
|
|
|
|
sget v4, Lcom/moji/notify/R$string;->publish:I
|
|
|
|
invoke-virtual {v3, v4}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v3
|
|
|
|
:cond_d
|
|
move-object v10, v3
|
|
|
|
.line 654
|
|
iget-object v2, v1, Lcom/moji/weatherprovider/data/Weather;->mDetail:Lcom/moji/weatherprovider/data/Detail;
|
|
|
|
iget-object v2, v2, Lcom/moji/weatherprovider/data/Detail;->mAqi:Lcom/moji/weatherprovider/data/Aqi;
|
|
|
|
iget v11, v2, Lcom/moji/weatherprovider/data/Aqi;->mLevel:I
|
|
|
|
.line 655
|
|
iget-object v2, v1, Lcom/moji/weatherprovider/data/Weather;->mDetail:Lcom/moji/weatherprovider/data/Detail;
|
|
|
|
iget-object v2, v2, Lcom/moji/weatherprovider/data/Detail;->mAqi:Lcom/moji/weatherprovider/data/Aqi;
|
|
|
|
iget-object v5, v2, Lcom/moji/weatherprovider/data/Aqi;->mDescription:Ljava/lang/String;
|
|
|
|
.line 656
|
|
iget-object v2, v1, Lcom/moji/weatherprovider/data/Weather;->mDetail:Lcom/moji/weatherprovider/data/Detail;
|
|
|
|
iget-object v2, v2, Lcom/moji/weatherprovider/data/Detail;->mCondition:Lcom/moji/weatherprovider/data/Condition;
|
|
|
|
iget-object v4, v2, Lcom/moji/weatherprovider/data/Condition;->mWindDir:Ljava/lang/String;
|
|
|
|
.line 657
|
|
iget-object v2, v1, Lcom/moji/weatherprovider/data/Weather;->mDetail:Lcom/moji/weatherprovider/data/Detail;
|
|
|
|
iget-object v2, v2, Lcom/moji/weatherprovider/data/Detail;->mCondition:Lcom/moji/weatherprovider/data/Condition;
|
|
|
|
iget-wide v2, v2, Lcom/moji/weatherprovider/data/Condition;->mWindSpeeds:D
|
|
|
|
.line 658
|
|
iget-object v12, v1, Lcom/moji/weatherprovider/data/Weather;->mDetail:Lcom/moji/weatherprovider/data/Detail;
|
|
|
|
iget-object v12, v12, Lcom/moji/weatherprovider/data/Detail;->mCondition:Lcom/moji/weatherprovider/data/Condition;
|
|
|
|
iget v12, v12, Lcom/moji/weatherprovider/data/Condition;->mWindLevel:I
|
|
|
|
.line 659
|
|
new-instance v13, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v13}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
move-wide/from16 v23, v2
|
|
|
|
iget-object v2, v1, Lcom/moji/weatherprovider/data/Weather;->mDetail:Lcom/moji/weatherprovider/data/Detail;
|
|
|
|
iget-object v2, v2, Lcom/moji/weatherprovider/data/Detail;->mAqi:Lcom/moji/weatherprovider/data/Aqi;
|
|
|
|
iget v2, v2, Lcom/moji/weatherprovider/data/Aqi;->mValue:I
|
|
|
|
invoke-virtual {v13, v2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
|
|
|
|
const-string v2, ""
|
|
|
|
invoke-virtual {v13, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v13}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v13
|
|
|
|
.line 660
|
|
new-instance v2, Lcom/moji/base/WeatherDrawable;
|
|
|
|
iget-object v3, v1, Lcom/moji/weatherprovider/data/Weather;->mDetail:Lcom/moji/weatherprovider/data/Detail;
|
|
|
|
iget-object v3, v3, Lcom/moji/weatherprovider/data/Detail;->mCondition:Lcom/moji/weatherprovider/data/Condition;
|
|
|
|
iget v3, v3, Lcom/moji/weatherprovider/data/Condition;->mIcon:I
|
|
|
|
invoke-direct {v2, v3}, Lcom/moji/base/WeatherDrawable;-><init>(I)V
|
|
|
|
.line 661
|
|
iget-object v3, v1, Lcom/moji/weatherprovider/data/Weather;->mDetail:Lcom/moji/weatherprovider/data/Detail;
|
|
|
|
invoke-virtual {v3}, Lcom/moji/weatherprovider/data/Detail;->isDay()Z
|
|
|
|
move-result v3
|
|
|
|
invoke-virtual {v2, v3}, Lcom/moji/base/WeatherDrawable;->a(Z)I
|
|
|
|
move-result v2
|
|
|
|
const/16 v3, 0xd
|
|
|
|
move-object/from16 v25, v4
|
|
|
|
.line 664
|
|
new-array v4, v3, [I
|
|
|
|
sget v20, Lcom/moji/notify/R$id;->tv_curr_city:I
|
|
|
|
const/16 v21, 0x0
|
|
|
|
aput v20, v4, v21
|
|
|
|
sget v20, Lcom/moji/notify/R$id;->tv_curr_tmp:I
|
|
|
|
const/16 v21, 0x1
|
|
|
|
aput v20, v4, v21
|
|
|
|
sget v20, Lcom/moji/notify/R$id;->tv_tmp_publish_time:I
|
|
|
|
const/16 v21, 0x2
|
|
|
|
aput v20, v4, v21
|
|
|
|
sget v20, Lcom/moji/notify/R$id;->tv_curr_describe:I
|
|
|
|
const/16 v16, 0x3
|
|
|
|
aput v20, v4, v16
|
|
|
|
sget v16, Lcom/moji/notify/R$id;->tx_air_pollution3:I
|
|
|
|
move-object/from16 v26, v7
|
|
|
|
const/4 v7, 0x4
|
|
|
|
aput v16, v4, v7
|
|
|
|
const/16 v16, 0x5
|
|
|
|
sget v20, Lcom/moji/notify/R$id;->tx_air_pollution2:I
|
|
|
|
aput v20, v4, v16
|
|
|
|
const/16 v16, 0x6
|
|
|
|
sget v20, Lcom/moji/notify/R$id;->tv_curr_tmp_high:I
|
|
|
|
aput v20, v4, v16
|
|
|
|
const/16 v16, 0x7
|
|
|
|
sget v20, Lcom/moji/notify/R$id;->tv_curr_tmp_low:I
|
|
|
|
aput v20, v4, v16
|
|
|
|
sget v16, Lcom/moji/notify/R$id;->tv_special_weather:I
|
|
|
|
const/16 v20, 0x8
|
|
|
|
aput v16, v4, v20
|
|
|
|
const/16 v16, 0x9
|
|
|
|
sget v20, Lcom/moji/notify/R$id;->text_devide:I
|
|
|
|
aput v20, v4, v16
|
|
|
|
const/16 v16, 0xa
|
|
|
|
sget v20, Lcom/moji/notify/R$id;->tx_air_pollution1:I
|
|
|
|
aput v20, v4, v16
|
|
|
|
sget v16, Lcom/moji/notify/R$id;->tx_air_pollution0:I
|
|
|
|
const/16 v7, 0xb
|
|
|
|
aput v16, v4, v7
|
|
|
|
const/16 v16, 0xc
|
|
|
|
sget v20, Lcom/moji/notify/R$id;->tv_weather_describe:I
|
|
|
|
aput v20, v4, v16
|
|
|
|
invoke-static {v0, v8, v4}, Lcom/moji/notify/NotifyService;->a(Landroid/content/Context;Landroid/widget/RemoteViews;[I)V
|
|
|
|
.line 668
|
|
invoke-static {}, Lcom/moji/notify/NotifyService;->e()Z
|
|
|
|
move-result v4
|
|
|
|
if-nez v4, :cond_e
|
|
|
|
sget-boolean v4, Lcom/moji/notify/NotifyService;->c:Z
|
|
|
|
if-eqz v4, :cond_f
|
|
|
|
:cond_e
|
|
const-string v4, "code"
|
|
|
|
.line 669
|
|
new-instance v3, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v7, "\u5c0f\u7c73\u673a\u578bBuild.DEVICE+"
|
|
|
|
invoke-virtual {v3, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
sget-object v7, Landroid/os/Build;->DEVICE:Ljava/lang/String;
|
|
|
|
invoke-virtual {v3, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
const-string v7, ",Build.MODEL+"
|
|
|
|
invoke-virtual {v3, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
sget-object v7, Landroid/os/Build;->MODEL:Ljava/lang/String;
|
|
|
|
invoke-virtual {v3, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
const-string v7, ",Build.BRAND+"
|
|
|
|
invoke-virtual {v3, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
sget-object v7, Landroid/os/Build;->BRAND:Ljava/lang/String;
|
|
|
|
invoke-virtual {v3, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-static {v4, v3}, Lcom/moji/tool/log/MJLogger;->b(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
.line 670
|
|
sget v3, Lcom/moji/notify/R$id;->iv_view_icon_bg:I
|
|
|
|
sget v4, Lcom/moji/notify/R$drawable;->notif_icon_bg_transparent:I
|
|
|
|
invoke-virtual {v8, v3, v4}, Landroid/widget/RemoteViews;->setImageViewResource(II)V
|
|
|
|
.line 672
|
|
:cond_f
|
|
sget v3, Lcom/moji/notify/R$id;->iv_curr_icon:I
|
|
|
|
invoke-virtual {v8, v3, v2}, Landroid/widget/RemoteViews;->setImageViewResource(II)V
|
|
|
|
.line 674
|
|
sget v2, Lcom/moji/notify/R$id;->tv_curr_city:I
|
|
|
|
move-object/from16 v3, v17
|
|
|
|
invoke-virtual {v8, v2, v3}, Landroid/widget/RemoteViews;->setTextViewText(ILjava/lang/CharSequence;)V
|
|
|
|
.line 675
|
|
sget v2, Landroid/os/Build$VERSION;->SDK_INT:I
|
|
|
|
const/16 v3, 0x10
|
|
|
|
if-lt v2, v3, :cond_11
|
|
|
|
if-eqz p4, :cond_10
|
|
|
|
.line 677
|
|
sget v3, Lcom/moji/notify/R$id;->tv_curr_city:I
|
|
|
|
sget v4, Lcom/moji/notify/R$drawable;->title_location:I
|
|
|
|
const/4 v7, 0x0
|
|
|
|
const/16 v16, 0x0
|
|
|
|
const/16 v17, 0x0
|
|
|
|
move-wide/from16 v27, v23
|
|
|
|
move-object/from16 v2, p2
|
|
|
|
move-object/from16 v29, v25
|
|
|
|
move-object v9, v5
|
|
|
|
move v5, v7
|
|
|
|
move-object v7, v6
|
|
|
|
move/from16 v6, v16
|
|
|
|
move/from16 v31, v11
|
|
|
|
move/from16 v30, v12
|
|
|
|
move-object/from16 v32, v13
|
|
|
|
move-object/from16 v11, v26
|
|
|
|
const/4 v13, 0x4
|
|
|
|
move-object v12, v7
|
|
|
|
move/from16 v7, v17
|
|
|
|
invoke-virtual/range {v2 .. v7}, Landroid/widget/RemoteViews;->setTextViewCompoundDrawables(IIIII)V
|
|
|
|
goto :goto_9
|
|
|
|
:cond_10
|
|
move-object v9, v5
|
|
|
|
move/from16 v31, v11
|
|
|
|
move/from16 v30, v12
|
|
|
|
move-object/from16 v32, v13
|
|
|
|
move-wide/from16 v27, v23
|
|
|
|
move-object/from16 v29, v25
|
|
|
|
move-object/from16 v11, v26
|
|
|
|
const/4 v13, 0x4
|
|
|
|
move-object v12, v6
|
|
|
|
.line 679
|
|
sget v3, Lcom/moji/notify/R$id;->tv_curr_city:I
|
|
|
|
const/4 v4, 0x0
|
|
|
|
const/4 v5, 0x0
|
|
|
|
const/4 v6, 0x0
|
|
|
|
const/4 v7, 0x0
|
|
|
|
move-object/from16 v2, p2
|
|
|
|
invoke-virtual/range {v2 .. v7}, Landroid/widget/RemoteViews;->setTextViewCompoundDrawables(IIIII)V
|
|
|
|
goto :goto_9
|
|
|
|
:cond_11
|
|
move-object v9, v5
|
|
|
|
move/from16 v31, v11
|
|
|
|
move/from16 v30, v12
|
|
|
|
move-object/from16 v32, v13
|
|
|
|
move-wide/from16 v27, v23
|
|
|
|
move-object/from16 v29, v25
|
|
|
|
move-object/from16 v11, v26
|
|
|
|
const/4 v13, 0x4
|
|
|
|
move-object v12, v6
|
|
|
|
.line 683
|
|
:goto_9
|
|
sget v2, Lcom/moji/notify/R$id;->tv_curr_tmp_high:I
|
|
|
|
new-instance v3, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
invoke-virtual {v3, v15}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual/range {p0 .. p0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
|
|
|
|
move-result-object v4
|
|
|
|
sget v5, Lcom/moji/notify/R$string;->tempurature_unit_short:I
|
|
|
|
invoke-virtual {v4, v5}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;
|
|
|
|
move-result-object v4
|
|
|
|
invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-virtual {v8, v2, v3}, Landroid/widget/RemoteViews;->setTextViewText(ILjava/lang/CharSequence;)V
|
|
|
|
.line 684
|
|
sget v2, Lcom/moji/notify/R$id;->tv_curr_tmp_low:I
|
|
|
|
new-instance v3, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
invoke-virtual {v3, v11}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual/range {p0 .. p0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
|
|
|
|
move-result-object v4
|
|
|
|
sget v5, Lcom/moji/notify/R$string;->tempurature_unit_short:I
|
|
|
|
invoke-virtual {v4, v5}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;
|
|
|
|
move-result-object v4
|
|
|
|
invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-virtual {v8, v2, v3}, Landroid/widget/RemoteViews;->setTextViewText(ILjava/lang/CharSequence;)V
|
|
|
|
.line 685
|
|
iget-object v2, v1, Lcom/moji/weatherprovider/data/Weather;->mDetail:Lcom/moji/weatherprovider/data/Detail;
|
|
|
|
iget-object v2, v2, Lcom/moji/weatherprovider/data/Detail;->mCondition:Lcom/moji/weatherprovider/data/Condition;
|
|
|
|
iget v2, v2, Lcom/moji/weatherprovider/data/Condition;->mSpecialWeather:I
|
|
|
|
const/4 v3, 0x1
|
|
|
|
if-ne v2, v3, :cond_12
|
|
|
|
const/4 v2, 0x1
|
|
|
|
goto :goto_a
|
|
|
|
:cond_12
|
|
const/4 v2, 0x0
|
|
|
|
:goto_a
|
|
if-eqz v2, :cond_13
|
|
|
|
.line 687
|
|
sget v2, Lcom/moji/notify/R$id;->tv_special_weather:I
|
|
|
|
const/4 v3, 0x0
|
|
|
|
invoke-virtual {v8, v2, v3}, Landroid/widget/RemoteViews;->setViewVisibility(II)V
|
|
|
|
.line 688
|
|
sget v2, Lcom/moji/notify/R$id;->tv_weather_describe:I
|
|
|
|
invoke-virtual {v8, v2, v13}, Landroid/widget/RemoteViews;->setViewVisibility(II)V
|
|
|
|
.line 689
|
|
iget-object v2, v1, Lcom/moji/weatherprovider/data/Weather;->mDetail:Lcom/moji/weatherprovider/data/Detail;
|
|
|
|
iget-object v2, v2, Lcom/moji/weatherprovider/data/Detail;->mCondition:Lcom/moji/weatherprovider/data/Condition;
|
|
|
|
iget-object v2, v2, Lcom/moji/weatherprovider/data/Condition;->mTips:Ljava/lang/String;
|
|
|
|
const-string v4, "\\|\\|"
|
|
|
|
invoke-virtual {v2, v4}, Ljava/lang/String;->split(Ljava/lang/String;)[Ljava/lang/String;
|
|
|
|
move-result-object v2
|
|
|
|
const-string v4, ""
|
|
|
|
.line 691
|
|
aget-object v5, v2, v3
|
|
|
|
invoke-virtual {v4, v5}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result v4
|
|
|
|
if-nez v4, :cond_14
|
|
|
|
.line 692
|
|
sget v4, Lcom/moji/notify/R$id;->tv_special_weather:I
|
|
|
|
aget-object v2, v2, v3
|
|
|
|
invoke-virtual {v8, v4, v2}, Landroid/widget/RemoteViews;->setTextViewText(ILjava/lang/CharSequence;)V
|
|
|
|
goto :goto_b
|
|
|
|
:cond_13
|
|
const/4 v3, 0x0
|
|
|
|
.line 695
|
|
sget v2, Lcom/moji/notify/R$id;->tv_weather_describe:I
|
|
|
|
invoke-virtual {v8, v2, v3}, Landroid/widget/RemoteViews;->setViewVisibility(II)V
|
|
|
|
.line 696
|
|
sget v2, Lcom/moji/notify/R$id;->tv_special_weather:I
|
|
|
|
const/16 v4, 0x8
|
|
|
|
invoke-virtual {v8, v2, v4}, Landroid/widget/RemoteViews;->setViewVisibility(II)V
|
|
|
|
.line 697
|
|
sget v2, Lcom/moji/notify/R$id;->tv_curr_tmp_high:I
|
|
|
|
invoke-virtual {v8, v2, v3}, Landroid/widget/RemoteViews;->setViewVisibility(II)V
|
|
|
|
.line 698
|
|
sget v2, Lcom/moji/notify/R$id;->tv_curr_tmp_low:I
|
|
|
|
invoke-virtual {v8, v2, v3}, Landroid/widget/RemoteViews;->setViewVisibility(II)V
|
|
|
|
.line 701
|
|
:cond_14
|
|
:goto_b
|
|
sget v2, Lcom/moji/notify/R$id;->tv_tmp_publish_time:I
|
|
|
|
invoke-virtual {v8, v2, v10}, Landroid/widget/RemoteViews;->setTextViewText(ILjava/lang/CharSequence;)V
|
|
|
|
.line 705
|
|
sget-object v2, Landroid/os/Build;->MODEL:Ljava/lang/String;
|
|
|
|
const-string v3, "R821T"
|
|
|
|
invoke-virtual {v2, v3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result v2
|
|
|
|
if-eqz v2, :cond_15
|
|
|
|
.line 706
|
|
sget v2, Lcom/moji/notify/R$id;->tv_curr_describe:I
|
|
|
|
sget v3, Lcom/moji/notify/R$color;->notify_title_text_color:I
|
|
|
|
invoke-static {v0, v3}, Landroid/support/v4/content/ContextCompat;->getColor(Landroid/content/Context;I)I
|
|
|
|
move-result v3
|
|
|
|
invoke-virtual {v8, v2, v3}, Landroid/widget/RemoteViews;->setTextColor(II)V
|
|
|
|
.line 707
|
|
sget v2, Lcom/moji/notify/R$id;->tx_air_pollution0:I
|
|
|
|
sget v3, Lcom/moji/notify/R$color;->notify_title_text_color:I
|
|
|
|
invoke-static {v0, v3}, Landroid/support/v4/content/ContextCompat;->getColor(Landroid/content/Context;I)I
|
|
|
|
move-result v3
|
|
|
|
invoke-virtual {v8, v2, v3}, Landroid/widget/RemoteViews;->setTextColor(II)V
|
|
|
|
.line 708
|
|
sget v2, Lcom/moji/notify/R$id;->tx_air_pollution1:I
|
|
|
|
sget v3, Lcom/moji/notify/R$color;->notify_title_text_color:I
|
|
|
|
invoke-static {v0, v3}, Landroid/support/v4/content/ContextCompat;->getColor(Landroid/content/Context;I)I
|
|
|
|
move-result v3
|
|
|
|
invoke-virtual {v8, v2, v3}, Landroid/widget/RemoteViews;->setTextColor(II)V
|
|
|
|
.line 710
|
|
:cond_15
|
|
sget v2, Lcom/moji/notify/R$id;->tv_curr_describe:I
|
|
|
|
invoke-virtual {v8, v2, v14}, Landroid/widget/RemoteViews;->setTextViewText(ILjava/lang/CharSequence;)V
|
|
|
|
.line 711
|
|
sget v2, Lcom/moji/notify/R$id;->tv_weather_describe:I
|
|
|
|
invoke-virtual {v8, v2, v12}, Landroid/widget/RemoteViews;->setTextViewText(ILjava/lang/CharSequence;)V
|
|
|
|
if-eqz v9, :cond_17
|
|
|
|
.line 713
|
|
invoke-virtual {v9}, Ljava/lang/String;->length()I
|
|
|
|
move-result v2
|
|
|
|
if-eqz v2, :cond_17
|
|
|
|
.line 714
|
|
sget v2, Lcom/moji/notify/R$id;->notification_air_level_img:I
|
|
|
|
const/4 v3, 0x0
|
|
|
|
invoke-virtual {v8, v2, v3}, Landroid/widget/RemoteViews;->setViewVisibility(II)V
|
|
|
|
.line 715
|
|
sget v2, Lcom/moji/notify/R$id;->tx_air_pollution2:I
|
|
|
|
const/16 v4, 0x8
|
|
|
|
invoke-virtual {v8, v2, v4}, Landroid/widget/RemoteViews;->setViewVisibility(II)V
|
|
|
|
.line 716
|
|
sget v2, Lcom/moji/notify/R$id;->tx_air_pollution3:I
|
|
|
|
invoke-virtual {v8, v2, v4}, Landroid/widget/RemoteViews;->setViewVisibility(II)V
|
|
|
|
.line 717
|
|
sget v2, Lcom/moji/notify/R$id;->tx_air_pollution0:I
|
|
|
|
invoke-virtual {v8, v2, v3}, Landroid/widget/RemoteViews;->setViewVisibility(II)V
|
|
|
|
.line 718
|
|
sget v2, Lcom/moji/notify/R$id;->tx_air_pollution1:I
|
|
|
|
invoke-virtual {v8, v2, v3}, Landroid/widget/RemoteViews;->setViewVisibility(II)V
|
|
|
|
.line 719
|
|
sget v2, Lcom/moji/notify/R$id;->tx_air_pollution1:I
|
|
|
|
move-object/from16 v4, v32
|
|
|
|
invoke-virtual {v8, v2, v4}, Landroid/widget/RemoteViews;->setTextViewText(ILjava/lang/CharSequence;)V
|
|
|
|
.line 721
|
|
invoke-static {}, Lcom/moji/notify/NotifyService;->b()Z
|
|
|
|
move-result v2
|
|
|
|
if-eqz v2, :cond_16
|
|
|
|
invoke-virtual {v9}, Ljava/lang/String;->length()I
|
|
|
|
move-result v2
|
|
|
|
const/4 v4, 0x2
|
|
|
|
if-le v2, v4, :cond_16
|
|
|
|
.line 722
|
|
invoke-virtual {v9, v3, v4}, Ljava/lang/String;->substring(II)Ljava/lang/String;
|
|
|
|
move-result-object v5
|
|
|
|
goto :goto_c
|
|
|
|
:cond_16
|
|
move-object v5, v9
|
|
|
|
:goto_c
|
|
const-string v2, "NotifyService"
|
|
|
|
.line 725
|
|
new-instance v3, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
invoke-virtual {v3, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
const-string v4, "...."
|
|
|
|
invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
move/from16 v4, v31
|
|
|
|
invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-static {v2, v3}, Lcom/moji/tool/log/MJLogger;->b(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
.line 726
|
|
sget v2, Lcom/moji/notify/R$id;->notification_air_level_img:I
|
|
|
|
invoke-static {v4}, Lcom/moji/base/AqiValueProvider;->c(I)I
|
|
|
|
move-result v3
|
|
|
|
invoke-virtual {v8, v2, v3}, Landroid/widget/RemoteViews;->setImageViewResource(II)V
|
|
|
|
.line 727
|
|
sget v2, Lcom/moji/notify/R$id;->tx_air_pollution0:I
|
|
|
|
invoke-virtual {v8, v2, v5}, Landroid/widget/RemoteViews;->setTextViewText(ILjava/lang/CharSequence;)V
|
|
|
|
goto :goto_d
|
|
|
|
.line 729
|
|
:cond_17
|
|
sget v2, Lcom/moji/notify/R$id;->notification_air_level_img:I
|
|
|
|
invoke-virtual {v8, v2, v13}, Landroid/widget/RemoteViews;->setViewVisibility(II)V
|
|
|
|
.line 730
|
|
sget v2, Lcom/moji/notify/R$id;->tx_air_pollution2:I
|
|
|
|
const/4 v3, 0x0
|
|
|
|
invoke-virtual {v8, v2, v3}, Landroid/widget/RemoteViews;->setViewVisibility(II)V
|
|
|
|
.line 731
|
|
sget v2, Lcom/moji/notify/R$id;->tx_air_pollution3:I
|
|
|
|
invoke-virtual {v8, v2, v3}, Landroid/widget/RemoteViews;->setViewVisibility(II)V
|
|
|
|
.line 732
|
|
sget v2, Lcom/moji/notify/R$id;->tx_air_pollution0:I
|
|
|
|
const/16 v3, 0x8
|
|
|
|
invoke-virtual {v8, v2, v3}, Landroid/widget/RemoteViews;->setViewVisibility(II)V
|
|
|
|
.line 733
|
|
sget v2, Lcom/moji/notify/R$id;->tx_air_pollution1:I
|
|
|
|
invoke-virtual {v8, v2, v3}, Landroid/widget/RemoteViews;->setViewVisibility(II)V
|
|
|
|
move-object/from16 v2, v29
|
|
|
|
if-eqz v2, :cond_18
|
|
|
|
.line 734
|
|
invoke-virtual {v2}, Ljava/lang/String;->length()I
|
|
|
|
move-result v3
|
|
|
|
if-eqz v3, :cond_18
|
|
|
|
.line 735
|
|
sget v3, Lcom/moji/notify/R$id;->tx_air_pollution2:I
|
|
|
|
invoke-virtual {v8, v3, v2}, Landroid/widget/RemoteViews;->setTextViewText(ILjava/lang/CharSequence;)V
|
|
|
|
.line 738
|
|
:cond_18
|
|
sget v2, Lcom/moji/notify/R$id;->tx_air_pollution3:I
|
|
|
|
.line 739
|
|
invoke-static/range {v30 .. v30}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;
|
|
|
|
move-result-object v3
|
|
|
|
move-wide/from16 v4, v27
|
|
|
|
invoke-static {v3, v4, v5}, Lcom/moji/preferences/units/UNIT_SPEED;->getWindDescription(Ljava/lang/String;D)Ljava/lang/String;
|
|
|
|
move-result-object v3
|
|
|
|
.line 738
|
|
invoke-virtual {v8, v2, v3}, Landroid/widget/RemoteViews;->setTextViewText(ILjava/lang/CharSequence;)V
|
|
|
|
:goto_d
|
|
move/from16 v2, p3
|
|
|
|
const/16 v3, 0xd
|
|
|
|
if-eq v3, v2, :cond_19
|
|
|
|
const/16 v3, 0xb
|
|
|
|
if-ne v3, v2, :cond_1c
|
|
|
|
.line 743
|
|
:cond_19
|
|
invoke-virtual/range {p1 .. p1}, Lcom/moji/weatherprovider/data/Weather;->isLocation()Z
|
|
|
|
move-result v2
|
|
|
|
if-eqz v2, :cond_1a
|
|
|
|
sget-object v2, Lcom/moji/notify/NotifyService;->b:[Ljava/lang/String;
|
|
|
|
invoke-static {v0, v2}, Lcom/moji/tool/permission/EasyPermissions;->a(Landroid/content/Context;[Ljava/lang/String;)Z
|
|
|
|
move-result v2
|
|
|
|
if-nez v2, :cond_1a
|
|
|
|
.line 745
|
|
sget v1, Lcom/moji/notify/R$id;->ll_short_detail:I
|
|
|
|
const/4 v2, 0x0
|
|
|
|
invoke-virtual {v8, v1, v2}, Landroid/widget/RemoteViews;->setViewVisibility(II)V
|
|
|
|
.line 746
|
|
sget v1, Lcom/moji/notify/R$id;->tv_short_describe:I
|
|
|
|
sget v3, Lcom/moji/notify/R$string;->notify_no_location_perm:I
|
|
|
|
invoke-virtual {v0, v3}, Landroid/content/Context;->getString(I)Ljava/lang/String;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-virtual {v8, v1, v3}, Landroid/widget/RemoteViews;->setTextViewText(ILjava/lang/CharSequence;)V
|
|
|
|
const/4 v3, 0x1
|
|
|
|
.line 747
|
|
new-array v1, v3, [I
|
|
|
|
sget v4, Lcom/moji/notify/R$id;->tv_short_describe:I
|
|
|
|
aput v4, v1, v2
|
|
|
|
invoke-static {v0, v8, v1}, Lcom/moji/notify/NotifyService;->a(Landroid/content/Context;Landroid/widget/RemoteViews;[I)V
|
|
|
|
.line 748
|
|
sput-boolean v3, Lcom/moji/notify/NotifyService;->k:Z
|
|
|
|
goto :goto_e
|
|
|
|
:cond_1a
|
|
const/4 v3, 0x1
|
|
|
|
.line 751
|
|
iget-object v2, v1, Lcom/moji/weatherprovider/data/Weather;->mDetail:Lcom/moji/weatherprovider/data/Detail;
|
|
|
|
iget-object v2, v2, Lcom/moji/weatherprovider/data/Detail;->mShortData:Lcom/moji/http/sfc/forecast/ShortDataResp$RadarData;
|
|
|
|
if-eqz v2, :cond_1b
|
|
|
|
.line 753
|
|
iget v4, v2, Lcom/moji/http/sfc/forecast/ShortDataResp$RadarData;->rain:I
|
|
|
|
if-ne v3, v4, :cond_1b
|
|
|
|
iget-object v3, v2, Lcom/moji/http/sfc/forecast/ShortDataResp$RadarData;->content:Ljava/lang/String;
|
|
|
|
invoke-static {v3}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
|
|
|
|
move-result v3
|
|
|
|
if-nez v3, :cond_1b
|
|
|
|
.line 754
|
|
invoke-static {}, Ljava/lang/System;->currentTimeMillis()J
|
|
|
|
move-result-wide v3
|
|
|
|
iget-object v1, v1, Lcom/moji/weatherprovider/data/Weather;->mDetail:Lcom/moji/weatherprovider/data/Detail;
|
|
|
|
iget-object v1, v1, Lcom/moji/weatherprovider/data/Detail;->mShortData:Lcom/moji/http/sfc/forecast/ShortDataResp$RadarData;
|
|
|
|
iget-wide v5, v1, Lcom/moji/http/sfc/forecast/ShortDataResp$RadarData;->timestamp:J
|
|
|
|
sub-long/2addr v3, v5
|
|
|
|
cmp-long v1, v3, v18
|
|
|
|
if-gez v1, :cond_1b
|
|
|
|
new-instance v1, Lcom/moji/preferences/ProcessPrefer;
|
|
|
|
invoke-direct {v1}, Lcom/moji/preferences/ProcessPrefer;-><init>()V
|
|
|
|
.line 755
|
|
invoke-virtual {v1}, Lcom/moji/preferences/ProcessPrefer;->u()Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_1b
|
|
|
|
.line 756
|
|
sget v1, Lcom/moji/notify/R$id;->ll_short_detail:I
|
|
|
|
const/4 v3, 0x0
|
|
|
|
invoke-virtual {v8, v1, v3}, Landroid/widget/RemoteViews;->setViewVisibility(II)V
|
|
|
|
.line 757
|
|
sget v1, Lcom/moji/notify/R$id;->tv_short_describe:I
|
|
|
|
iget-object v2, v2, Lcom/moji/http/sfc/forecast/ShortDataResp$RadarData;->content:Ljava/lang/String;
|
|
|
|
invoke-virtual {v8, v1, v2}, Landroid/widget/RemoteViews;->setTextViewText(ILjava/lang/CharSequence;)V
|
|
|
|
const/4 v1, 0x1
|
|
|
|
.line 758
|
|
new-array v2, v1, [I
|
|
|
|
sget v4, Lcom/moji/notify/R$id;->tv_short_describe:I
|
|
|
|
aput v4, v2, v3
|
|
|
|
invoke-static {v0, v8, v2}, Lcom/moji/notify/NotifyService;->a(Landroid/content/Context;Landroid/widget/RemoteViews;[I)V
|
|
|
|
.line 759
|
|
sput-boolean v1, Lcom/moji/notify/NotifyService;->k:Z
|
|
|
|
goto :goto_e
|
|
|
|
:cond_1b
|
|
const/4 v3, 0x0
|
|
|
|
.line 761
|
|
sget v1, Lcom/moji/notify/R$id;->ll_short_detail:I
|
|
|
|
const/16 v2, 0x8
|
|
|
|
invoke-virtual {v8, v1, v2}, Landroid/widget/RemoteViews;->setViewVisibility(II)V
|
|
|
|
.line 762
|
|
sput-boolean v3, Lcom/moji/notify/NotifyService;->k:Z
|
|
|
|
:cond_1c
|
|
:goto_e
|
|
move-object v3, v8
|
|
|
|
goto :goto_13
|
|
|
|
.line 546
|
|
:cond_1d
|
|
:goto_f
|
|
new-instance v1, Lcom/moji/base/WeatherDrawable;
|
|
|
|
const/16 v2, 0x2c
|
|
|
|
invoke-direct {v1, v2}, Lcom/moji/base/WeatherDrawable;-><init>(I)V
|
|
|
|
const/4 v2, 0x1
|
|
|
|
.line 547
|
|
invoke-virtual {v1, v2}, Lcom/moji/base/WeatherDrawable;->a(Z)I
|
|
|
|
move-result v1
|
|
|
|
.line 549
|
|
sget v2, Lcom/moji/notify/R$layout;->notification_no_data1:I
|
|
|
|
.line 551
|
|
sget-boolean v3, Lcom/moji/notify/NotifyService;->d:Z
|
|
|
|
if-eqz v3, :cond_1e
|
|
|
|
.line 552
|
|
sget v2, Lcom/moji/notify/R$layout;->notification_no_data_special:I
|
|
|
|
.line 555
|
|
:cond_1e
|
|
sget-boolean v3, Lcom/moji/notify/NotifyService;->g:Z
|
|
|
|
if-eqz v3, :cond_1f
|
|
|
|
.line 556
|
|
sget v2, Lcom/moji/notify/R$layout;->notification_no_data1_emui4:I
|
|
|
|
.line 558
|
|
:cond_1f
|
|
new-instance v3, Landroid/widget/RemoteViews;
|
|
|
|
invoke-virtual/range {p0 .. p0}, Landroid/content/Context;->getPackageName()Ljava/lang/String;
|
|
|
|
move-result-object v4
|
|
|
|
invoke-direct {v3, v4, v2}, Landroid/widget/RemoteViews;-><init>(Ljava/lang/String;I)V
|
|
|
|
.line 559
|
|
invoke-static {}, Lcom/moji/notify/NotifyService;->c()Z
|
|
|
|
move-result v2
|
|
|
|
if-nez v2, :cond_21
|
|
|
|
sget-boolean v2, Lcom/moji/notify/NotifyService;->c:Z
|
|
|
|
if-eqz v2, :cond_20
|
|
|
|
goto :goto_11
|
|
|
|
:cond_20
|
|
:goto_10
|
|
const/4 v2, 0x3
|
|
|
|
goto :goto_12
|
|
|
|
.line 560
|
|
:cond_21
|
|
:goto_11
|
|
sget v2, Lcom/moji/notify/R$id;->iv_no_data_icon_bg:I
|
|
|
|
sget v4, Lcom/moji/notify/R$drawable;->notif_icon_bg_transparent:I
|
|
|
|
invoke-virtual {v3, v2, v4}, Landroid/widget/RemoteViews;->setImageViewResource(II)V
|
|
|
|
goto :goto_10
|
|
|
|
.line 562
|
|
:goto_12
|
|
new-array v2, v2, [I
|
|
|
|
sget v4, Lcom/moji/notify/R$id;->tv_no_data_city_name:I
|
|
|
|
const/4 v5, 0x0
|
|
|
|
aput v4, v2, v5
|
|
|
|
sget v4, Lcom/moji/notify/R$id;->tv_update_state_str:I
|
|
|
|
const/4 v5, 0x1
|
|
|
|
aput v4, v2, v5
|
|
|
|
sget v4, Lcom/moji/notify/R$id;->tv_no_net_update:I
|
|
|
|
const/4 v5, 0x2
|
|
|
|
aput v4, v2, v5
|
|
|
|
invoke-static {v0, v3, v2}, Lcom/moji/notify/NotifyService;->a(Landroid/content/Context;Landroid/widget/RemoteViews;[I)V
|
|
|
|
.line 564
|
|
sget v2, Lcom/moji/notify/R$id;->iv_no_data_icon:I
|
|
|
|
invoke-virtual {v3, v2, v1}, Landroid/widget/RemoteViews;->setImageViewResource(II)V
|
|
|
|
.line 565
|
|
sget v1, Lcom/moji/notify/R$id;->tv_no_data_city_name:I
|
|
|
|
const/16 v2, 0x8
|
|
|
|
invoke-virtual {v3, v1, v2}, Landroid/widget/RemoteViews;->setViewVisibility(II)V
|
|
|
|
.line 566
|
|
sget v1, Lcom/moji/notify/R$id;->tv_update_state_str:I
|
|
|
|
invoke-virtual/range {p0 .. p0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
|
|
|
|
move-result-object v2
|
|
|
|
sget v4, Lcom/moji/notify/R$string;->weather_updating:I
|
|
|
|
invoke-virtual {v2, v4}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v3, v1, v2}, Landroid/widget/RemoteViews;->setTextViewText(ILjava/lang/CharSequence;)V
|
|
|
|
.line 767
|
|
:goto_13
|
|
sget-boolean v1, Lcom/moji/notify/NotifyService;->i:Z
|
|
|
|
if-eqz v1, :cond_25
|
|
|
|
.line 769
|
|
sget v1, Lcom/moji/notify/R$layout;->notification_no_city:I
|
|
|
|
.line 771
|
|
sget-boolean v2, Lcom/moji/notify/NotifyService;->d:Z
|
|
|
|
if-eqz v2, :cond_22
|
|
|
|
.line 772
|
|
sget v1, Lcom/moji/notify/R$layout;->notification_no_city_special:I
|
|
|
|
.line 774
|
|
:cond_22
|
|
sget-boolean v2, Lcom/moji/notify/NotifyService;->g:Z
|
|
|
|
if-eqz v2, :cond_23
|
|
|
|
.line 775
|
|
sget v1, Lcom/moji/notify/R$layout;->notification_no_city1_emui4:I
|
|
|
|
.line 778
|
|
:cond_23
|
|
new-instance v3, Landroid/widget/RemoteViews;
|
|
|
|
invoke-virtual/range {p0 .. p0}, Landroid/content/Context;->getPackageName()Ljava/lang/String;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-direct {v3, v2, v1}, Landroid/widget/RemoteViews;-><init>(Ljava/lang/String;I)V
|
|
|
|
const/4 v1, 0x1
|
|
|
|
.line 779
|
|
new-array v1, v1, [I
|
|
|
|
sget v2, Lcom/moji/notify/R$id;->tv_no_city:I
|
|
|
|
const/4 v4, 0x0
|
|
|
|
aput v2, v1, v4
|
|
|
|
invoke-static {v0, v3, v1}, Lcom/moji/notify/NotifyService;->a(Landroid/content/Context;Landroid/widget/RemoteViews;[I)V
|
|
|
|
.line 780
|
|
invoke-static {}, Lcom/moji/notify/NotifyService;->c()Z
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_24
|
|
|
|
sget-boolean v0, Lcom/moji/notify/NotifyService;->c:Z
|
|
|
|
if-eqz v0, :cond_25
|
|
|
|
.line 781
|
|
:cond_24
|
|
sget v0, Lcom/moji/notify/R$id;->iv_no_city_icon_bg:I
|
|
|
|
sget v1, Lcom/moji/notify/R$drawable;->notif_icon_bg_transparent:I
|
|
|
|
invoke-virtual {v3, v0, v1}, Landroid/widget/RemoteViews;->setImageViewResource(II)V
|
|
|
|
:cond_25
|
|
return-object v3
|
|
.end method
|
|
|
|
.method public static a(JLjava/util/TimeZone;)Ljava/lang/String;
|
|
.locals 3
|
|
|
|
const-wide/16 v0, 0x0
|
|
|
|
cmp-long v2, p0, v0
|
|
|
|
if-gtz v2, :cond_0
|
|
|
|
const-string p0, ""
|
|
|
|
return-object p0
|
|
|
|
.line 948
|
|
:cond_0
|
|
invoke-static {}, Ljava/util/Calendar;->getInstance()Ljava/util/Calendar;
|
|
|
|
move-result-object v0
|
|
|
|
.line 949
|
|
invoke-virtual {v0, p0, p1}, Ljava/util/Calendar;->setTimeInMillis(J)V
|
|
|
|
.line 950
|
|
invoke-virtual {v0, p2}, Ljava/util/Calendar;->setTimeZone(Ljava/util/TimeZone;)V
|
|
|
|
.line 951
|
|
new-instance p0, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {p0}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const/16 p1, 0xb
|
|
|
|
invoke-virtual {v0, p1}, Ljava/util/Calendar;->get(I)I
|
|
|
|
move-result p1
|
|
|
|
invoke-virtual {p0, p1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
|
|
|
|
const-string p1, ":"
|
|
|
|
invoke-virtual {p0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
const/16 p1, 0xc
|
|
|
|
invoke-virtual {v0, p1}, Ljava/util/Calendar;->get(I)I
|
|
|
|
move-result p1
|
|
|
|
invoke-virtual {p0, p1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {p0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static a(Landroid/content/Context;JLjava/util/TimeZone;)Ljava/lang/String;
|
|
.locals 19
|
|
|
|
move-wide/from16 v1, p1
|
|
|
|
move-object/from16 v3, p3
|
|
|
|
if-eqz p0, :cond_7
|
|
|
|
const-wide/16 v4, 0x0
|
|
|
|
cmp-long v6, v1, v4
|
|
|
|
if-gtz v6, :cond_0
|
|
|
|
goto/16 :goto_0
|
|
|
|
.line 903
|
|
:cond_0
|
|
:try_start_0
|
|
invoke-static {}, Ljava/util/Calendar;->getInstance()Ljava/util/Calendar;
|
|
|
|
move-result-object v4
|
|
|
|
.line 904
|
|
invoke-virtual {v4, v3}, Ljava/util/Calendar;->setTimeZone(Ljava/util/TimeZone;)V
|
|
|
|
.line 905
|
|
invoke-virtual {v4}, Ljava/util/Calendar;->getTimeInMillis()J
|
|
|
|
move-result-wide v5
|
|
|
|
.line 906
|
|
invoke-static {}, Ljava/util/Calendar;->getInstance()Ljava/util/Calendar;
|
|
|
|
move-result-object v7
|
|
|
|
.line 907
|
|
invoke-virtual {v7, v1, v2}, Ljava/util/Calendar;->setTimeInMillis(J)V
|
|
|
|
.line 908
|
|
invoke-virtual {v7, v3}, Ljava/util/Calendar;->setTimeZone(Ljava/util/TimeZone;)V
|
|
|
|
.line 909
|
|
invoke-virtual {v7}, Ljava/util/Calendar;->getTimeInMillis()J
|
|
|
|
move-result-wide v8
|
|
|
|
const/4 v10, 0x0
|
|
|
|
sub-long v8, v5, v8
|
|
|
|
const/4 v10, 0x6
|
|
|
|
.line 911
|
|
invoke-virtual {v4, v10}, Ljava/util/Calendar;->get(I)I
|
|
|
|
move-result v4
|
|
|
|
.line 912
|
|
invoke-virtual {v7, v10}, Ljava/util/Calendar;->get(I)I
|
|
|
|
move-result v11
|
|
|
|
.line 914
|
|
invoke-static {}, Ljava/util/Calendar;->getInstance()Ljava/util/Calendar;
|
|
|
|
move-result-object v12
|
|
|
|
const-wide/32 v13, 0x5265c00
|
|
|
|
move/from16 v16, v11
|
|
|
|
sub-long v10, v5, v13
|
|
|
|
.line 915
|
|
invoke-virtual {v12, v10, v11}, Ljava/util/Calendar;->setTimeInMillis(J)V
|
|
|
|
const/4 v10, 0x6
|
|
|
|
.line 916
|
|
invoke-virtual {v12, v10}, Ljava/util/Calendar;->get(I)I
|
|
|
|
move-result v10
|
|
|
|
cmp-long v11, v1, v5
|
|
|
|
if-ltz v11, :cond_1
|
|
|
|
.line 919
|
|
invoke-virtual/range {p0 .. p0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
|
|
|
|
move-result-object v0
|
|
|
|
sget v4, Lcom/moji/notify/R$string;->ago_publish_just:I
|
|
|
|
invoke-virtual {v0, v4}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
|
|
.line 920
|
|
:cond_1
|
|
invoke-static {v8, v9}, Ljava/lang/Math;->abs(J)J
|
|
|
|
move-result-wide v5
|
|
|
|
const-wide/32 v11, 0xea60
|
|
|
|
cmp-long v15, v5, v11
|
|
|
|
if-gez v15, :cond_2
|
|
|
|
.line 921
|
|
invoke-virtual/range {p0 .. p0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
|
|
|
|
move-result-object v0
|
|
|
|
sget v4, Lcom/moji/notify/R$string;->ago_publish_just:I
|
|
|
|
invoke-virtual {v0, v4}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
|
|
.line 922
|
|
:cond_2
|
|
invoke-static {v8, v9}, Ljava/lang/Math;->abs(J)J
|
|
|
|
move-result-wide v5
|
|
|
|
const-wide/32 v17, 0x36ee80
|
|
|
|
cmp-long v15, v5, v17
|
|
|
|
if-gez v15, :cond_3
|
|
|
|
.line 923
|
|
div-long/2addr v8, v11
|
|
|
|
.line 924
|
|
new-instance v4, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v4}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
invoke-virtual {v4, v8, v9}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual/range {p0 .. p0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
|
|
|
|
move-result-object v0
|
|
|
|
sget v5, Lcom/moji/notify/R$string;->short_minute_ago_msg:I
|
|
|
|
invoke-virtual {v0, v5}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v4, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
|
|
:cond_3
|
|
const/16 v5, 0xc
|
|
|
|
const/16 v6, 0xb
|
|
|
|
move/from16 v11, v16
|
|
|
|
if-ne v4, v11, :cond_4
|
|
|
|
.line 926
|
|
new-instance v4, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v4}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
invoke-virtual/range {p0 .. p0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
|
|
|
|
move-result-object v0
|
|
|
|
sget v8, Lcom/moji/notify/R$string;->today:I
|
|
|
|
invoke-virtual {v0, v8}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v4, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
const-string v0, " "
|
|
|
|
invoke-virtual {v4, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v7, v6}, Ljava/util/Calendar;->get(I)I
|
|
|
|
move-result v0
|
|
|
|
invoke-virtual {v4, v0}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
|
|
|
|
const-string v0, ":"
|
|
|
|
invoke-virtual {v4, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v7, v5}, Ljava/util/Calendar;->get(I)I
|
|
|
|
move-result v0
|
|
|
|
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
|
|
|
|
return-object v0
|
|
|
|
:cond_4
|
|
if-ne v4, v10, :cond_5
|
|
|
|
.line 928
|
|
new-instance v4, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v4}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
invoke-virtual/range {p0 .. p0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
|
|
|
|
move-result-object v0
|
|
|
|
sget v8, Lcom/moji/notify/R$string;->yesterday:I
|
|
|
|
invoke-virtual {v0, v8}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v4, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
const-string v0, " "
|
|
|
|
invoke-virtual {v4, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v7, v6}, Ljava/util/Calendar;->get(I)I
|
|
|
|
move-result v0
|
|
|
|
invoke-virtual {v4, v0}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
|
|
|
|
const-string v0, ":"
|
|
|
|
invoke-virtual {v4, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v7, v5}, Ljava/util/Calendar;->get(I)I
|
|
|
|
move-result v0
|
|
|
|
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
|
|
|
|
return-object v0
|
|
|
|
.line 929
|
|
:cond_5
|
|
invoke-static {v8, v9}, Ljava/lang/Math;->abs(J)J
|
|
|
|
move-result-wide v4
|
|
|
|
const-wide/32 v6, 0x19bfcc00
|
|
|
|
cmp-long v10, v4, v6
|
|
|
|
if-gez v10, :cond_6
|
|
|
|
.line 930
|
|
invoke-virtual/range {p0 .. p0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
|
|
|
|
move-result-object v0
|
|
|
|
sget v4, Lcom/moji/notify/R$string;->ago_days:I
|
|
|
|
invoke-virtual {v0, v4}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
const/4 v4, 0x1
|
|
|
|
new-array v4, v4, [Ljava/lang/Object;
|
|
|
|
const/4 v5, 0x0
|
|
|
|
div-long/2addr v8, v13
|
|
|
|
invoke-static {v8, v9}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v6
|
|
|
|
aput-object v6, v4, v5
|
|
|
|
invoke-static {v0, v4}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
|
|
.line 932
|
|
:cond_6
|
|
invoke-virtual/range {p0 .. p0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
|
|
|
|
move-result-object v0
|
|
|
|
sget v4, Lcom/moji/notify/R$string;->ago_publish_out:I
|
|
|
|
invoke-virtual {v0, v4}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
:try_end_0
|
|
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
return-object v0
|
|
|
|
:catch_0
|
|
move-exception v0
|
|
|
|
const-string v4, "NotifyService"
|
|
|
|
.line 936
|
|
invoke-static {v4, v0}, Lcom/moji/tool/log/MJLogger;->a(Ljava/lang/String;Ljava/lang/Throwable;)V
|
|
|
|
.line 939
|
|
new-instance v0, Ljava/text/SimpleDateFormat;
|
|
|
|
const-string v4, "yyyy\u5e74MM\u6708dd\u65e5 HH:mm"
|
|
|
|
invoke-static {}, Ljava/util/Locale;->getDefault()Ljava/util/Locale;
|
|
|
|
move-result-object v5
|
|
|
|
invoke-direct {v0, v4, v5}, Ljava/text/SimpleDateFormat;-><init>(Ljava/lang/String;Ljava/util/Locale;)V
|
|
|
|
.line 940
|
|
invoke-virtual {v0, v3}, Ljava/text/SimpleDateFormat;->setTimeZone(Ljava/util/TimeZone;)V
|
|
|
|
.line 941
|
|
new-instance v3, Ljava/util/Date;
|
|
|
|
invoke-direct {v3, v1, v2}, Ljava/util/Date;-><init>(J)V
|
|
|
|
invoke-virtual {v0, v3}, Ljava/text/SimpleDateFormat;->format(Ljava/util/Date;)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
|
|
:cond_7
|
|
:goto_0
|
|
const-string v0, ""
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public static a(Landroid/content/Context;Lcom/moji/weatherprovider/data/ForecastDayList$ForecastDay;Lcom/moji/weatherprovider/data/Weather;)Ljava/lang/String;
|
|
.locals 3
|
|
|
|
if-eqz p0, :cond_1
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
if-eqz p2, :cond_1
|
|
|
|
.line 511
|
|
iget-object v0, p2, Lcom/moji/weatherprovider/data/Weather;->mDetail:Lcom/moji/weatherprovider/data/Detail;
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
.line 514
|
|
:cond_0
|
|
invoke-virtual {p0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
|
|
|
|
move-result-object p0
|
|
|
|
sget v0, Lcom/moji/notify/R$array;->week_array:I
|
|
|
|
invoke-virtual {p0, v0}, Landroid/content/res/Resources;->getStringArray(I)[Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
.line 515
|
|
invoke-static {}, Ljava/util/Calendar;->getInstance()Ljava/util/Calendar;
|
|
|
|
move-result-object v0
|
|
|
|
.line 516
|
|
iget-wide v1, p1, Lcom/moji/weatherprovider/data/ForecastDayList$ForecastDay;->mPredictDate:J
|
|
|
|
invoke-virtual {v0, v1, v2}, Ljava/util/Calendar;->setTimeInMillis(J)V
|
|
|
|
.line 517
|
|
iget-object p1, p2, Lcom/moji/weatherprovider/data/Weather;->mDetail:Lcom/moji/weatherprovider/data/Detail;
|
|
|
|
invoke-virtual {p1}, Lcom/moji/weatherprovider/data/Detail;->getTimeZone()Ljava/util/TimeZone;
|
|
|
|
move-result-object p1
|
|
|
|
.line 518
|
|
invoke-virtual {v0, p1}, Ljava/util/Calendar;->setTimeZone(Ljava/util/TimeZone;)V
|
|
|
|
const/4 p1, 0x7
|
|
|
|
.line 519
|
|
invoke-virtual {v0, p1}, Ljava/util/Calendar;->get(I)I
|
|
|
|
move-result p1
|
|
|
|
add-int/lit8 p1, p1, -0x1
|
|
|
|
.line 520
|
|
aget-object p0, p0, p1
|
|
|
|
return-object p0
|
|
|
|
:cond_1
|
|
:goto_0
|
|
const-string p0, ""
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static a(Landroid/content/Context;)V
|
|
.locals 1
|
|
|
|
if-nez p0, :cond_0
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
const-string v0, "notification"
|
|
|
|
.line 137
|
|
invoke-virtual {p0, v0}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
|
|
|
|
move-result-object p0
|
|
|
|
check-cast p0, Landroid/app/NotificationManager;
|
|
|
|
const/16 v0, 0x3eb
|
|
|
|
.line 138
|
|
invoke-virtual {p0, v0}, Landroid/app/NotificationManager;->cancel(I)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private static varargs a(Landroid/content/Context;Landroid/widget/RemoteViews;[I)V
|
|
.locals 5
|
|
|
|
.line 811
|
|
invoke-static {p0}, Lcom/moji/notify/NotifyService;->e(Landroid/content/Context;)I
|
|
|
|
move-result v0
|
|
|
|
.line 812
|
|
invoke-static {p0}, Lcom/moji/notify/NotifyService;->f(Landroid/content/Context;)I
|
|
|
|
move-result v1
|
|
|
|
const/4 v2, 0x0
|
|
|
|
if-nez v0, :cond_1
|
|
|
|
.line 814
|
|
sget-boolean v0, Lcom/moji/notify/NotifyService;->j:Z
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 815
|
|
sput-boolean v2, Lcom/moji/notify/NotifyService;->j:Z
|
|
|
|
.line 816
|
|
invoke-static {p0}, Lcom/moji/notify/NotifyService;->a(Landroid/content/Context;)V
|
|
|
|
.line 817
|
|
invoke-static {p0}, Lcom/moji/notify/NotifyService;->startNotify(Landroid/content/Context;)V
|
|
|
|
goto :goto_4
|
|
|
|
.line 818
|
|
:cond_0
|
|
invoke-static {}, Lcom/moji/notify/NotifyService;->g()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_2
|
|
|
|
if-eqz p1, :cond_2
|
|
|
|
const/4 v0, 0x4
|
|
|
|
.line 819
|
|
invoke-static {p0, v0}, Lcom/moji/notify/NotifyService;->b(Landroid/content/Context;I)I
|
|
|
|
move-result p0
|
|
|
|
.line 820
|
|
array-length v0, p2
|
|
|
|
:goto_0
|
|
if-ge v2, v0, :cond_2
|
|
|
|
aget v3, p2, v2
|
|
|
|
.line 822
|
|
:try_start_0
|
|
invoke-virtual {p1, v3, p0}, Landroid/widget/RemoteViews;->setTextColor(II)V
|
|
:try_end_0
|
|
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
goto :goto_1
|
|
|
|
:catch_0
|
|
move-exception v3
|
|
|
|
const-string v4, "NotifyService"
|
|
|
|
.line 824
|
|
invoke-static {v4, v3}, Lcom/moji/tool/log/MJLogger;->a(Ljava/lang/String;Ljava/lang/Throwable;)V
|
|
|
|
:goto_1
|
|
add-int/lit8 v2, v2, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
if-eqz p1, :cond_2
|
|
|
|
.line 829
|
|
invoke-static {p0, v0}, Lcom/moji/notify/NotifyService;->b(Landroid/content/Context;I)I
|
|
|
|
move-result p0
|
|
|
|
.line 830
|
|
array-length v0, p2
|
|
|
|
:goto_2
|
|
if-ge v2, v0, :cond_2
|
|
|
|
aget v3, p2, v2
|
|
|
|
.line 832
|
|
:try_start_1
|
|
invoke-virtual {p1, v3, p0}, Landroid/widget/RemoteViews;->setTextColor(II)V
|
|
:try_end_1
|
|
.catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_1
|
|
|
|
goto :goto_3
|
|
|
|
:catch_1
|
|
move-exception v3
|
|
|
|
const-string v4, "NotifyService"
|
|
|
|
.line 834
|
|
invoke-static {v4, v3}, Lcom/moji/tool/log/MJLogger;->a(Ljava/lang/String;Ljava/lang/Throwable;)V
|
|
|
|
:goto_3
|
|
add-int/lit8 v2, v2, 0x1
|
|
|
|
goto :goto_2
|
|
|
|
:cond_2
|
|
:goto_4
|
|
if-eqz p1, :cond_5
|
|
|
|
if-nez v1, :cond_3
|
|
|
|
.line 840
|
|
sget p0, Lcom/moji/notify/R$id;->iv_bakcground:I
|
|
|
|
const-string p2, "setBackgroundResource"
|
|
|
|
const v0, 0x106000d
|
|
|
|
invoke-virtual {p1, p0, p2, v0}, Landroid/widget/RemoteViews;->setInt(ILjava/lang/String;I)V
|
|
|
|
.line 841
|
|
sget p0, Lcom/moji/notify/R$id;->iv_bakcground_bottom:I
|
|
|
|
const-string p2, "setBackgroundResource"
|
|
|
|
invoke-virtual {p1, p0, p2, v0}, Landroid/widget/RemoteViews;->setInt(ILjava/lang/String;I)V
|
|
|
|
.line 842
|
|
sget p0, Lcom/moji/notify/R$id;->ll_short_detail:I
|
|
|
|
const-string p2, "setBackgroundResource"
|
|
|
|
invoke-virtual {p1, p0, p2, v0}, Landroid/widget/RemoteViews;->setInt(ILjava/lang/String;I)V
|
|
|
|
goto :goto_5
|
|
|
|
:cond_3
|
|
const/4 p0, 0x1
|
|
|
|
if-ne v1, p0, :cond_4
|
|
|
|
.line 844
|
|
sget p0, Lcom/moji/notify/R$id;->iv_bakcground:I
|
|
|
|
const-string p2, "setBackgroundResource"
|
|
|
|
sget v0, Lcom/moji/notify/R$color;->notify_back_color_gray_top:I
|
|
|
|
invoke-virtual {p1, p0, p2, v0}, Landroid/widget/RemoteViews;->setInt(ILjava/lang/String;I)V
|
|
|
|
.line 845
|
|
sget p0, Lcom/moji/notify/R$id;->iv_bakcground_bottom:I
|
|
|
|
const-string p2, "setBackgroundResource"
|
|
|
|
sget v0, Lcom/moji/notify/R$color;->notify_back_color_gray_top:I
|
|
|
|
invoke-virtual {p1, p0, p2, v0}, Landroid/widget/RemoteViews;->setInt(ILjava/lang/String;I)V
|
|
|
|
.line 846
|
|
sget p0, Lcom/moji/notify/R$id;->ll_short_detail:I
|
|
|
|
const-string p2, "setBackgroundResource"
|
|
|
|
sget v0, Lcom/moji/notify/R$color;->notify_back_color_gray_top:I
|
|
|
|
invoke-virtual {p1, p0, p2, v0}, Landroid/widget/RemoteViews;->setInt(ILjava/lang/String;I)V
|
|
|
|
goto :goto_5
|
|
|
|
:cond_4
|
|
const/4 p0, 0x2
|
|
|
|
if-ne v1, p0, :cond_5
|
|
|
|
.line 848
|
|
sget p0, Lcom/moji/notify/R$id;->iv_bakcground:I
|
|
|
|
const-string p2, "setBackgroundResource"
|
|
|
|
sget v0, Lcom/moji/notify/R$color;->notify_back_color_white_top:I
|
|
|
|
invoke-virtual {p1, p0, p2, v0}, Landroid/widget/RemoteViews;->setInt(ILjava/lang/String;I)V
|
|
|
|
.line 849
|
|
sget p0, Lcom/moji/notify/R$id;->iv_bakcground_bottom:I
|
|
|
|
const-string p2, "setBackgroundResource"
|
|
|
|
sget v0, Lcom/moji/notify/R$color;->notify_back_color_white_bottom:I
|
|
|
|
invoke-virtual {p1, p0, p2, v0}, Landroid/widget/RemoteViews;->setInt(ILjava/lang/String;I)V
|
|
|
|
.line 850
|
|
sget p0, Lcom/moji/notify/R$id;->ll_short_detail:I
|
|
|
|
const-string p2, "setBackgroundResource"
|
|
|
|
sget v0, Lcom/moji/notify/R$color;->notify_back_color_white_bottom:I
|
|
|
|
invoke-virtual {p1, p0, p2, v0}, Landroid/widget/RemoteViews;->setInt(ILjava/lang/String;I)V
|
|
|
|
:cond_5
|
|
:goto_5
|
|
return-void
|
|
.end method
|
|
|
|
.method private static a(Landroid/content/Context;Lcom/moji/weatherprovider/data/Weather;Landroid/support/v4/app/NotificationCompat$Builder;ZI)V
|
|
.locals 7
|
|
.annotation build Landroid/annotation/SuppressLint;
|
|
value = {
|
|
"NewApi"
|
|
}
|
|
.end annotation
|
|
|
|
.line 385
|
|
sget-boolean v0, Lcom/moji/notify/NotifyService;->l:Z
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 386
|
|
sget v0, Lcom/moji/notify/R$layout;->notification_view1_short_new_v8:I
|
|
|
|
invoke-static {p0, v0}, Lcom/moji/notify/NotifyService;->a(Landroid/content/Context;I)Landroid/widget/RemoteViews;
|
|
|
|
move-result-object v0
|
|
|
|
:goto_0
|
|
move-object v3, v0
|
|
|
|
goto :goto_1
|
|
|
|
.line 387
|
|
:cond_0
|
|
sget-boolean v0, Lcom/moji/notify/NotifyService;->d:Z
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
.line 388
|
|
sget v0, Lcom/moji/notify/R$layout;->notification_view1_short_new_special:I
|
|
|
|
invoke-static {p0, v0}, Lcom/moji/notify/NotifyService;->a(Landroid/content/Context;I)Landroid/widget/RemoteViews;
|
|
|
|
move-result-object v0
|
|
|
|
goto :goto_0
|
|
|
|
.line 390
|
|
:cond_1
|
|
invoke-static {}, Lcom/moji/notify/NotifyService;->b()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_4
|
|
|
|
sget-boolean v0, Lcom/moji/notify/NotifyService;->e:Z
|
|
|
|
if-nez v0, :cond_4
|
|
|
|
.line 391
|
|
sget-object v0, Landroid/os/Build;->MODEL:Ljava/lang/String;
|
|
|
|
const-string v1, "HUAWEI P7-L07"
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_2
|
|
|
|
.line 392
|
|
sget v0, Lcom/moji/notify/R$layout;->notification_view_short_huawei_p7:I
|
|
|
|
invoke-static {p0, v0}, Lcom/moji/notify/NotifyService;->a(Landroid/content/Context;I)Landroid/widget/RemoteViews;
|
|
|
|
move-result-object v0
|
|
|
|
goto :goto_0
|
|
|
|
.line 393
|
|
:cond_2
|
|
sget-boolean v0, Lcom/moji/notify/NotifyService;->g:Z
|
|
|
|
if-eqz v0, :cond_3
|
|
|
|
.line 394
|
|
sget v0, Lcom/moji/notify/R$layout;->notification_view_short_huawei_emui4:I
|
|
|
|
invoke-static {p0, v0}, Lcom/moji/notify/NotifyService;->a(Landroid/content/Context;I)Landroid/widget/RemoteViews;
|
|
|
|
move-result-object v0
|
|
|
|
goto :goto_0
|
|
|
|
.line 396
|
|
:cond_3
|
|
sget v0, Lcom/moji/notify/R$layout;->notification_view_short_huawei:I
|
|
|
|
invoke-static {p0, v0}, Lcom/moji/notify/NotifyService;->a(Landroid/content/Context;I)Landroid/widget/RemoteViews;
|
|
|
|
move-result-object v0
|
|
|
|
goto :goto_0
|
|
|
|
.line 399
|
|
:cond_4
|
|
sget v0, Lcom/moji/notify/R$layout;->notification_view1_short_new:I
|
|
|
|
invoke-static {p0, v0}, Lcom/moji/notify/NotifyService;->a(Landroid/content/Context;I)Landroid/widget/RemoteViews;
|
|
|
|
move-result-object v0
|
|
|
|
goto :goto_0
|
|
|
|
:goto_1
|
|
const/16 v4, 0xd
|
|
|
|
move-object v1, p0
|
|
|
|
move-object v2, p1
|
|
|
|
move v5, p3
|
|
|
|
move v6, p4
|
|
|
|
.line 403
|
|
invoke-static/range {v1 .. v6}, Lcom/moji/notify/NotifyService;->a(Landroid/content/Context;Lcom/moji/weatherprovider/data/Weather;Landroid/widget/RemoteViews;IZI)Landroid/widget/RemoteViews;
|
|
|
|
move-result-object p0
|
|
|
|
.line 404
|
|
sget-boolean p1, Lcom/moji/notify/NotifyService;->h:Z
|
|
|
|
if-eqz p1, :cond_6
|
|
|
|
.line 405
|
|
sget-boolean p1, Lcom/moji/notify/NotifyService;->k:Z
|
|
|
|
if-eqz p1, :cond_5
|
|
|
|
.line 406
|
|
invoke-virtual {p2, p0}, Landroid/support/v4/app/NotificationCompat$Builder;->setCustomBigContentView(Landroid/widget/RemoteViews;)Landroid/support/v4/app/NotificationCompat$Builder;
|
|
|
|
goto :goto_2
|
|
|
|
.line 407
|
|
:cond_5
|
|
sget p1, Lcom/moji/notify/NotifyService;->a:I
|
|
|
|
const/16 p3, 0x18
|
|
|
|
if-lt p1, p3, :cond_6
|
|
|
|
.line 408
|
|
invoke-virtual {p2, p0}, Landroid/support/v4/app/NotificationCompat$Builder;->setCustomContentView(Landroid/widget/RemoteViews;)Landroid/support/v4/app/NotificationCompat$Builder;
|
|
|
|
:cond_6
|
|
:goto_2
|
|
return-void
|
|
.end method
|
|
|
|
.method private static a(Landroid/content/Context;Lcom/moji/weatherprovider/data/Weather;Landroid/widget/RemoteViews;II)V
|
|
.locals 6
|
|
|
|
const/4 v0, 0x0
|
|
|
|
packed-switch p4, :pswitch_data_0
|
|
|
|
const/4 v1, 0x0
|
|
|
|
const/4 v2, 0x0
|
|
|
|
const/4 v3, 0x0
|
|
|
|
goto :goto_0
|
|
|
|
.line 473
|
|
:pswitch_0
|
|
sget v1, Lcom/moji/notify/R$id;->iv_weather_icon_3:I
|
|
|
|
.line 474
|
|
sget v2, Lcom/moji/notify/R$id;->tv_weekday_3:I
|
|
|
|
.line 475
|
|
sget v3, Lcom/moji/notify/R$id;->tv_temp_range_3:I
|
|
|
|
goto :goto_0
|
|
|
|
.line 468
|
|
:pswitch_1
|
|
sget v1, Lcom/moji/notify/R$id;->iv_weather_icon_2:I
|
|
|
|
.line 469
|
|
sget v2, Lcom/moji/notify/R$id;->tv_weekday_2:I
|
|
|
|
.line 470
|
|
sget v3, Lcom/moji/notify/R$id;->tv_temp_range_2:I
|
|
|
|
goto :goto_0
|
|
|
|
.line 463
|
|
:pswitch_2
|
|
sget v1, Lcom/moji/notify/R$id;->iv_weather_icon_1:I
|
|
|
|
.line 464
|
|
sget v2, Lcom/moji/notify/R$id;->tv_weekday_1:I
|
|
|
|
.line 465
|
|
sget v3, Lcom/moji/notify/R$id;->tv_temp_range_1:I
|
|
|
|
:goto_0
|
|
add-int/2addr p3, p4
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
.line 480
|
|
iget-object p4, p1, Lcom/moji/weatherprovider/data/Weather;->mDetail:Lcom/moji/weatherprovider/data/Detail;
|
|
|
|
if-eqz p4, :cond_0
|
|
|
|
iget-object p4, p1, Lcom/moji/weatherprovider/data/Weather;->mDetail:Lcom/moji/weatherprovider/data/Detail;
|
|
|
|
iget-object p4, p4, Lcom/moji/weatherprovider/data/Detail;->mForecastDayList:Lcom/moji/weatherprovider/data/ForecastDayList;
|
|
|
|
if-eqz p4, :cond_0
|
|
|
|
iget-object p4, p1, Lcom/moji/weatherprovider/data/Weather;->mDetail:Lcom/moji/weatherprovider/data/Detail;
|
|
|
|
iget-object p4, p4, Lcom/moji/weatherprovider/data/Detail;->mForecastDayList:Lcom/moji/weatherprovider/data/ForecastDayList;
|
|
|
|
iget-object p4, p4, Lcom/moji/weatherprovider/data/ForecastDayList;->mForecastDay:Ljava/util/List;
|
|
|
|
if-eqz p4, :cond_0
|
|
|
|
.line 482
|
|
iget-object p4, p1, Lcom/moji/weatherprovider/data/Weather;->mDetail:Lcom/moji/weatherprovider/data/Detail;
|
|
|
|
iget-object p4, p4, Lcom/moji/weatherprovider/data/Detail;->mForecastDayList:Lcom/moji/weatherprovider/data/ForecastDayList;
|
|
|
|
iget-object p4, p4, Lcom/moji/weatherprovider/data/ForecastDayList;->mForecastDay:Ljava/util/List;
|
|
|
|
invoke-interface {p4}, Ljava/util/List;->size()I
|
|
|
|
move-result p4
|
|
|
|
if-le p4, p3, :cond_0
|
|
|
|
.line 484
|
|
iget-object p4, p1, Lcom/moji/weatherprovider/data/Weather;->mDetail:Lcom/moji/weatherprovider/data/Detail;
|
|
|
|
iget-object p4, p4, Lcom/moji/weatherprovider/data/Detail;->mForecastDayList:Lcom/moji/weatherprovider/data/ForecastDayList;
|
|
|
|
iget-object p4, p4, Lcom/moji/weatherprovider/data/ForecastDayList;->mForecastDay:Ljava/util/List;
|
|
|
|
invoke-interface {p4, p3}, Ljava/util/List;->get(I)Ljava/lang/Object;
|
|
|
|
move-result-object p3
|
|
|
|
check-cast p3, Lcom/moji/weatherprovider/data/ForecastDayList$ForecastDay;
|
|
|
|
goto :goto_1
|
|
|
|
:cond_0
|
|
const/4 p3, 0x0
|
|
|
|
:goto_1
|
|
if-eqz p3, :cond_3
|
|
|
|
const/4 p4, 0x2
|
|
|
|
.line 489
|
|
new-array p4, p4, [I
|
|
|
|
aput v2, p4, v0
|
|
|
|
const/4 v0, 0x1
|
|
|
|
aput v3, p4, v0
|
|
|
|
invoke-static {p0, p2, p4}, Lcom/moji/notify/NotifyService;->a(Landroid/content/Context;Landroid/widget/RemoteViews;[I)V
|
|
|
|
.line 491
|
|
new-instance p4, Lcom/moji/base/WeatherDrawableBig;
|
|
|
|
iget v4, p3, Lcom/moji/weatherprovider/data/ForecastDayList$ForecastDay;->mIconDay:I
|
|
|
|
invoke-direct {p4, v4}, Lcom/moji/base/WeatherDrawableBig;-><init>(I)V
|
|
|
|
.line 492
|
|
invoke-virtual {p4, v0}, Lcom/moji/base/WeatherDrawableBig;->a(Z)I
|
|
|
|
move-result p4
|
|
|
|
invoke-virtual {p2, v1, p4}, Landroid/widget/RemoteViews;->setImageViewResource(II)V
|
|
|
|
.line 494
|
|
invoke-static {p0, p3, p1}, Lcom/moji/notify/NotifyService;->a(Landroid/content/Context;Lcom/moji/weatherprovider/data/ForecastDayList$ForecastDay;Lcom/moji/weatherprovider/data/Weather;)Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-virtual {p2, v2, p0}, Landroid/widget/RemoteViews;->setTextViewText(ILjava/lang/CharSequence;)V
|
|
|
|
const-string p0, "--"
|
|
|
|
const-string p1, "--"
|
|
|
|
.line 497
|
|
iget p4, p3, Lcom/moji/weatherprovider/data/ForecastDayList$ForecastDay;->mTemperatureHigh:I
|
|
|
|
const/16 v1, 0x64
|
|
|
|
if-eq p4, v1, :cond_1
|
|
|
|
.line 498
|
|
iget p0, p3, Lcom/moji/weatherprovider/data/ForecastDayList$ForecastDay;->mTemperatureHigh:I
|
|
|
|
int-to-double v4, p0
|
|
|
|
invoke-static {v4, v5, v0}, Lcom/moji/preferences/units/UNIT_TEMP;->getValueStringByCurrentUnitTemp(DZ)Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
.line 500
|
|
:cond_1
|
|
iget p4, p3, Lcom/moji/weatherprovider/data/ForecastDayList$ForecastDay;->mTemperatureLow:I
|
|
|
|
if-eq p4, v1, :cond_2
|
|
|
|
.line 501
|
|
iget p1, p3, Lcom/moji/weatherprovider/data/ForecastDayList$ForecastDay;->mTemperatureLow:I
|
|
|
|
int-to-double p3, p1
|
|
|
|
invoke-static {p3, p4, v0}, Lcom/moji/preferences/units/UNIT_TEMP;->getValueStringByCurrentUnitTemp(DZ)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
.line 504
|
|
:cond_2
|
|
new-instance p3, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {p3}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
invoke-virtual {p3, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
const-string p0, "/"
|
|
|
|
invoke-virtual {p3, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {p3, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {p3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-virtual {p2, v3, p0}, Landroid/widget/RemoteViews;->setTextViewText(ILjava/lang/CharSequence;)V
|
|
|
|
:cond_3
|
|
return-void
|
|
|
|
nop
|
|
|
|
:pswitch_data_0
|
|
.packed-switch 0x1
|
|
:pswitch_2
|
|
:pswitch_1
|
|
:pswitch_0
|
|
.end packed-switch
|
|
.end method
|
|
|
|
.method public static a(Landroid/content/Context;Z)V
|
|
.locals 2
|
|
|
|
if-nez p0, :cond_0
|
|
|
|
return-void
|
|
|
|
.line 118
|
|
:cond_0
|
|
:try_start_0
|
|
invoke-static {p0}, Lcom/moji/notify/NotifyService;->c(Landroid/content/Context;)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
const-string v0, "NotifyService"
|
|
|
|
const-string v1, "needNotify"
|
|
|
|
.line 119
|
|
invoke-static {v0, v1}, Lcom/moji/tool/log/MJLogger;->b(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
.line 120
|
|
sput-boolean p1, Lcom/moji/notify/NotifyService;->j:Z
|
|
|
|
.line 121
|
|
new-instance p1, Landroid/content/Intent;
|
|
|
|
const-class v0, Lcom/moji/notify/NotifyService;
|
|
|
|
invoke-direct {p1, p0, v0}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V
|
|
|
|
invoke-virtual {p0, p1}, Landroid/content/Context;->startService(Landroid/content/Intent;)Landroid/content/ComponentName;
|
|
:try_end_0
|
|
.catch Ljava/lang/Throwable; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
goto :goto_0
|
|
|
|
:catch_0
|
|
move-exception p0
|
|
|
|
const-string p1, "NotifyService"
|
|
|
|
.line 124
|
|
invoke-static {p1, p0}, Lcom/moji/tool/log/MJLogger;->a(Ljava/lang/String;Ljava/lang/Throwable;)V
|
|
|
|
:cond_1
|
|
:goto_0
|
|
return-void
|
|
.end method
|
|
|
|
.method private static a()Z
|
|
.locals 2
|
|
|
|
.line 174
|
|
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
|
|
|
|
const/16 v1, 0x15
|
|
|
|
if-lt v0, v1, :cond_0
|
|
|
|
const/4 v0, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 v0, 0x0
|
|
|
|
:goto_0
|
|
return v0
|
|
.end method
|
|
|
|
.method private static b(Landroid/content/Context;I)I
|
|
.locals 0
|
|
|
|
packed-switch p1, :pswitch_data_0
|
|
|
|
const/4 p0, 0x0
|
|
|
|
return p0
|
|
|
|
:pswitch_0
|
|
const/4 p0, -0x1
|
|
|
|
return p0
|
|
|
|
.line 799
|
|
:pswitch_1
|
|
sget p1, Lcom/moji/notify/R$color;->notify_green:I
|
|
|
|
invoke-static {p0, p1}, Landroid/support/v4/content/ContextCompat;->getColor(Landroid/content/Context;I)I
|
|
|
|
move-result p0
|
|
|
|
return p0
|
|
|
|
.line 797
|
|
:pswitch_2
|
|
sget p1, Lcom/moji/notify/R$color;->notify_gold:I
|
|
|
|
invoke-static {p0, p1}, Landroid/support/v4/content/ContextCompat;->getColor(Landroid/content/Context;I)I
|
|
|
|
move-result p0
|
|
|
|
return p0
|
|
|
|
.line 795
|
|
:pswitch_3
|
|
sget p1, Lcom/moji/notify/R$color;->notify_gray:I
|
|
|
|
invoke-static {p0, p1}, Landroid/support/v4/content/ContextCompat;->getColor(Landroid/content/Context;I)I
|
|
|
|
move-result p0
|
|
|
|
return p0
|
|
|
|
:pswitch_data_0
|
|
.packed-switch 0x1
|
|
:pswitch_3
|
|
:pswitch_2
|
|
:pswitch_1
|
|
:pswitch_0
|
|
.end packed-switch
|
|
.end method
|
|
|
|
.method public static b(Landroid/content/Context;)V
|
|
.locals 15
|
|
.annotation build Landroid/annotation/SuppressLint;
|
|
value = {
|
|
"NewApi"
|
|
}
|
|
.end annotation
|
|
|
|
if-nez p0, :cond_0
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
const-string v0, "NotifyService"
|
|
|
|
const-string v1, "showResidentNotification"
|
|
|
|
.line 237
|
|
invoke-static {v0, v1}, Lcom/moji/tool/log/MJLogger;->b(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
const/4 v0, 0x0
|
|
|
|
.line 238
|
|
sput-boolean v0, Lcom/moji/notify/NotifyService;->h:Z
|
|
|
|
.line 239
|
|
invoke-static {}, Lcom/moji/tool/DeviceTool;->U()I
|
|
|
|
move-result v1
|
|
|
|
const/4 v2, 0x5
|
|
|
|
const/4 v3, 0x1
|
|
|
|
if-le v1, v2, :cond_1
|
|
|
|
const/4 v2, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
const/4 v2, 0x0
|
|
|
|
.line 240
|
|
:goto_0
|
|
sput-boolean v2, Lcom/moji/notify/NotifyService;->c:Z
|
|
|
|
const/16 v2, 0x8
|
|
|
|
if-lt v1, v2, :cond_2
|
|
|
|
const/4 v1, 0x1
|
|
|
|
goto :goto_1
|
|
|
|
:cond_2
|
|
const/4 v1, 0x0
|
|
|
|
.line 241
|
|
:goto_1
|
|
sput-boolean v1, Lcom/moji/notify/NotifyService;->l:Z
|
|
|
|
.line 242
|
|
invoke-static {}, Lcom/moji/notify/NotifyService;->f()V
|
|
|
|
.line 243
|
|
invoke-static {}, Lcom/moji/notify/NotifyService;->d()Z
|
|
|
|
move-result v1
|
|
|
|
sput-boolean v1, Lcom/moji/notify/NotifyService;->f:Z
|
|
|
|
.line 244
|
|
invoke-static {}, Lcom/moji/notify/NotifyService;->a()Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_5
|
|
|
|
invoke-static {}, Lcom/moji/notify/NotifyService;->b()Z
|
|
|
|
move-result v1
|
|
|
|
if-nez v1, :cond_3
|
|
|
|
invoke-static {}, Lcom/moji/notify/NotifyService;->c()Z
|
|
|
|
move-result v1
|
|
|
|
if-nez v1, :cond_3
|
|
|
|
sget-boolean v1, Lcom/moji/notify/NotifyService;->c:Z
|
|
|
|
if-eqz v1, :cond_5
|
|
|
|
.line 245
|
|
:cond_3
|
|
sget-boolean v1, Lcom/moji/notify/NotifyService;->e:Z
|
|
|
|
if-nez v1, :cond_4
|
|
|
|
sget-boolean v1, Lcom/moji/notify/NotifyService;->g:Z
|
|
|
|
if-nez v1, :cond_4
|
|
|
|
sget-boolean v1, Lcom/moji/notify/NotifyService;->f:Z
|
|
|
|
if-nez v1, :cond_4
|
|
|
|
const/4 v1, 0x1
|
|
|
|
goto :goto_2
|
|
|
|
:cond_4
|
|
const/4 v1, 0x0
|
|
|
|
:goto_2
|
|
sput-boolean v1, Lcom/moji/notify/NotifyService;->d:Z
|
|
|
|
goto :goto_3
|
|
|
|
.line 247
|
|
:cond_5
|
|
sput-boolean v0, Lcom/moji/notify/NotifyService;->d:Z
|
|
|
|
:goto_3
|
|
const-string v1, "notification"
|
|
|
|
.line 249
|
|
invoke-virtual {p0, v1}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
|
|
|
|
move-result-object v1
|
|
|
|
check-cast v1, Landroid/app/NotificationManager;
|
|
|
|
.line 252
|
|
invoke-static {}, Lcom/moji/tool/DeviceTool;->b()I
|
|
|
|
move-result v2
|
|
|
|
const/16 v4, 0x140
|
|
|
|
if-le v2, v4, :cond_b
|
|
|
|
.line 253
|
|
sget-boolean v2, Lcom/moji/notify/NotifyService;->l:Z
|
|
|
|
if-eqz v2, :cond_6
|
|
|
|
.line 254
|
|
sget v2, Lcom/moji/notify/R$layout;->notification_view1_new_v8:I
|
|
|
|
invoke-static {p0, v2}, Lcom/moji/notify/NotifyService;->a(Landroid/content/Context;I)Landroid/widget/RemoteViews;
|
|
|
|
move-result-object v2
|
|
|
|
goto :goto_4
|
|
|
|
.line 255
|
|
:cond_6
|
|
sget-boolean v2, Lcom/moji/notify/NotifyService;->d:Z
|
|
|
|
if-eqz v2, :cond_7
|
|
|
|
.line 256
|
|
sget v2, Lcom/moji/notify/R$layout;->notification_view1_new_special:I
|
|
|
|
invoke-static {p0, v2}, Lcom/moji/notify/NotifyService;->a(Landroid/content/Context;I)Landroid/widget/RemoteViews;
|
|
|
|
move-result-object v2
|
|
|
|
goto :goto_4
|
|
|
|
.line 258
|
|
:cond_7
|
|
invoke-static {}, Lcom/moji/notify/NotifyService;->b()Z
|
|
|
|
move-result v2
|
|
|
|
if-eqz v2, :cond_a
|
|
|
|
sget-boolean v2, Lcom/moji/notify/NotifyService;->e:Z
|
|
|
|
if-nez v2, :cond_a
|
|
|
|
.line 259
|
|
sget-object v2, Landroid/os/Build;->MODEL:Ljava/lang/String;
|
|
|
|
const-string v4, "HUAWEI P7-L07"
|
|
|
|
invoke-virtual {v2, v4}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result v2
|
|
|
|
if-eqz v2, :cond_8
|
|
|
|
.line 260
|
|
sget v2, Lcom/moji/notify/R$layout;->notification_view_huawei_p7:I
|
|
|
|
invoke-static {p0, v2}, Lcom/moji/notify/NotifyService;->a(Landroid/content/Context;I)Landroid/widget/RemoteViews;
|
|
|
|
move-result-object v2
|
|
|
|
goto :goto_4
|
|
|
|
.line 261
|
|
:cond_8
|
|
sget-boolean v2, Lcom/moji/notify/NotifyService;->g:Z
|
|
|
|
if-eqz v2, :cond_9
|
|
|
|
.line 262
|
|
sget v2, Lcom/moji/notify/R$layout;->notification_view_huawei_emui41:I
|
|
|
|
invoke-static {p0, v2}, Lcom/moji/notify/NotifyService;->a(Landroid/content/Context;I)Landroid/widget/RemoteViews;
|
|
|
|
move-result-object v2
|
|
|
|
goto :goto_4
|
|
|
|
.line 264
|
|
:cond_9
|
|
sget v2, Lcom/moji/notify/R$layout;->notification_view_huawei:I
|
|
|
|
invoke-static {p0, v2}, Lcom/moji/notify/NotifyService;->a(Landroid/content/Context;I)Landroid/widget/RemoteViews;
|
|
|
|
move-result-object v2
|
|
|
|
goto :goto_4
|
|
|
|
.line 267
|
|
:cond_a
|
|
sget v2, Lcom/moji/notify/R$layout;->notification_view_new:I
|
|
|
|
invoke-static {p0, v2}, Lcom/moji/notify/NotifyService;->a(Landroid/content/Context;I)Landroid/widget/RemoteViews;
|
|
|
|
move-result-object v2
|
|
|
|
goto :goto_4
|
|
|
|
.line 271
|
|
:cond_b
|
|
sget v2, Lcom/moji/notify/R$layout;->notification_view1_narrow:I
|
|
|
|
invoke-static {p0, v2}, Lcom/moji/notify/NotifyService;->a(Landroid/content/Context;I)Landroid/widget/RemoteViews;
|
|
|
|
move-result-object v2
|
|
|
|
:goto_4
|
|
move-object v6, v2
|
|
|
|
.line 275
|
|
invoke-static {}, Lcom/moji/areamanagement/MJAreaManager;->b()Lcom/moji/common/area/AreaInfo;
|
|
|
|
move-result-object v2
|
|
|
|
if-nez v2, :cond_c
|
|
|
|
.line 277
|
|
invoke-static {}, Lcom/moji/areamanagement/MJAreaManager;->a()Lcom/moji/common/area/AreaInfo;
|
|
|
|
move-result-object v2
|
|
|
|
if-nez v2, :cond_c
|
|
|
|
.line 279
|
|
invoke-static {}, Lcom/moji/areamanagement/MJAreaManager;->c()Ljava/util/List;
|
|
|
|
move-result-object v4
|
|
|
|
if-eqz v4, :cond_c
|
|
|
|
.line 280
|
|
invoke-interface {v4}, Ljava/util/List;->isEmpty()Z
|
|
|
|
move-result v5
|
|
|
|
if-nez v5, :cond_c
|
|
|
|
.line 281
|
|
invoke-interface {v4, v0}, Ljava/util/List;->get(I)Ljava/lang/Object;
|
|
|
|
move-result-object v2
|
|
|
|
check-cast v2, Lcom/moji/common/area/AreaInfo;
|
|
|
|
:cond_c
|
|
const/4 v10, 0x0
|
|
|
|
if-eqz v2, :cond_e
|
|
|
|
.line 288
|
|
sput-boolean v0, Lcom/moji/notify/NotifyService;->i:Z
|
|
|
|
.line 289
|
|
invoke-static {}, Lcom/moji/weatherprovider/provider/WeatherProvider;->b()Lcom/moji/weatherprovider/provider/WeatherProvider;
|
|
|
|
move-result-object v4
|
|
|
|
.line 290
|
|
invoke-virtual {v4, v2}, Lcom/moji/weatherprovider/provider/WeatherProvider;->a(Lcom/moji/common/area/AreaInfo;)Lcom/moji/weatherprovider/data/Weather;
|
|
|
|
move-result-object v4
|
|
|
|
.line 292
|
|
iget-boolean v5, v2, Lcom/moji/common/area/AreaInfo;->isLocation:Z
|
|
|
|
if-eqz v5, :cond_d
|
|
|
|
if-nez v4, :cond_d
|
|
|
|
invoke-static {}, Lcom/moji/areamanagement/MJAreaManager;->f()I
|
|
|
|
move-result v5
|
|
|
|
if-gt v5, v3, :cond_d
|
|
|
|
.line 293
|
|
sput-boolean v3, Lcom/moji/notify/NotifyService;->i:Z
|
|
|
|
:cond_d
|
|
move-object v11, v4
|
|
|
|
goto :goto_5
|
|
|
|
.line 296
|
|
:cond_e
|
|
sput-boolean v3, Lcom/moji/notify/NotifyService;->i:Z
|
|
|
|
move-object v11, v10
|
|
|
|
:goto_5
|
|
const-string v4, "NotifyService"
|
|
|
|
.line 298
|
|
new-instance v5, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v5}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v7, "showResidentNotification: cityid = "
|
|
|
|
invoke-virtual {v5, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v5, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
|
|
|
const-string v7, ", weather = "
|
|
|
|
invoke-virtual {v5, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
if-eqz v11, :cond_10
|
|
|
|
iget-object v7, v11, Lcom/moji/weatherprovider/data/Weather;->mDetail:Lcom/moji/weatherprovider/data/Detail;
|
|
|
|
if-nez v7, :cond_f
|
|
|
|
goto :goto_6
|
|
|
|
:cond_f
|
|
iget-object v7, v11, Lcom/moji/weatherprovider/data/Weather;->mDetail:Lcom/moji/weatherprovider/data/Detail;
|
|
|
|
iget-object v7, v7, Lcom/moji/weatherprovider/data/Detail;->mCityName:Ljava/lang/String;
|
|
|
|
goto :goto_7
|
|
|
|
:cond_10
|
|
:goto_6
|
|
const-string v7, "null"
|
|
|
|
:goto_7
|
|
invoke-virtual {v5, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v5
|
|
|
|
invoke-static {v4, v5}, Lcom/moji/tool/log/MJLogger;->b(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
.line 300
|
|
new-instance v4, Lcom/moji/base/WeatherDrawableBig;
|
|
|
|
const/16 v5, 0x2c
|
|
|
|
invoke-direct {v4, v5}, Lcom/moji/base/WeatherDrawableBig;-><init>(I)V
|
|
|
|
invoke-virtual {v4, v3}, Lcom/moji/base/WeatherDrawableBig;->a(Z)I
|
|
|
|
move-result v4
|
|
|
|
const-string v7, ""
|
|
|
|
if-nez v11, :cond_12
|
|
|
|
.line 304
|
|
new-instance v4, Lcom/moji/base/WeatherDrawableBig;
|
|
|
|
invoke-direct {v4, v5}, Lcom/moji/base/WeatherDrawableBig;-><init>(I)V
|
|
|
|
.line 305
|
|
invoke-virtual {v4, v3}, Lcom/moji/base/WeatherDrawableBig;->a(Z)I
|
|
|
|
move-result v4
|
|
|
|
:cond_11
|
|
:goto_8
|
|
move v12, v4
|
|
|
|
move-object v13, v7
|
|
|
|
goto :goto_c
|
|
|
|
.line 308
|
|
:cond_12
|
|
iget-object v5, v11, Lcom/moji/weatherprovider/data/Weather;->mDetail:Lcom/moji/weatherprovider/data/Detail;
|
|
|
|
const/16 v7, -0x64
|
|
|
|
if-eqz v5, :cond_13
|
|
|
|
iget-object v5, v11, Lcom/moji/weatherprovider/data/Weather;->mDetail:Lcom/moji/weatherprovider/data/Detail;
|
|
|
|
iget-object v5, v5, Lcom/moji/weatherprovider/data/Detail;->mCondition:Lcom/moji/weatherprovider/data/Condition;
|
|
|
|
if-eqz v5, :cond_13
|
|
|
|
.line 309
|
|
iget-object v5, v11, Lcom/moji/weatherprovider/data/Weather;->mDetail:Lcom/moji/weatherprovider/data/Detail;
|
|
|
|
iget-object v5, v5, Lcom/moji/weatherprovider/data/Detail;->mCondition:Lcom/moji/weatherprovider/data/Condition;
|
|
|
|
iget v5, v5, Lcom/moji/weatherprovider/data/Condition;->mTemperature:I
|
|
|
|
goto :goto_9
|
|
|
|
:cond_13
|
|
const/16 v5, -0x64
|
|
|
|
:goto_9
|
|
if-ne v5, v7, :cond_14
|
|
|
|
const-string v5, ""
|
|
|
|
:goto_a
|
|
move-object v7, v5
|
|
|
|
goto :goto_b
|
|
|
|
:cond_14
|
|
int-to-double v7, v5
|
|
|
|
.line 314
|
|
invoke-static {v7, v8, v3}, Lcom/moji/preferences/units/UNIT_TEMP;->getValueStringByCurrentUnitTemp(DZ)Ljava/lang/String;
|
|
|
|
move-result-object v5
|
|
|
|
goto :goto_a
|
|
|
|
.line 316
|
|
:goto_b
|
|
iget-object v5, v11, Lcom/moji/weatherprovider/data/Weather;->mDetail:Lcom/moji/weatherprovider/data/Detail;
|
|
|
|
if-eqz v5, :cond_11
|
|
|
|
iget-object v5, v11, Lcom/moji/weatherprovider/data/Weather;->mDetail:Lcom/moji/weatherprovider/data/Detail;
|
|
|
|
iget-object v5, v5, Lcom/moji/weatherprovider/data/Detail;->mCondition:Lcom/moji/weatherprovider/data/Condition;
|
|
|
|
if-eqz v5, :cond_11
|
|
|
|
.line 318
|
|
new-instance v4, Lcom/moji/base/WeatherDrawableBig;
|
|
|
|
iget-object v5, v11, Lcom/moji/weatherprovider/data/Weather;->mDetail:Lcom/moji/weatherprovider/data/Detail;
|
|
|
|
iget-object v5, v5, Lcom/moji/weatherprovider/data/Detail;->mCondition:Lcom/moji/weatherprovider/data/Condition;
|
|
|
|
iget v5, v5, Lcom/moji/weatherprovider/data/Condition;->mIcon:I
|
|
|
|
invoke-direct {v4, v5}, Lcom/moji/base/WeatherDrawableBig;-><init>(I)V
|
|
|
|
.line 319
|
|
iget-object v5, v11, Lcom/moji/weatherprovider/data/Weather;->mDetail:Lcom/moji/weatherprovider/data/Detail;
|
|
|
|
invoke-virtual {v5}, Lcom/moji/weatherprovider/data/Detail;->isDay()Z
|
|
|
|
move-result v5
|
|
|
|
invoke-virtual {v4, v5}, Lcom/moji/base/WeatherDrawableBig;->a(Z)I
|
|
|
|
move-result v4
|
|
|
|
goto :goto_8
|
|
|
|
.line 323
|
|
:goto_c
|
|
invoke-static {v11}, Lcom/moji/notify/NotifyService;->a(Lcom/moji/weatherprovider/data/Weather;)I
|
|
|
|
move-result v14
|
|
|
|
const/16 v7, 0xb
|
|
|
|
if-eqz v2, :cond_15
|
|
|
|
.line 325
|
|
iget-boolean v4, v2, Lcom/moji/common/area/AreaInfo;->isLocation:Z
|
|
|
|
if-eqz v4, :cond_15
|
|
|
|
const/4 v8, 0x1
|
|
|
|
goto :goto_d
|
|
|
|
:cond_15
|
|
const/4 v8, 0x0
|
|
|
|
:goto_d
|
|
move-object v4, p0
|
|
|
|
move-object v5, v11
|
|
|
|
move v9, v14
|
|
|
|
invoke-static/range {v4 .. v9}, Lcom/moji/notify/NotifyService;->a(Landroid/content/Context;Lcom/moji/weatherprovider/data/Weather;Landroid/widget/RemoteViews;IZI)Landroid/widget/RemoteViews;
|
|
|
|
move-result-object v4
|
|
|
|
.line 330
|
|
:try_start_0
|
|
invoke-static {}, Lcom/moji/notify/NotifyService;->a()Z
|
|
|
|
move-result v5
|
|
|
|
if-eqz v5, :cond_16
|
|
|
|
.line 331
|
|
sget v5, Lcom/moji/notify/R$drawable;->moji_icon_transparent:I
|
|
|
|
invoke-static {p0, v5}, Lcom/moji/notify/NotifyService;->c(Landroid/content/Context;I)Landroid/graphics/Bitmap;
|
|
|
|
move-result-object v5
|
|
|
|
:goto_e
|
|
move-object v10, v5
|
|
|
|
goto :goto_f
|
|
|
|
.line 333
|
|
:cond_16
|
|
sget v5, Lcom/moji/notify/R$drawable;->notification_icon:I
|
|
|
|
invoke-static {p0, v5}, Lcom/moji/notify/NotifyService;->c(Landroid/content/Context;I)Landroid/graphics/Bitmap;
|
|
|
|
move-result-object v5
|
|
:try_end_0
|
|
.catch Ljava/lang/Throwable; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
goto :goto_e
|
|
|
|
:catch_0
|
|
move-exception v5
|
|
|
|
const-string v6, "NotifyService"
|
|
|
|
.line 336
|
|
invoke-static {v6, v5}, Lcom/moji/tool/log/MJLogger;->a(Ljava/lang/String;Ljava/lang/Throwable;)V
|
|
|
|
.line 338
|
|
:goto_f
|
|
new-instance v5, Landroid/support/v4/app/NotificationCompat$Builder;
|
|
|
|
invoke-direct {v5, p0}, Landroid/support/v4/app/NotificationCompat$Builder;-><init>(Landroid/content/Context;)V
|
|
|
|
invoke-virtual {v5, v12}, Landroid/support/v4/app/NotificationCompat$Builder;->setSmallIcon(I)Landroid/support/v4/app/NotificationCompat$Builder;
|
|
|
|
move-result-object v5
|
|
|
|
invoke-virtual {v5, v0}, Landroid/support/v4/app/NotificationCompat$Builder;->setAutoCancel(Z)Landroid/support/v4/app/NotificationCompat$Builder;
|
|
|
|
move-result-object v5
|
|
|
|
invoke-virtual {v5, v3}, Landroid/support/v4/app/NotificationCompat$Builder;->setOngoing(Z)Landroid/support/v4/app/NotificationCompat$Builder;
|
|
|
|
move-result-object v5
|
|
|
|
.line 339
|
|
invoke-static {}, Ljava/lang/System;->currentTimeMillis()J
|
|
|
|
move-result-wide v6
|
|
|
|
invoke-virtual {v5, v6, v7}, Landroid/support/v4/app/NotificationCompat$Builder;->setWhen(J)Landroid/support/v4/app/NotificationCompat$Builder;
|
|
|
|
move-result-object v5
|
|
|
|
invoke-virtual {v5, v13}, Landroid/support/v4/app/NotificationCompat$Builder;->setTicker(Ljava/lang/CharSequence;)Landroid/support/v4/app/NotificationCompat$Builder;
|
|
|
|
move-result-object v5
|
|
|
|
const/4 v6, 0x2
|
|
|
|
invoke-virtual {v5, v6}, Landroid/support/v4/app/NotificationCompat$Builder;->setPriority(I)Landroid/support/v4/app/NotificationCompat$Builder;
|
|
|
|
move-result-object v5
|
|
|
|
invoke-virtual {v5, v3}, Landroid/support/v4/app/NotificationCompat$Builder;->setVisibility(I)Landroid/support/v4/app/NotificationCompat$Builder;
|
|
|
|
move-result-object v5
|
|
|
|
if-eqz v10, :cond_17
|
|
|
|
.line 340
|
|
invoke-virtual {v10}, Landroid/graphics/Bitmap;->isRecycled()Z
|
|
|
|
move-result v7
|
|
|
|
if-nez v7, :cond_17
|
|
|
|
.line 341
|
|
invoke-virtual {v5, v10}, Landroid/support/v4/app/NotificationCompat$Builder;->setLargeIcon(Landroid/graphics/Bitmap;)Landroid/support/v4/app/NotificationCompat$Builder;
|
|
|
|
.line 343
|
|
:cond_17
|
|
invoke-virtual {v5, v4}, Landroid/support/v4/app/NotificationCompat$Builder;->setCustomContentView(Landroid/widget/RemoteViews;)Landroid/support/v4/app/NotificationCompat$Builder;
|
|
|
|
.line 345
|
|
sget v4, Lcom/moji/notify/NotifyService;->a:I
|
|
|
|
const/16 v7, 0x10
|
|
|
|
if-lt v4, v7, :cond_1b
|
|
|
|
.line 346
|
|
invoke-static {p0}, Lcom/moji/notify/NotifyService;->d(Landroid/content/Context;)Z
|
|
|
|
move-result v4
|
|
|
|
if-eqz v4, :cond_19
|
|
|
|
if-eqz v2, :cond_18
|
|
|
|
.line 347
|
|
iget-boolean v2, v2, Lcom/moji/common/area/AreaInfo;->isLocation:Z
|
|
|
|
if-eqz v2, :cond_18
|
|
|
|
const/4 v0, 0x1
|
|
|
|
:cond_18
|
|
invoke-static {p0, v11, v5, v0, v14}, Lcom/moji/notify/NotifyService;->b(Landroid/content/Context;Lcom/moji/weatherprovider/data/Weather;Landroid/support/v4/app/NotificationCompat$Builder;ZI)V
|
|
|
|
goto :goto_10
|
|
|
|
:cond_19
|
|
if-eqz v2, :cond_1a
|
|
|
|
.line 349
|
|
iget-boolean v2, v2, Lcom/moji/common/area/AreaInfo;->isLocation:Z
|
|
|
|
if-eqz v2, :cond_1a
|
|
|
|
const/4 v0, 0x1
|
|
|
|
:cond_1a
|
|
invoke-static {p0, v11, v5, v0, v14}, Lcom/moji/notify/NotifyService;->a(Landroid/content/Context;Lcom/moji/weatherprovider/data/Weather;Landroid/support/v4/app/NotificationCompat$Builder;ZI)V
|
|
|
|
.line 351
|
|
:goto_10
|
|
invoke-virtual {v5}, Landroid/support/v4/app/NotificationCompat$Builder;->build()Landroid/app/Notification;
|
|
|
|
move-result-object v0
|
|
|
|
.line 352
|
|
invoke-static {p0}, Lcom/moji/notify/NotifyService;->g(Landroid/content/Context;)Landroid/app/PendingIntent;
|
|
|
|
move-result-object p0
|
|
|
|
iput-object p0, v0, Landroid/app/Notification;->contentIntent:Landroid/app/PendingIntent;
|
|
|
|
goto :goto_11
|
|
|
|
.line 354
|
|
:cond_1b
|
|
invoke-virtual {v5}, Landroid/support/v4/app/NotificationCompat$Builder;->build()Landroid/app/Notification;
|
|
|
|
move-result-object v0
|
|
|
|
.line 356
|
|
invoke-static {p0}, Lcom/moji/notify/NotifyService;->g(Landroid/content/Context;)Landroid/app/PendingIntent;
|
|
|
|
move-result-object p0
|
|
|
|
iput-object p0, v0, Landroid/app/Notification;->contentIntent:Landroid/app/PendingIntent;
|
|
|
|
.line 357
|
|
iget p0, v0, Landroid/app/Notification;->flags:I
|
|
|
|
or-int/lit8 p0, p0, 0x20
|
|
|
|
iput p0, v0, Landroid/app/Notification;->flags:I
|
|
|
|
.line 358
|
|
iget p0, v0, Landroid/app/Notification;->flags:I
|
|
|
|
or-int/2addr p0, v6
|
|
|
|
iput p0, v0, Landroid/app/Notification;->flags:I
|
|
|
|
:goto_11
|
|
:try_start_1
|
|
const-string p0, "NotifyService"
|
|
|
|
const-string v2, "showResidentNotification: notify"
|
|
|
|
.line 361
|
|
invoke-static {p0, v2}, Lcom/moji/tool/log/MJLogger;->b(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
const/16 p0, 0x3eb
|
|
|
|
.line 362
|
|
invoke-virtual {v1, p0, v0}, Landroid/app/NotificationManager;->notify(ILandroid/app/Notification;)V
|
|
:try_end_1
|
|
.catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_1
|
|
|
|
goto :goto_12
|
|
|
|
:catch_1
|
|
move-exception p0
|
|
|
|
const-string v0, "NotifyService"
|
|
|
|
.line 364
|
|
invoke-static {v0, p0}, Lcom/moji/tool/log/MJLogger;->a(Ljava/lang/String;Ljava/lang/Throwable;)V
|
|
|
|
:goto_12
|
|
return-void
|
|
.end method
|
|
|
|
.method private static b(Landroid/content/Context;Lcom/moji/weatherprovider/data/Weather;Landroid/support/v4/app/NotificationCompat$Builder;ZI)V
|
|
.locals 7
|
|
.annotation build Landroid/annotation/SuppressLint;
|
|
value = {
|
|
"NewApi"
|
|
}
|
|
.end annotation
|
|
|
|
.line 417
|
|
sget-boolean v0, Lcom/moji/notify/NotifyService;->l:Z
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 418
|
|
sget v0, Lcom/moji/notify/R$layout;->notification_view1_expand_new_v8:I
|
|
|
|
invoke-static {p0, v0}, Lcom/moji/notify/NotifyService;->a(Landroid/content/Context;I)Landroid/widget/RemoteViews;
|
|
|
|
move-result-object v0
|
|
|
|
:goto_0
|
|
move-object v3, v0
|
|
|
|
goto :goto_1
|
|
|
|
.line 419
|
|
:cond_0
|
|
sget-boolean v0, Lcom/moji/notify/NotifyService;->d:Z
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
.line 420
|
|
sget v0, Lcom/moji/notify/R$layout;->notification_view1_expand_new_special:I
|
|
|
|
invoke-static {p0, v0}, Lcom/moji/notify/NotifyService;->a(Landroid/content/Context;I)Landroid/widget/RemoteViews;
|
|
|
|
move-result-object v0
|
|
|
|
goto :goto_0
|
|
|
|
.line 422
|
|
:cond_1
|
|
invoke-static {}, Lcom/moji/notify/NotifyService;->b()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_4
|
|
|
|
sget-boolean v0, Lcom/moji/notify/NotifyService;->e:Z
|
|
|
|
if-nez v0, :cond_4
|
|
|
|
.line 423
|
|
sget-object v0, Landroid/os/Build;->MODEL:Ljava/lang/String;
|
|
|
|
const-string v1, "HUAWEI P7-L07"
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_2
|
|
|
|
.line 424
|
|
sget v0, Lcom/moji/notify/R$layout;->notification_view1_expand_huawei_p7:I
|
|
|
|
invoke-static {p0, v0}, Lcom/moji/notify/NotifyService;->a(Landroid/content/Context;I)Landroid/widget/RemoteViews;
|
|
|
|
move-result-object v0
|
|
|
|
goto :goto_0
|
|
|
|
.line 425
|
|
:cond_2
|
|
sget-boolean v0, Lcom/moji/notify/NotifyService;->g:Z
|
|
|
|
if-eqz v0, :cond_3
|
|
|
|
.line 426
|
|
sget v0, Lcom/moji/notify/R$layout;->notification_view1_expand_huawei_emui4:I
|
|
|
|
invoke-static {p0, v0}, Lcom/moji/notify/NotifyService;->a(Landroid/content/Context;I)Landroid/widget/RemoteViews;
|
|
|
|
move-result-object v0
|
|
|
|
goto :goto_0
|
|
|
|
.line 428
|
|
:cond_3
|
|
sget v0, Lcom/moji/notify/R$layout;->notification_view1_expand_huawei:I
|
|
|
|
invoke-static {p0, v0}, Lcom/moji/notify/NotifyService;->a(Landroid/content/Context;I)Landroid/widget/RemoteViews;
|
|
|
|
move-result-object v0
|
|
|
|
goto :goto_0
|
|
|
|
.line 431
|
|
:cond_4
|
|
sget v0, Lcom/moji/notify/R$layout;->notification_view1_expand_new:I
|
|
|
|
invoke-static {p0, v0}, Lcom/moji/notify/NotifyService;->a(Landroid/content/Context;I)Landroid/widget/RemoteViews;
|
|
|
|
move-result-object v0
|
|
|
|
goto :goto_0
|
|
|
|
:goto_1
|
|
const/16 v4, 0xb
|
|
|
|
move-object v1, p0
|
|
|
|
move-object v2, p1
|
|
|
|
move v5, p3
|
|
|
|
move v6, p4
|
|
|
|
.line 436
|
|
invoke-static/range {v1 .. v6}, Lcom/moji/notify/NotifyService;->a(Landroid/content/Context;Lcom/moji/weatherprovider/data/Weather;Landroid/widget/RemoteViews;IZI)Landroid/widget/RemoteViews;
|
|
|
|
move-result-object p3
|
|
|
|
.line 438
|
|
invoke-virtual {p2, p3}, Landroid/support/v4/app/NotificationCompat$Builder;->setCustomBigContentView(Landroid/widget/RemoteViews;)Landroid/support/v4/app/NotificationCompat$Builder;
|
|
|
|
if-eqz p3, :cond_5
|
|
|
|
const/4 p2, 0x1
|
|
|
|
.line 441
|
|
invoke-static {p0, p1, p3, p4, p2}, Lcom/moji/notify/NotifyService;->a(Landroid/content/Context;Lcom/moji/weatherprovider/data/Weather;Landroid/widget/RemoteViews;II)V
|
|
|
|
const/4 p2, 0x2
|
|
|
|
.line 442
|
|
invoke-static {p0, p1, p3, p4, p2}, Lcom/moji/notify/NotifyService;->a(Landroid/content/Context;Lcom/moji/weatherprovider/data/Weather;Landroid/widget/RemoteViews;II)V
|
|
|
|
const/4 p2, 0x3
|
|
|
|
.line 443
|
|
invoke-static {p0, p1, p3, p4, p2}, Lcom/moji/notify/NotifyService;->a(Landroid/content/Context;Lcom/moji/weatherprovider/data/Weather;Landroid/widget/RemoteViews;II)V
|
|
|
|
:cond_5
|
|
return-void
|
|
.end method
|
|
|
|
.method private static b()Z
|
|
.locals 3
|
|
|
|
const/4 v0, 0x0
|
|
|
|
.line 179
|
|
:try_start_0
|
|
sget-object v1, Landroid/os/Build;->MANUFACTURER:Ljava/lang/String;
|
|
|
|
.line 180
|
|
invoke-static {}, Ljava/util/Locale;->getDefault()Ljava/util/Locale;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v1, v2}, Ljava/lang/String;->toLowerCase(Ljava/util/Locale;)Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
const-string v2, "huawei"
|
|
|
|
invoke-virtual {v1, v2}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
|
|
|
|
move-result v1
|
|
|
|
if-nez v1, :cond_0
|
|
|
|
sget-object v1, Landroid/os/Build;->BRAND:Ljava/lang/String;
|
|
|
|
.line 181
|
|
invoke-static {}, Ljava/util/Locale;->getDefault()Ljava/util/Locale;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v1, v2}, Ljava/lang/String;->toLowerCase(Ljava/util/Locale;)Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
const-string v2, "huawei"
|
|
|
|
invoke-virtual {v1, v2}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
|
|
|
|
move-result v1
|
|
|
|
if-nez v1, :cond_0
|
|
|
|
sget-object v1, Landroid/os/Build;->BRAND:Ljava/lang/String;
|
|
|
|
.line 182
|
|
invoke-static {}, Ljava/util/Locale;->getDefault()Ljava/util/Locale;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v1, v2}, Ljava/lang/String;->toLowerCase(Ljava/util/Locale;)Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
const-string v2, "honor"
|
|
|
|
invoke-virtual {v1, v2}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
|
|
|
|
move-result v1
|
|
|
|
if-nez v1, :cond_0
|
|
|
|
sget-object v1, Landroid/os/Build;->MODEL:Ljava/lang/String;
|
|
|
|
.line 183
|
|
invoke-static {}, Ljava/util/Locale;->getDefault()Ljava/util/Locale;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v1, v2}, Ljava/lang/String;->toLowerCase(Ljava/util/Locale;)Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
const-string v2, "huawei"
|
|
|
|
invoke-virtual {v1, v2}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_1
|
|
|
|
:cond_0
|
|
sget-object v1, Landroid/os/Build;->MODEL:Ljava/lang/String;
|
|
|
|
.line 185
|
|
invoke-virtual {v1}, Ljava/lang/String;->toLowerCase()Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
const-string v2, "nexus"
|
|
|
|
invoke-virtual {v1, v2}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
|
|
|
|
move-result v1
|
|
:try_end_0
|
|
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
if-nez v1, :cond_1
|
|
|
|
const/4 v0, 0x1
|
|
|
|
:cond_1
|
|
return v0
|
|
|
|
:catch_0
|
|
move-exception v1
|
|
|
|
const-string v2, "NotifyService"
|
|
|
|
.line 187
|
|
invoke-static {v2, v1}, Lcom/moji/tool/log/MJLogger;->a(Ljava/lang/String;Ljava/lang/Throwable;)V
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method private static c(Landroid/content/Context;I)Landroid/graphics/Bitmap;
|
|
.locals 1
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-nez p0, :cond_0
|
|
|
|
return-object v0
|
|
|
|
.line 883
|
|
:cond_0
|
|
invoke-static {p0, p1}, Landroid/support/v4/content/ContextCompat;->getDrawable(Landroid/content/Context;I)Landroid/graphics/drawable/Drawable;
|
|
|
|
move-result-object p0
|
|
|
|
if-eqz p0, :cond_1
|
|
|
|
.line 884
|
|
instance-of p1, p0, Landroid/graphics/drawable/BitmapDrawable;
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
.line 885
|
|
check-cast p0, Landroid/graphics/drawable/BitmapDrawable;
|
|
|
|
invoke-virtual {p0}, Landroid/graphics/drawable/BitmapDrawable;->getBitmap()Landroid/graphics/Bitmap;
|
|
|
|
move-result-object v0
|
|
|
|
:cond_1
|
|
return-object v0
|
|
.end method
|
|
|
|
.method private static c()Z
|
|
.locals 3
|
|
|
|
const/4 v0, 0x0
|
|
|
|
.line 194
|
|
:try_start_0
|
|
sget-object v1, Landroid/os/Build;->MANUFACTURER:Ljava/lang/String;
|
|
|
|
invoke-virtual {v1}, Ljava/lang/String;->toLowerCase()Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
const-string v2, "meizu"
|
|
|
|
invoke-virtual {v1, v2}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
|
|
|
|
move-result v1
|
|
|
|
if-nez v1, :cond_0
|
|
|
|
invoke-static {}, Lcom/moji/notify/NotifyService;->e()Z
|
|
|
|
move-result v1
|
|
:try_end_0
|
|
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
if-eqz v1, :cond_1
|
|
|
|
:cond_0
|
|
const/4 v0, 0x1
|
|
|
|
:cond_1
|
|
return v0
|
|
|
|
:catch_0
|
|
move-exception v1
|
|
|
|
const-string v2, "NotifyService"
|
|
|
|
.line 196
|
|
invoke-static {v2, v1}, Lcom/moji/tool/log/MJLogger;->a(Ljava/lang/String;Ljava/lang/Throwable;)V
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method private static c(Landroid/content/Context;)Z
|
|
.locals 1
|
|
|
|
const/4 v0, 0x1
|
|
|
|
if-nez p0, :cond_0
|
|
|
|
return v0
|
|
|
|
.line 145
|
|
:cond_0
|
|
invoke-static {p0}, Lcom/moji/notify/NotifyPreference;->a(Landroid/content/Context;)Lcom/moji/notify/NotifyPreference;
|
|
|
|
move-result-object p0
|
|
|
|
if-eqz p0, :cond_1
|
|
|
|
.line 146
|
|
invoke-virtual {p0}, Lcom/moji/notify/NotifyPreference;->c()Z
|
|
|
|
move-result p0
|
|
|
|
if-eqz p0, :cond_1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
const/4 v0, 0x0
|
|
|
|
:goto_0
|
|
return v0
|
|
.end method
|
|
|
|
.method private static d()Z
|
|
.locals 3
|
|
|
|
.line 202
|
|
invoke-static {}, Lcom/moji/notify/NotifyService;->c()Z
|
|
|
|
move-result v0
|
|
|
|
const/4 v1, 0x0
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
return v1
|
|
|
|
.line 205
|
|
:cond_0
|
|
invoke-static {}, Lcom/moji/tool/DeviceTool;->V()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
.line 206
|
|
invoke-static {v0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
|
|
|
|
move-result v2
|
|
|
|
if-nez v2, :cond_2
|
|
|
|
const-string v2, "6.1.0.0A"
|
|
|
|
.line 207
|
|
invoke-virtual {v2, v0}, Ljava/lang/String;->compareToIgnoreCase(Ljava/lang/String;)I
|
|
|
|
move-result v0
|
|
|
|
if-gez v0, :cond_1
|
|
|
|
const/4 v1, 0x1
|
|
|
|
:cond_1
|
|
return v1
|
|
|
|
:cond_2
|
|
return v1
|
|
.end method
|
|
|
|
.method private static d(Landroid/content/Context;)Z
|
|
.locals 1
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-nez p0, :cond_0
|
|
|
|
return v0
|
|
|
|
.line 153
|
|
:cond_0
|
|
invoke-static {p0}, Lcom/moji/notify/NotifyPreference;->a(Landroid/content/Context;)Lcom/moji/notify/NotifyPreference;
|
|
|
|
move-result-object p0
|
|
|
|
if-eqz p0, :cond_1
|
|
|
|
.line 154
|
|
invoke-virtual {p0}, Lcom/moji/notify/NotifyPreference;->d()Z
|
|
|
|
move-result p0
|
|
|
|
if-eqz p0, :cond_1
|
|
|
|
const/4 v0, 0x1
|
|
|
|
:cond_1
|
|
return v0
|
|
.end method
|
|
|
|
.method private static e(Landroid/content/Context;)I
|
|
.locals 1
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-nez p0, :cond_0
|
|
|
|
return v0
|
|
|
|
.line 161
|
|
:cond_0
|
|
invoke-static {p0}, Lcom/moji/notify/NotifyPreference;->a(Landroid/content/Context;)Lcom/moji/notify/NotifyPreference;
|
|
|
|
move-result-object p0
|
|
|
|
if-eqz p0, :cond_1
|
|
|
|
.line 162
|
|
invoke-virtual {p0}, Lcom/moji/notify/NotifyPreference;->e()I
|
|
|
|
move-result v0
|
|
|
|
:cond_1
|
|
return v0
|
|
.end method
|
|
|
|
.method private static e()Z
|
|
.locals 5
|
|
|
|
const/4 v0, 0x0
|
|
|
|
:try_start_0
|
|
const-string v1, "android.os.Build"
|
|
|
|
.line 215
|
|
invoke-static {v1}, Ljava/lang/Class;->forName(Ljava/lang/String;)Ljava/lang/Class;
|
|
|
|
move-result-object v1
|
|
|
|
const-string v2, "hasSmartBar"
|
|
|
|
new-array v3, v0, [Ljava/lang/Class;
|
|
|
|
invoke-virtual {v1, v2, v3}, Ljava/lang/Class;->getMethod(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;
|
|
|
|
move-result-object v1
|
|
|
|
const/4 v2, 0x0
|
|
|
|
.line 217
|
|
new-array v3, v0, [Ljava/lang/Object;
|
|
|
|
invoke-virtual {v1, v2, v3}, Ljava/lang/reflect/Method;->invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v1
|
|
|
|
check-cast v1, Ljava/lang/Boolean;
|
|
|
|
invoke-virtual {v1}, Ljava/lang/Boolean;->booleanValue()Z
|
|
|
|
move-result v1
|
|
:try_end_0
|
|
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
return v1
|
|
|
|
:catch_0
|
|
move-exception v1
|
|
|
|
const-string v2, "NotifyService"
|
|
|
|
.line 219
|
|
new-instance v3, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v4, "hasSmartBar check failed:"
|
|
|
|
invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v1}, Ljava/lang/Exception;->getMessage()Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v3, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-static {v2, v1}, Lcom/moji/tool/log/MJLogger;->b(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
.line 222
|
|
sget-object v1, Landroid/os/Build;->DEVICE:Ljava/lang/String;
|
|
|
|
const-string v2, "mx2"
|
|
|
|
invoke-virtual {v1, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
const/4 v0, 0x1
|
|
|
|
return v0
|
|
|
|
:cond_0
|
|
return v0
|
|
.end method
|
|
|
|
.method private static f(Landroid/content/Context;)I
|
|
.locals 1
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-nez p0, :cond_0
|
|
|
|
return v0
|
|
|
|
.line 169
|
|
:cond_0
|
|
invoke-static {p0}, Lcom/moji/notify/NotifyPreference;->a(Landroid/content/Context;)Lcom/moji/notify/NotifyPreference;
|
|
|
|
move-result-object p0
|
|
|
|
if-eqz p0, :cond_1
|
|
|
|
.line 170
|
|
invoke-virtual {p0}, Lcom/moji/notify/NotifyPreference;->f()I
|
|
|
|
move-result v0
|
|
|
|
:cond_1
|
|
return v0
|
|
.end method
|
|
|
|
.method private static f()V
|
|
.locals 3
|
|
|
|
const/4 v0, 0x0
|
|
|
|
.line 369
|
|
sput-boolean v0, Lcom/moji/notify/NotifyService;->e:Z
|
|
|
|
.line 370
|
|
sput-boolean v0, Lcom/moji/notify/NotifyService;->g:Z
|
|
|
|
.line 371
|
|
invoke-static {}, Lcom/moji/tool/DeviceTool;->T()I
|
|
|
|
move-result v0
|
|
|
|
const/4 v1, 0x1
|
|
|
|
const/16 v2, 0xb
|
|
|
|
if-lt v0, v2, :cond_0
|
|
|
|
.line 373
|
|
sput-boolean v1, Lcom/moji/notify/NotifyService;->e:Z
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/16 v2, 0xa
|
|
|
|
if-ne v0, v2, :cond_1
|
|
|
|
.line 375
|
|
sput-boolean v1, Lcom/moji/notify/NotifyService;->g:Z
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
const/16 v2, 0x9
|
|
|
|
if-ne v0, v2, :cond_2
|
|
|
|
.line 377
|
|
sput-boolean v1, Lcom/moji/notify/NotifyService;->g:Z
|
|
|
|
:cond_2
|
|
:goto_0
|
|
return-void
|
|
.end method
|
|
|
|
.method private static g(Landroid/content/Context;)Landroid/app/PendingIntent;
|
|
.locals 4
|
|
|
|
.line 448
|
|
new-instance v0, Landroid/content/Intent;
|
|
|
|
invoke-direct {v0}, Landroid/content/Intent;-><init>()V
|
|
|
|
.line 449
|
|
new-instance v1, Landroid/content/ComponentName;
|
|
|
|
invoke-virtual {p0}, Landroid/content/Context;->getPackageName()Ljava/lang/String;
|
|
|
|
move-result-object v2
|
|
|
|
const-string v3, "com.moji.mjweather.MainActivity"
|
|
|
|
invoke-direct {v1, v2, v3}, Landroid/content/ComponentName;-><init>(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
.line 450
|
|
invoke-virtual {v0, v1}, Landroid/content/Intent;->setComponent(Landroid/content/ComponentName;)Landroid/content/Intent;
|
|
|
|
.line 451
|
|
new-instance v1, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
invoke-virtual {p0}, Landroid/content/Context;->getPackageName()Ljava/lang/String;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
const-string v2, ".action.notify"
|
|
|
|
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v0, v1}, Landroid/content/Intent;->setAction(Ljava/lang/String;)Landroid/content/Intent;
|
|
|
|
const/high16 v1, 0x10200000
|
|
|
|
.line 452
|
|
invoke-virtual {v0, v1}, Landroid/content/Intent;->setFlags(I)Landroid/content/Intent;
|
|
|
|
const-string v1, "isNeedCheckNotify"
|
|
|
|
const/4 v2, 0x0
|
|
|
|
.line 453
|
|
invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Z)Landroid/content/Intent;
|
|
|
|
const-string v1, "where"
|
|
|
|
const-string v3, "notify"
|
|
|
|
.line 454
|
|
invoke-virtual {v0, v1, v3}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;
|
|
|
|
.line 455
|
|
invoke-static {p0, v2, v0, v2}, Landroid/app/PendingIntent;->getActivity(Landroid/content/Context;ILandroid/content/Intent;I)Landroid/app/PendingIntent;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method private static g()Z
|
|
.locals 2
|
|
|
|
.line 856
|
|
sget-object v0, Landroid/os/Build;->MODEL:Ljava/lang/String;
|
|
|
|
const-string v1, "OPPO A33"
|
|
|
|
.line 870
|
|
invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_1
|
|
|
|
sget-object v0, Landroid/os/Build;->MODEL:Ljava/lang/String;
|
|
|
|
const-string v1, "OPPO R9tm"
|
|
|
|
.line 871
|
|
invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_1
|
|
|
|
sget-object v0, Landroid/os/Build;->MODEL:Ljava/lang/String;
|
|
|
|
const-string v1, "OPPO R9m"
|
|
|
|
.line 872
|
|
invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_1
|
|
|
|
sget-object v0, Landroid/os/Build;->MODEL:Ljava/lang/String;
|
|
|
|
const-string v1, "OPPO R9s"
|
|
|
|
.line 873
|
|
invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_1
|
|
|
|
sget-object v0, Landroid/os/Build;->MODEL:Ljava/lang/String;
|
|
|
|
const-string v1, "Le X620"
|
|
|
|
.line 874
|
|
invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 v0, 0x0
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
:goto_0
|
|
const/4 v0, 0x1
|
|
|
|
:goto_1
|
|
return v0
|
|
.end method
|
|
|
|
.method public static startNotify(Landroid/content/Context;)V
|
|
.locals 1
|
|
.annotation build Landroid/support/annotation/Keep;
|
|
.end annotation
|
|
|
|
const/4 v0, 0x0
|
|
|
|
.line 130
|
|
invoke-static {p0, v0}, Lcom/moji/notify/NotifyService;->a(Landroid/content/Context;Z)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 0
|
|
|
|
.line 96
|
|
invoke-super {p0}, Landroid/app/Service;->onCreate()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public onStartCommand(Landroid/content/Intent;II)I
|
|
.locals 0
|
|
|
|
:try_start_0
|
|
const-string p1, "NotifyService"
|
|
|
|
const-string p2, "onStartCommand"
|
|
|
|
.line 102
|
|
invoke-static {p1, p2}, Lcom/moji/tool/log/MJLogger;->b(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
.line 103
|
|
invoke-virtual {p0}, Lcom/moji/notify/NotifyService;->getApplicationContext()Landroid/content/Context;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-static {p1}, Lcom/moji/notify/NotifyService;->c(Landroid/content/Context;)Z
|
|
|
|
move-result p1
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
.line 104
|
|
invoke-static {p0}, Lcom/moji/notify/NotifyService;->b(Landroid/content/Context;)V
|
|
|
|
.line 105
|
|
invoke-virtual {p0}, Lcom/moji/notify/NotifyService;->stopSelf()V
|
|
:try_end_0
|
|
.catch Ljava/lang/Throwable; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
goto :goto_0
|
|
|
|
:catch_0
|
|
move-exception p1
|
|
|
|
const-string p2, "NotifyService"
|
|
|
|
.line 108
|
|
invoke-static {p2, p1}, Lcom/moji/tool/log/MJLogger;->a(Ljava/lang/String;Ljava/lang/Throwable;)V
|
|
|
|
:cond_0
|
|
:goto_0
|
|
const/4 p1, 0x2
|
|
|
|
return p1
|
|
.end method
|