.method public dispatchKeyEvent(Landroid/view/KeyEvent;)Z
.registers 12 # Changed from 11 to 12 registers
.param p1, "event" # Landroid/view/KeyEvent;
.line 346
invoke-virtual {p1}, Landroid/view/KeyEvent;->getAction()I
move-result v0
const/4 v1, 0x0
const/4 v2, 0x1
if-nez v0, :cond_a
move v0, v2
goto :goto_b
:cond_a
move v0, v1
.line 347
.local v0, "isDown":Z
:goto_b
invoke-virtual {p1}, Landroid/view/KeyEvent;->getKeyCode()I
move-result v3
.line 349
.local v3, "keyCode":I
const/16 v4, 0x12
if-ne v3, v4, :cond_8c # Changed to :cond_8c
if-nez v0, :cond_8c # Changed to :cond_8c
iget-object v4, p0, Lcom/android/systemui/statusbar/phone/NotificationShadeWindowViewController$2;->this$0:Lcom/android/systemui/statusbar/phone/NotificationShadeWindowViewController;
invoke-static {v4}, Lcom/android/systemui/statusbar/phone/NotificationShadeWindowViewController;->access$300(Lcom/android/systemui/statusbar/phone/NotificationShadeWindowViewController;)Lcom/android/systemui/statusbar/phone/StatusBar;
move-result-object v4
invoke-virtual {v4}, Lcom/android/systemui/statusbar/phone/StatusBar;->isDeviceInteractive()Z
move-result v4
if-eqz v4, :cond_8c # Changed to :cond_8c
# New keyguard check added here
iget-object v4, p0, Lcom/android/systemui/statusbar/phone/NotificationShadeWindowViewController$2;->this$0:Lcom/android/systemui/statusbar/phone/NotificationShadeWindowViewController;
invoke-static {v4}, Lcom/android/systemui/statusbar/phone/NotificationShadeWindowViewController;->access$300(Lcom/android/systemui/statusbar/phone/NotificationShadeWindowViewController;)Lcom/android/systemui/statusbar/phone/StatusBar;
move-result-object v4
invoke-virtual {v4}, Lcom/android/systemui/statusbar/phone/StatusBar;->isKeyguardShowing()Z
move-result v4
if-nez v4, :cond_2d
goto/16 :goto_8c # Skip if not on keyguard
.line 350
:cond_2d
iget-object v4, p0, Lcom/android/systemui/statusbar/phone/NotificationShadeWindowViewController$2;->this$0:Lcom/android/systemui/statusbar/phone/NotificationShadeWindowViewController;
invoke-static {v4}, Lcom/android/systemui/statusbar/phone/NotificationShadeWindowViewController;->access$200(Lcom/android/systemui/statusbar/phone/NotificationShadeWindowViewController;)Lcom/android/systemui/statusbar/phone/NotificationShadeWindowView;
move-result-object v4
invoke-virtual {v4}, Landroid/widget/FrameLayout;->getContext()Landroid/content/Context;
move-result-object v4
.line 351
.local v4, "context":Landroid/content/Context;
const-string v5, "audio"
invoke-virtual {v4, v5}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
move-result-object v5
check-cast v5, Landroid/media/AudioManager;
.line 352
.local v5, "audioManager":Landroid/media/AudioManager;
invoke-virtual {v5}, Landroid/media/AudioManager;->getRingerMode()I
move-result v6
.line 354
.local v6, "currentMode":I
const/4 v7, 0x2
if-ne v6, v7, :cond_4a
.line 355
invoke-virtual {v5, v2}, Landroid/media/AudioManager;->setRingerMode(I)V
goto/16 :goto_8b
:cond_4a
if-ne v6, v2, :cond_87
.line 359
invoke-virtual {v5, v7}, Landroid/media/AudioManager;->setRingerMode(I)V
.line 360
invoke-virtual {v5, v1}, Landroid/media/AudioManager;->setRingerMode(I)V
.line 362
const-string v8, "notification"
invoke-virtual {v4, v8}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
move-result-object v8
check-cast v8, Landroid/app/NotificationManager;
.line 364
.local v8, "notificationManager":Landroid/app/NotificationManager;
invoke-virtual {v8, v2}, Landroid/app/NotificationManager;->setInterruptionFilter(I)V
.line 366
const-wide/16 p0, 0x64
:try_start_5f
invoke-static {p0, p1}, Ljava/lang/Thread;->sleep(J)V
:try_end_62
.catch Ljava/lang/InterruptedException; {:try_start_5f .. :try_end_62} :catch_63
.line 368
goto :goto_64
.line 367
:catch_63
move-exception p0
.line 370
:goto_64
invoke-virtual {v5}, Landroid/media/AudioManager;->getRingerMode()I
move-result p0
.line 371
.local p0, "newMode":I
if-eqz p0, :cond_8b
if-ne p0, v2, :cond_6f
if-ne p0, v7, :cond_7c
goto :goto_8b
:cond_6f
new-instance v0, Landroid/content/Intent;
const-string v8, "com.custom.ringer.TOGGLE_RINGER"
invoke-direct {v0, v8}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V
invoke-virtual {v4, v0}, Landroid/content/Context;->sendBroadcast(Landroid/content/Intent;)V
new-instance v0, Landroid/content/Intent;
const-string v8, "com.custom.ringer.TOGGLE_RINGER"
invoke-direct {v0, v8}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V
invoke-virtual {v4, v0}, Landroid/content/Context;->sendBroadcast(Landroid/content/Intent;)V
goto :goto_8b
:cond_7c
new-instance v0, Landroid/content/Intent;
const-string v8, "com.custom.ringer.TOGGLE_RINGER"
invoke-direct {v0, v8}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V
invoke-virtual {v4, v0}, Landroid/content/Context;->sendBroadcast(Landroid/content/Intent;)V
.line 375
.end local v8 # "notificationManager":Landroid/app/NotificationManager;
.end local p0 # "newMode":I
.end local p1 # "event":Landroid/view/KeyEvent;
goto :goto_8b
.line 380
:cond_87
invoke-virtual {v5, v7}, Landroid/media/AudioManager;->setRingerMode(I)V
goto :goto_8b
.line 389
.end local v4 # "context":Landroid/content/Context;
.end local v5 # "audioManager":Landroid/media/AudioManager;
.end local v6 # "currentMode":I
:cond_8b
:goto_8b
return v2
.line 389
:cond_8c # New label for skipped cases
:goto_8c
const/4 v4, 0x4
if-eq v3, v4, :cond_db
const/16 v4, 0x3e
if-eq v3, v4, :cond_cd
const/16 v4, 0x52
if-eq v3, v4, :cond_c0
const/16 v0, 0x18
if-eq v3, v0, :cond_a0
const/16 v0, 0x19
if-eq v3, v0, :cond_a0
goto :goto_da
.line 365
:cond_a0
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/NotificationShadeWindowViewController$2;->this$0:Lcom/android/systemui/statusbar/phone/NotificationShadeWindowViewController;
invoke-static {v0}, Lcom/android/systemui/statusbar/phone/NotificationShadeWindowViewController;->access$1400(Lcom/android/systemui/statusbar/phone/NotificationShadeWindowViewController;)Lcom/android/systemui/statusbar/SysuiStatusBarStateController;
move-result-object v0
invoke-interface {v0}, Lcom/android/systemui/plugins/statusbar/StatusBarStateController;->isDozing()Z
move-result v0
if-eqz v0, :cond_da
.line 366
iget-object p0, p0, Lcom/android/systemui/statusbar/phone/NotificationShadeWindowViewController$2;->this$0:Lcom/android/systemui/statusbar/phone/NotificationShadeWindowViewController;
invoke-static {p0}, Lcom/android/systemui/statusbar/phone/NotificationShadeWindowViewController;->access$200(Lcom/android/systemui/statusbar/phone/NotificationShadeWindowViewController;)Lcom/android/systemui/statusbar/phone/NotificationShadeWindowView;
move-result-object p0
invoke-virtual {p0}, Landroid/widget/FrameLayout;->getContext()Landroid/content/Context;
move-result-object p0
invoke-static {p0}, Landroid/media/session/MediaSessionLegacyHelper;->getHelper(Landroid/content/Context;)Landroid/media/session/MediaSessionLegacyHelper;
move-result-object p0
const/high16 v0, -0x80000000
.line 367
invoke-virtual {p0, p1, v0, v2}, Landroid/media/session/MediaSessionLegacyHelper;->sendVolumeKeyEvent(Landroid/view/KeyEvent;IZ)V
return v2
:cond_c0
if-nez v0, :cond_da
.line 355
iget-object p0, p0, Lcom/android/systemui/statusbar/phone/NotificationShadeWindowViewController$2;->this$0:Lcom/android/systemui/statusbar/phone/NotificationShadeWindowViewController;
invoke-static {p0}, Lcom/android/systemui/statusbar/phone/NotificationShadeWindowViewController;->access$300(Lcom/android/systemui/statusbar/phone/NotificationShadeWindowViewController;)Lcom/android/systemui/statusbar/phone/StatusBar;
move-result-object p0
invoke-virtual {p0}, Lcom/android/systemui/statusbar/phone/StatusBar;->onMenuPressed()Z
move-result p0
return p0
:cond_cd
if-nez v0, :cond_da
.line 360
iget-object p0, p0, Lcom/android/systemui/statusbar/phone/NotificationShadeWindowViewController$2;->this$0:Lcom/android/systemui/statusbar/phone/NotificationShadeWindowViewController;
invoke-static {p0}, Lcom/android/systemui/statusbar/phone/NotificationShadeWindowViewController;->access$300(Lcom/android/systemui/statusbar/phone/NotificationShadeWindowViewController;)Lcom/android/systemui/statusbar/phone/StatusBar;
move-result-object p0
invoke-virtual {p0}, Lcom/android/systemui/statusbar/phone/StatusBar;->onSpacePressed()Z
move-result p0
return p0
:cond_da
:goto_da
return v1
:cond_db
if-nez v0, :cond_e6
.line 350
iget-object p0, p0, Lcom/android/systemui/statusbar/phone/NotificationShadeWindowViewController$2;->this$0:Lcom/android/systemui/statusbar/phone/NotificationShadeWindowViewController;
invoke-static {p0}, Lcom/android/systemui/statusbar/phone/NotificationShadeWindowViewController;->access$300(Lcom/android/systemui/statusbar/phone/NotificationShadeWindowViewController;)Lcom/android/systemui/statusbar/phone/StatusBar;
move-result-object p0
invoke-virtual {p0}, Lcom/android/systemui/statusbar/phone/StatusBar;->onBackPressed()Z
:cond_e6
return v2
.end method