677 lines
18 KiB
Smali
677 lines
18 KiB
Smali
.class public Lcom/moji/mjweather/voice/PlayerUtil;
|
|
.super Ljava/lang/Object;
|
|
.source "PlayerUtil.java"
|
|
|
|
|
|
# static fields
|
|
.field private static a:Lcom/moji/mjweather/voice/VoicePlayer;
|
|
|
|
.field private static b:Z
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>()V
|
|
.locals 0
|
|
|
|
.line 25
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method static a()V
|
|
.locals 1
|
|
|
|
.line 42
|
|
sget-object v0, Lcom/moji/mjweather/voice/PlayerUtil;->a:Lcom/moji/mjweather/voice/VoicePlayer;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
sget-object v0, Lcom/moji/mjweather/voice/PlayerUtil;->a:Lcom/moji/mjweather/voice/VoicePlayer;
|
|
|
|
invoke-virtual {v0}, Lcom/moji/mjweather/voice/VoicePlayer;->e()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 43
|
|
sget-object v0, Lcom/moji/mjweather/voice/PlayerUtil;->a:Lcom/moji/mjweather/voice/VoicePlayer;
|
|
|
|
invoke-virtual {v0}, Lcom/moji/mjweather/voice/VoicePlayer;->c()V
|
|
|
|
const/4 v0, 0x0
|
|
|
|
.line 44
|
|
invoke-static {v0}, Lcom/moji/mjweather/voice/PlayerUtil;->a(Z)V
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public static a(Landroid/content/Context;)V
|
|
.locals 4
|
|
|
|
.line 56
|
|
sget-object v0, Lcom/moji/mjweather/voice/PlayerUtil;->a:Lcom/moji/mjweather/voice/VoicePlayer;
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
.line 57
|
|
new-instance v0, Lcom/moji/mjweather/voice/VoicePlayer;
|
|
|
|
new-instance v1, Lcom/moji/mjweather/voice/PlayerUtil$1;
|
|
|
|
invoke-direct {v1}, Lcom/moji/mjweather/voice/PlayerUtil$1;-><init>()V
|
|
|
|
invoke-direct {v0, p0, v1}, Lcom/moji/mjweather/voice/VoicePlayer;-><init>(Landroid/content/Context;Lcom/moji/mjweather/voice/VoicePlayer$OnVoiceFinishedListener;)V
|
|
|
|
sput-object v0, Lcom/moji/mjweather/voice/PlayerUtil;->a:Lcom/moji/mjweather/voice/VoicePlayer;
|
|
|
|
goto :goto_0
|
|
|
|
.line 66
|
|
:cond_0
|
|
sget-object v0, Lcom/moji/mjweather/voice/PlayerUtil;->a:Lcom/moji/mjweather/voice/VoicePlayer;
|
|
|
|
new-instance v1, Lcom/moji/mjweather/voice/PlayerUtil$2;
|
|
|
|
invoke-direct {v1}, Lcom/moji/mjweather/voice/PlayerUtil$2;-><init>()V
|
|
|
|
invoke-virtual {v0, v1}, Lcom/moji/mjweather/voice/VoicePlayer;->a(Lcom/moji/mjweather/voice/VoicePlayer$OnVoiceFinishedListener;)V
|
|
|
|
.line 75
|
|
:goto_0
|
|
sget-boolean v0, Lcom/moji/mjweather/voice/PlayerUtil;->b:Z
|
|
|
|
const/4 v1, 0x0
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
.line 76
|
|
sget-object p0, Lcom/moji/mjweather/voice/PlayerUtil;->a:Lcom/moji/mjweather/voice/VoicePlayer;
|
|
|
|
if-eqz p0, :cond_6
|
|
|
|
.line 77
|
|
sget-object p0, Lcom/moji/mjweather/voice/PlayerUtil;->a:Lcom/moji/mjweather/voice/VoicePlayer;
|
|
|
|
invoke-virtual {p0}, Lcom/moji/mjweather/voice/VoicePlayer;->c()V
|
|
|
|
.line 78
|
|
invoke-static {v1}, Lcom/moji/mjweather/voice/PlayerUtil;->a(Z)V
|
|
|
|
goto :goto_1
|
|
|
|
.line 81
|
|
:cond_1
|
|
invoke-static {}, Lcom/moji/areamanagement/MJAreaManager;->a()Lcom/moji/common/area/AreaInfo;
|
|
|
|
move-result-object v0
|
|
|
|
const v2, 0x7f0e0a1d
|
|
|
|
if-nez v0, :cond_2
|
|
|
|
.line 83
|
|
invoke-static {p0, v2, v1}, Landroid/widget/Toast;->makeText(Landroid/content/Context;II)Landroid/widget/Toast;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-virtual {p0}, Landroid/widget/Toast;->show()V
|
|
|
|
.line 84
|
|
invoke-static {}, Lorg/greenrobot/eventbus/EventBus;->a()Lorg/greenrobot/eventbus/EventBus;
|
|
|
|
move-result-object p0
|
|
|
|
new-instance v0, Lcom/moji/mjweather/voice/VoiceAnimationEvent;
|
|
|
|
invoke-direct {v0, v1}, Lcom/moji/mjweather/voice/VoiceAnimationEvent;-><init>(Z)V
|
|
|
|
invoke-virtual {p0, v0}, Lorg/greenrobot/eventbus/EventBus;->d(Ljava/lang/Object;)V
|
|
|
|
return-void
|
|
|
|
.line 87
|
|
:cond_2
|
|
invoke-static {}, Lcom/moji/weatherprovider/provider/WeatherProvider;->b()Lcom/moji/weatherprovider/provider/WeatherProvider;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-virtual {v3, v0}, Lcom/moji/weatherprovider/provider/WeatherProvider;->a(Lcom/moji/common/area/AreaInfo;)Lcom/moji/weatherprovider/data/Weather;
|
|
|
|
move-result-object v0
|
|
|
|
if-nez v0, :cond_3
|
|
|
|
.line 89
|
|
invoke-static {p0, v2, v1}, Landroid/widget/Toast;->makeText(Landroid/content/Context;II)Landroid/widget/Toast;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-virtual {p0}, Landroid/widget/Toast;->show()V
|
|
|
|
.line 90
|
|
invoke-static {}, Lorg/greenrobot/eventbus/EventBus;->a()Lorg/greenrobot/eventbus/EventBus;
|
|
|
|
move-result-object p0
|
|
|
|
new-instance v0, Lcom/moji/mjweather/voice/VoiceAnimationEvent;
|
|
|
|
invoke-direct {v0, v1}, Lcom/moji/mjweather/voice/VoiceAnimationEvent;-><init>(Z)V
|
|
|
|
invoke-virtual {p0, v0}, Lorg/greenrobot/eventbus/EventBus;->d(Ljava/lang/Object;)V
|
|
|
|
return-void
|
|
|
|
:cond_3
|
|
const-string v0, "audio"
|
|
|
|
.line 93
|
|
invoke-virtual {p0, v0}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Landroid/media/AudioManager;
|
|
|
|
const/4 v2, 0x3
|
|
|
|
.line 94
|
|
invoke-virtual {v0, v2}, Landroid/media/AudioManager;->getStreamVolume(I)I
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_5
|
|
|
|
const v0, 0x7f0e0a27
|
|
|
|
.line 96
|
|
invoke-static {p0, v0, v1}, Landroid/widget/Toast;->makeText(Landroid/content/Context;II)Landroid/widget/Toast;
|
|
|
|
move-result-object v0
|
|
|
|
.line 97
|
|
invoke-static {}, Lcom/moji/tool/DeviceTool;->c()I
|
|
|
|
move-result v2
|
|
|
|
const/16 v3, 0x2d0
|
|
|
|
if-lt v2, v3, :cond_4
|
|
|
|
const/16 v3, 0x10
|
|
|
|
.line 99
|
|
div-int/lit8 v2, v2, 0x4
|
|
|
|
invoke-virtual {v0, v3, v1, v2}, Landroid/widget/Toast;->setGravity(III)V
|
|
|
|
.line 101
|
|
:cond_4
|
|
invoke-virtual {v0}, Landroid/widget/Toast;->show()V
|
|
|
|
.line 105
|
|
:cond_5
|
|
invoke-static {}, Lcom/moji/mjweather/voice/VoiceContentMgr;->a()Lcom/moji/mjweather/voice/VoiceContentMgr;
|
|
|
|
move-result-object v0
|
|
|
|
new-instance v2, Lcom/moji/mjweather/voice/PlayerUtil$3;
|
|
|
|
invoke-direct {v2, p0}, Lcom/moji/mjweather/voice/PlayerUtil$3;-><init>(Landroid/content/Context;)V
|
|
|
|
invoke-virtual {v0, p0, v1, v1, v2}, Lcom/moji/mjweather/voice/VoiceContentMgr;->a(Landroid/content/Context;ZZLcom/moji/mjweather/voice/VoiceContentMgr$OnPrepareFileListener;)V
|
|
|
|
:cond_6
|
|
:goto_1
|
|
return-void
|
|
.end method
|
|
|
|
.method public static a(Landroid/content/Context;Lcom/moji/mjweather/voice/VoicePlayer$OnVoiceFinishedListener;)V
|
|
.locals 3
|
|
|
|
.line 148
|
|
:try_start_0
|
|
sget-object v0, Lcom/moji/mjweather/voice/PlayerUtil;->a:Lcom/moji/mjweather/voice/VoicePlayer;
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
.line 149
|
|
new-instance v0, Lcom/moji/mjweather/voice/VoicePlayer;
|
|
|
|
invoke-direct {v0, p0, p1}, Lcom/moji/mjweather/voice/VoicePlayer;-><init>(Landroid/content/Context;Lcom/moji/mjweather/voice/VoicePlayer$OnVoiceFinishedListener;)V
|
|
|
|
sput-object v0, Lcom/moji/mjweather/voice/PlayerUtil;->a:Lcom/moji/mjweather/voice/VoicePlayer;
|
|
|
|
goto :goto_0
|
|
|
|
.line 151
|
|
:cond_0
|
|
sget-object v0, Lcom/moji/mjweather/voice/PlayerUtil;->a:Lcom/moji/mjweather/voice/VoicePlayer;
|
|
|
|
invoke-virtual {v0, p1}, Lcom/moji/mjweather/voice/VoicePlayer;->a(Lcom/moji/mjweather/voice/VoicePlayer$OnVoiceFinishedListener;)V
|
|
|
|
.line 153
|
|
:goto_0
|
|
sget-boolean p1, Lcom/moji/mjweather/voice/PlayerUtil;->b:Z
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
.line 154
|
|
sget-object p1, Lcom/moji/mjweather/voice/PlayerUtil;->a:Lcom/moji/mjweather/voice/VoicePlayer;
|
|
|
|
invoke-virtual {p1}, Lcom/moji/mjweather/voice/VoicePlayer;->c()V
|
|
|
|
.line 155
|
|
invoke-static {v0}, Lcom/moji/mjweather/voice/PlayerUtil;->a(Z)V
|
|
|
|
.line 156
|
|
invoke-static {}, Lorg/greenrobot/eventbus/EventBus;->a()Lorg/greenrobot/eventbus/EventBus;
|
|
|
|
move-result-object p1
|
|
|
|
new-instance v1, Lcom/moji/mjweather/voice/VoiceAnimationEvent;
|
|
|
|
invoke-direct {v1, v0}, Lcom/moji/mjweather/voice/VoiceAnimationEvent;-><init>(Z)V
|
|
|
|
invoke-virtual {p1, v1}, Lorg/greenrobot/eventbus/EventBus;->d(Ljava/lang/Object;)V
|
|
|
|
.line 157
|
|
invoke-static {p0}, Lcom/moji/mjweather/voice/PlayerUtil;->c(Landroid/content/Context;)V
|
|
|
|
goto/16 :goto_1
|
|
|
|
:cond_1
|
|
const-string p1, "tl"
|
|
|
|
const-string v1, "prepareVoiceFile"
|
|
|
|
.line 159
|
|
invoke-static {p1, v1}, Lcom/moji/tool/log/MJLogger;->b(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
.line 160
|
|
invoke-static {}, Lcom/moji/areamanagement/MJAreaManager;->a()Lcom/moji/common/area/AreaInfo;
|
|
|
|
move-result-object p1
|
|
|
|
const v1, 0x7f0e0a1d
|
|
|
|
if-nez p1, :cond_2
|
|
|
|
.line 162
|
|
invoke-static {p0, v1, v0}, Landroid/widget/Toast;->makeText(Landroid/content/Context;II)Landroid/widget/Toast;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-virtual {p0}, Landroid/widget/Toast;->show()V
|
|
|
|
.line 163
|
|
invoke-static {}, Lorg/greenrobot/eventbus/EventBus;->a()Lorg/greenrobot/eventbus/EventBus;
|
|
|
|
move-result-object p0
|
|
|
|
new-instance p1, Lcom/moji/mjweather/voice/VoiceAnimationEvent;
|
|
|
|
invoke-direct {p1, v0}, Lcom/moji/mjweather/voice/VoiceAnimationEvent;-><init>(Z)V
|
|
|
|
invoke-virtual {p0, p1}, Lorg/greenrobot/eventbus/EventBus;->d(Ljava/lang/Object;)V
|
|
|
|
return-void
|
|
|
|
.line 166
|
|
:cond_2
|
|
invoke-static {}, Lcom/moji/weatherprovider/provider/WeatherProvider;->b()Lcom/moji/weatherprovider/provider/WeatherProvider;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v2, p1}, Lcom/moji/weatherprovider/provider/WeatherProvider;->a(Lcom/moji/common/area/AreaInfo;)Lcom/moji/weatherprovider/data/Weather;
|
|
|
|
move-result-object p1
|
|
|
|
if-nez p1, :cond_3
|
|
|
|
.line 168
|
|
invoke-static {p0, v1, v0}, Landroid/widget/Toast;->makeText(Landroid/content/Context;II)Landroid/widget/Toast;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-virtual {p0}, Landroid/widget/Toast;->show()V
|
|
|
|
.line 169
|
|
invoke-static {}, Lorg/greenrobot/eventbus/EventBus;->a()Lorg/greenrobot/eventbus/EventBus;
|
|
|
|
move-result-object p0
|
|
|
|
new-instance p1, Lcom/moji/mjweather/voice/VoiceAnimationEvent;
|
|
|
|
invoke-direct {p1, v0}, Lcom/moji/mjweather/voice/VoiceAnimationEvent;-><init>(Z)V
|
|
|
|
invoke-virtual {p0, p1}, Lorg/greenrobot/eventbus/EventBus;->d(Ljava/lang/Object;)V
|
|
|
|
return-void
|
|
|
|
:cond_3
|
|
const-string p1, "audio"
|
|
|
|
.line 172
|
|
invoke-virtual {p0, p1}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
|
|
|
|
move-result-object p1
|
|
|
|
check-cast p1, Landroid/media/AudioManager;
|
|
|
|
const/4 v1, 0x3
|
|
|
|
.line 173
|
|
invoke-virtual {p1, v1}, Landroid/media/AudioManager;->getStreamVolume(I)I
|
|
|
|
move-result p1
|
|
|
|
if-nez p1, :cond_5
|
|
|
|
const p1, 0x7f0e0a27
|
|
|
|
.line 175
|
|
invoke-static {p0, p1, v0}, Landroid/widget/Toast;->makeText(Landroid/content/Context;II)Landroid/widget/Toast;
|
|
|
|
move-result-object p1
|
|
|
|
.line 176
|
|
invoke-static {}, Lcom/moji/tool/DeviceTool;->c()I
|
|
|
|
move-result v1
|
|
|
|
const/16 v2, 0x2d0
|
|
|
|
if-lt v1, v2, :cond_4
|
|
|
|
const/16 v2, 0x10
|
|
|
|
.line 178
|
|
div-int/lit8 v1, v1, 0x4
|
|
|
|
invoke-virtual {p1, v2, v0, v1}, Landroid/widget/Toast;->setGravity(III)V
|
|
|
|
.line 180
|
|
:cond_4
|
|
invoke-virtual {p1}, Landroid/widget/Toast;->show()V
|
|
|
|
.line 184
|
|
:cond_5
|
|
invoke-static {}, Lcom/moji/mjweather/voice/VoiceContentMgr;->a()Lcom/moji/mjweather/voice/VoiceContentMgr;
|
|
|
|
move-result-object p1
|
|
|
|
new-instance v1, Lcom/moji/mjweather/voice/PlayerUtil$4;
|
|
|
|
invoke-direct {v1, p0}, Lcom/moji/mjweather/voice/PlayerUtil$4;-><init>(Landroid/content/Context;)V
|
|
|
|
invoke-virtual {p1, p0, v0, v0, v1}, Lcom/moji/mjweather/voice/VoiceContentMgr;->a(Landroid/content/Context;ZZLcom/moji/mjweather/voice/VoiceContentMgr$OnPrepareFileListener;)V
|
|
:try_end_0
|
|
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
goto :goto_1
|
|
|
|
:catch_0
|
|
move-exception p0
|
|
|
|
const-string p1, "PlayerUtil"
|
|
|
|
.line 215
|
|
invoke-static {p1, p0}, Lcom/moji/tool/log/MJLogger;->a(Ljava/lang/String;Ljava/lang/Throwable;)V
|
|
|
|
:goto_1
|
|
return-void
|
|
.end method
|
|
|
|
.method public static a(Z)V
|
|
.locals 0
|
|
|
|
.line 38
|
|
sput-boolean p0, Lcom/moji/mjweather/voice/PlayerUtil;->b:Z
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method static b()V
|
|
.locals 1
|
|
|
|
.line 49
|
|
sget-object v0, Lcom/moji/mjweather/voice/PlayerUtil;->a:Lcom/moji/mjweather/voice/VoicePlayer;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 50
|
|
sget-object v0, Lcom/moji/mjweather/voice/PlayerUtil;->a:Lcom/moji/mjweather/voice/VoicePlayer;
|
|
|
|
invoke-virtual {v0}, Lcom/moji/mjweather/voice/VoicePlayer;->d()V
|
|
|
|
const/4 v0, 0x0
|
|
|
|
.line 51
|
|
sput-object v0, Lcom/moji/mjweather/voice/PlayerUtil;->a:Lcom/moji/mjweather/voice/VoicePlayer;
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public static b(Landroid/content/Context;)V
|
|
.locals 3
|
|
|
|
.line 135
|
|
sget-object v0, Lcom/moji/mjweather/voice/PlayerUtil;->a:Lcom/moji/mjweather/voice/VoicePlayer;
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
return-void
|
|
|
|
.line 138
|
|
:cond_0
|
|
sget-boolean v0, Lcom/moji/mjweather/voice/PlayerUtil;->b:Z
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
.line 139
|
|
sget-object v0, Lcom/moji/mjweather/voice/PlayerUtil;->a:Lcom/moji/mjweather/voice/VoicePlayer;
|
|
|
|
invoke-virtual {v0}, Lcom/moji/mjweather/voice/VoicePlayer;->c()V
|
|
|
|
const/4 v0, 0x0
|
|
|
|
.line 140
|
|
invoke-static {v0}, Lcom/moji/mjweather/voice/PlayerUtil;->a(Z)V
|
|
|
|
.line 141
|
|
invoke-static {}, Lorg/greenrobot/eventbus/EventBus;->a()Lorg/greenrobot/eventbus/EventBus;
|
|
|
|
move-result-object v1
|
|
|
|
new-instance v2, Lcom/moji/mjweather/voice/VoiceAnimationEvent;
|
|
|
|
invoke-direct {v2, v0}, Lcom/moji/mjweather/voice/VoiceAnimationEvent;-><init>(Z)V
|
|
|
|
invoke-virtual {v1, v2}, Lorg/greenrobot/eventbus/EventBus;->d(Ljava/lang/Object;)V
|
|
|
|
.line 142
|
|
invoke-static {p0}, Lcom/moji/mjweather/voice/PlayerUtil;->c(Landroid/content/Context;)V
|
|
|
|
:cond_1
|
|
return-void
|
|
.end method
|
|
|
|
.method static b(Landroid/content/Context;Lcom/moji/mjweather/voice/VoicePlayer$OnVoiceFinishedListener;)V
|
|
.locals 3
|
|
|
|
const-string v0, "PlayerUtil"
|
|
|
|
const-string v1, "startVoicePlayByAlarm"
|
|
|
|
.line 221
|
|
invoke-static {v0, v1}, Lcom/moji/tool/log/MJLogger;->c(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
.line 222
|
|
sget-object v0, Lcom/moji/mjweather/voice/PlayerUtil;->a:Lcom/moji/mjweather/voice/VoicePlayer;
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
.line 223
|
|
new-instance v0, Lcom/moji/mjweather/voice/VoicePlayer;
|
|
|
|
invoke-direct {v0, p0, p1}, Lcom/moji/mjweather/voice/VoicePlayer;-><init>(Landroid/content/Context;Lcom/moji/mjweather/voice/VoicePlayer$OnVoiceFinishedListener;)V
|
|
|
|
sput-object v0, Lcom/moji/mjweather/voice/PlayerUtil;->a:Lcom/moji/mjweather/voice/VoicePlayer;
|
|
|
|
goto :goto_0
|
|
|
|
.line 225
|
|
:cond_0
|
|
sget-object v0, Lcom/moji/mjweather/voice/PlayerUtil;->a:Lcom/moji/mjweather/voice/VoicePlayer;
|
|
|
|
invoke-virtual {v0, p1}, Lcom/moji/mjweather/voice/VoicePlayer;->a(Lcom/moji/mjweather/voice/VoicePlayer$OnVoiceFinishedListener;)V
|
|
|
|
.line 227
|
|
:goto_0
|
|
sget-object p1, Lcom/moji/mjweather/voice/PlayerUtil;->a:Lcom/moji/mjweather/voice/VoicePlayer;
|
|
|
|
invoke-virtual {p1}, Lcom/moji/mjweather/voice/VoicePlayer;->e()Z
|
|
|
|
move-result p1
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
const-string p0, "PlayerUtil"
|
|
|
|
const-string p1, "startVoicePlayByAlarm in playing state return"
|
|
|
|
.line 228
|
|
invoke-static {p0, p1}, Lcom/moji/tool/log/MJLogger;->c(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
return-void
|
|
|
|
.line 231
|
|
:cond_1
|
|
invoke-static {}, Lcom/moji/areamanagement/MJAreaManager;->a()Lcom/moji/common/area/AreaInfo;
|
|
|
|
move-result-object p1
|
|
|
|
const v0, 0x7f0e0a1d
|
|
|
|
const/4 v1, 0x0
|
|
|
|
if-nez p1, :cond_2
|
|
|
|
const-string p1, "PlayerUtil"
|
|
|
|
const-string v2, "current AreaInfo null play failed"
|
|
|
|
.line 233
|
|
invoke-static {p1, v2}, Lcom/moji/tool/log/MJLogger;->c(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
.line 234
|
|
invoke-static {p0, v0, v1}, Landroid/widget/Toast;->makeText(Landroid/content/Context;II)Landroid/widget/Toast;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-virtual {p0}, Landroid/widget/Toast;->show()V
|
|
|
|
.line 235
|
|
invoke-static {}, Lorg/greenrobot/eventbus/EventBus;->a()Lorg/greenrobot/eventbus/EventBus;
|
|
|
|
move-result-object p0
|
|
|
|
new-instance p1, Lcom/moji/mjweather/voice/VoiceAnimationEvent;
|
|
|
|
invoke-direct {p1, v1}, Lcom/moji/mjweather/voice/VoiceAnimationEvent;-><init>(Z)V
|
|
|
|
invoke-virtual {p0, p1}, Lorg/greenrobot/eventbus/EventBus;->d(Ljava/lang/Object;)V
|
|
|
|
return-void
|
|
|
|
.line 238
|
|
:cond_2
|
|
invoke-static {}, Lcom/moji/weatherprovider/provider/WeatherProvider;->b()Lcom/moji/weatherprovider/provider/WeatherProvider;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v2, p1}, Lcom/moji/weatherprovider/provider/WeatherProvider;->a(Lcom/moji/common/area/AreaInfo;)Lcom/moji/weatherprovider/data/Weather;
|
|
|
|
move-result-object p1
|
|
|
|
if-nez p1, :cond_3
|
|
|
|
const-string p1, "PlayerUtil"
|
|
|
|
const-string v2, "current weather data null play failed"
|
|
|
|
.line 240
|
|
invoke-static {p1, v2}, Lcom/moji/tool/log/MJLogger;->c(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
.line 241
|
|
invoke-static {p0, v0, v1}, Landroid/widget/Toast;->makeText(Landroid/content/Context;II)Landroid/widget/Toast;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-virtual {p0}, Landroid/widget/Toast;->show()V
|
|
|
|
.line 242
|
|
invoke-static {}, Lorg/greenrobot/eventbus/EventBus;->a()Lorg/greenrobot/eventbus/EventBus;
|
|
|
|
move-result-object p0
|
|
|
|
new-instance p1, Lcom/moji/mjweather/voice/VoiceAnimationEvent;
|
|
|
|
invoke-direct {p1, v1}, Lcom/moji/mjweather/voice/VoiceAnimationEvent;-><init>(Z)V
|
|
|
|
invoke-virtual {p0, p1}, Lorg/greenrobot/eventbus/EventBus;->d(Ljava/lang/Object;)V
|
|
|
|
return-void
|
|
|
|
.line 245
|
|
:cond_3
|
|
invoke-static {}, Lcom/moji/mjweather/voice/VoiceContentMgr;->a()Lcom/moji/mjweather/voice/VoiceContentMgr;
|
|
|
|
move-result-object p1
|
|
|
|
new-instance v0, Lcom/moji/mjweather/voice/PlayerUtil$5;
|
|
|
|
invoke-direct {v0, p0}, Lcom/moji/mjweather/voice/PlayerUtil$5;-><init>(Landroid/content/Context;)V
|
|
|
|
const/4 v1, 0x1
|
|
|
|
invoke-virtual {p1, p0, v1, v1, v0}, Lcom/moji/mjweather/voice/VoiceContentMgr;->a(Landroid/content/Context;ZZLcom/moji/mjweather/voice/VoiceContentMgr$OnPrepareFileListener;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method static synthetic c()Lcom/moji/mjweather/voice/VoicePlayer;
|
|
.locals 1
|
|
|
|
.line 25
|
|
sget-object v0, Lcom/moji/mjweather/voice/PlayerUtil;->a:Lcom/moji/mjweather/voice/VoicePlayer;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method private static c(Landroid/content/Context;)V
|
|
.locals 1
|
|
|
|
const-string v0, "notification"
|
|
|
|
.line 33
|
|
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/4 v0, 0x0
|
|
|
|
.line 34
|
|
invoke-virtual {p0, v0}, Landroid/app/NotificationManager;->cancel(I)V
|
|
|
|
return-void
|
|
.end method
|