summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Matt Pietal <mpietal@google.com> 2020-06-08 11:02:10 -0400
committer Matt Pietal <mpietal@google.com> 2020-06-08 11:02:10 -0400
commitaa2e7f359db2237e1e9ea1ff6dc749275504c7c3 (patch)
treecf003ce2a7c26e19f2b12c5d66b80c45cb17e200
parentf909d9f0efb4b925bc5fe489579298a5d9d07715 (diff)
Controls UI - Close power menu on app open
Oops, forgot to close Bug: 154737944 Test: Use 'open app' from control not found Change-Id: I437a5ebb8fd3936b67f9682b7622dfc1e495ec3d
-rw-r--r--packages/SystemUI/src/com/android/systemui/controls/ui/StatusBehavior.kt2
1 files changed, 2 insertions, 0 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/controls/ui/StatusBehavior.kt b/packages/SystemUI/src/com/android/systemui/controls/ui/StatusBehavior.kt
index 6bf189744033..dac55378daca 100644
--- a/packages/SystemUI/src/com/android/systemui/controls/ui/StatusBehavior.kt
+++ b/packages/SystemUI/src/com/android/systemui/controls/ui/StatusBehavior.kt
@@ -19,6 +19,7 @@ package com.android.systemui.controls.ui
import android.app.AlertDialog
import android.app.PendingIntent
import android.content.DialogInterface
+import android.content.Intent
import android.content.pm.PackageManager
import android.service.controls.Control
import android.view.View
@@ -74,6 +75,7 @@ class StatusBehavior : Behavior {
DialogInterface.OnClickListener { dialog, _ ->
try {
cws.control?.getAppIntent()?.send()
+ context.sendBroadcast(Intent(Intent.ACTION_CLOSE_SYSTEM_DIALOGS))
} catch (e: PendingIntent.CanceledException) {
cvh.setTransientStatus(
cvh.context.resources.getString(R.string.controls_error_failed))