summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2015-07-27 18:11:14 -0700
committerDianne Hackborn <hackbod@google.com>2015-07-28 12:52:11 -0700
commit57dd737443a174379eb638450e4888500d8e4a23 (patch)
treeac0750125c23a5e1e932e93407b421b5c397775a /services
parente827c2525a6b76c130d2b877fbcdcf62b0ce42eb (diff)
downloadframeworks_base-57dd737443a174379eb638450e4888500d8e4a23.zip
frameworks_base-57dd737443a174379eb638450e4888500d8e4a23.tar.gz
frameworks_base-57dd737443a174379eb638450e4888500d8e4a23.tar.bz2
Work on issue #21516866: Implement voice interaction in ResolverActivity
The main change here is to not allow the dialog to go in to its "focus on the last app the user selected" when running in voice interaction mode, instead just always giving a simple list. This also fixes some problems with cleaning up active commands when an activity finishes and not forcing the current session to go away when the screen is turned off. Also added some debug help, having activity print the state of the voice interactor. Change-Id: Ifebee9c74d78398a730a280bb4970f47789dadf5
Diffstat (limited to 'services')
-rw-r--r--services/core/java/com/android/server/dreams/DreamController.java4
-rw-r--r--services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerServiceImpl.java2
2 files changed, 4 insertions, 2 deletions
diff --git a/services/core/java/com/android/server/dreams/DreamController.java b/services/core/java/com/android/server/dreams/DreamController.java
index 8105675..206cc8a 100644
--- a/services/core/java/com/android/server/dreams/DreamController.java
+++ b/services/core/java/com/android/server/dreams/DreamController.java
@@ -65,7 +65,7 @@ final class DreamController {
private final Intent mDreamingStoppedIntent = new Intent(Intent.ACTION_DREAMING_STOPPED)
.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY);
- private final Intent mCloseNotificationShadeIntent = new Intent(Intent.ACTION_CLOSE_SYSTEM_DIALOGS);
+ private final Intent mCloseNotificationShadeIntent;
private DreamRecord mCurrentDream;
@@ -92,6 +92,8 @@ final class DreamController {
mHandler = handler;
mListener = listener;
mIWindowManager = WindowManagerGlobal.getWindowManagerService();
+ mCloseNotificationShadeIntent = new Intent(Intent.ACTION_CLOSE_SYSTEM_DIALOGS);
+ mCloseNotificationShadeIntent.putExtra("reason", "dream");
}
public void dump(PrintWriter pw) {
diff --git a/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerServiceImpl.java b/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerServiceImpl.java
index a4facc1..28520be 100644
--- a/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerServiceImpl.java
+++ b/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerServiceImpl.java
@@ -72,7 +72,7 @@ class VoiceInteractionManagerServiceImpl implements VoiceInteractionSessionConne
public void onReceive(Context context, Intent intent) {
if (Intent.ACTION_CLOSE_SYSTEM_DIALOGS.equals(intent.getAction())) {
String reason = intent.getStringExtra("reason");
- if (!CLOSE_REASON_VOICE_INTERACTION.equals(reason)) {
+ if (!CLOSE_REASON_VOICE_INTERACTION.equals(reason) && !"dream".equals(reason)) {
synchronized (mLock) {
if (mActiveSession != null && mActiveSession.mSession != null) {
try {