summaryrefslogtreecommitdiffstats
path: root/core/java/android/service
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2015-07-01 13:41:03 -0700
committerDianne Hackborn <hackbod@google.com>2015-07-01 13:41:03 -0700
commit4e88bcd39918197c78b148afe40a08b6adcace1e (patch)
tree0a00e7b1ff8269d1fbab4edb591feaf8beb2d5a8 /core/java/android/service
parent80abf887a1578669d3167ea83d52a497a64ea491 (diff)
downloadframeworks_base-4e88bcd39918197c78b148afe40a08b6adcace1e.zip
frameworks_base-4e88bcd39918197c78b148afe40a08b6adcace1e.tar.gz
frameworks_base-4e88bcd39918197c78b148afe40a08b6adcace1e.tar.bz2
Fix issue #20672970: Notifications are not dismissed on hot word detection
Add new VoiceInteractionSession.closeSystemDialogs() API that closes everything except the session itself. Change-Id: If45f1e120d8ca095b6c8055b6485acb5e710820e
Diffstat (limited to 'core/java/android/service')
-rw-r--r--core/java/android/service/voice/VoiceInteractionSession.java15
1 files changed, 15 insertions, 0 deletions
diff --git a/core/java/android/service/voice/VoiceInteractionSession.java b/core/java/android/service/voice/VoiceInteractionSession.java
index 7eb936a..a7e0e08 100644
--- a/core/java/android/service/voice/VoiceInteractionSession.java
+++ b/core/java/android/service/voice/VoiceInteractionSession.java
@@ -1001,6 +1001,21 @@ public class VoiceInteractionSession implements KeyEvent.Callback, ComponentCall
}
/**
+ * Request that all system dialogs (and status bar shade etc) be closed, allowing
+ * access to the session's UI. This will <em>not</em> cause the lock screen to be
+ * dismissed.
+ */
+ public void closeSystemDialogs() {
+ if (mToken == null) {
+ throw new IllegalStateException("Can't call before onCreate()");
+ }
+ try {
+ mSystemService.closeSystemDialogs(mToken);
+ } catch (RemoteException e) {
+ }
+ }
+
+ /**
* Convenience for inflating views.
*/
public LayoutInflater getLayoutInflater() {