From 7b92b12342aeb33db5e78a79058e49080fabe1ae Mon Sep 17 00:00:00 2001 From: James O'Leary Date: Tue, 9 Jul 2019 12:43:45 -0400 Subject: [PATCH] Don't tell Assistant to hide on gesture completion or cancel hide() is called by DefaultUiController itself when a gesture fails to complete, or when the gesture animation finishes. (see DefaultUiController.animateInvocationCompletion() and progress == 0 branch in DefaultUiController.onInvocationProgress()) hide() calls AssistManager.hideAssist(), which ultimately calls VoiceInteractionSession#onCloseSystemDialogs(). We don't intend to ask the assist app to close its UI when the gesture completes or when invocation progress == 0. Specifically, NgaUiController.hide /does not/ actually hide the assistant (just our UI), and therefore [DefaultUiController|GoogleDefaultUiController] shouldn't either. There are times where NgaUiController does tell the assistant to close, but they're specific to the NGA UI (e.g. there was a tap outside). Bug: 136153254 Test: Verify WAI Change-Id: I1cb9cb28a1009808e22571b2658f50f57b3e25b4 --- .../SystemUI/src/com/android/systemui/assist/AssistManager.java | 2 +- .../src/com/android/systemui/assist/ui/DefaultUiController.java | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/SystemUI/src/com/android/systemui/assist/AssistManager.java b/packages/SystemUI/src/com/android/systemui/assist/AssistManager.java index 97b6e7c584409..fe8cad2b55499 100644 --- a/packages/SystemUI/src/com/android/systemui/assist/AssistManager.java +++ b/packages/SystemUI/src/com/android/systemui/assist/AssistManager.java @@ -82,7 +82,7 @@ public class AssistManager implements ConfigurationChangedReceiver { void processBundle(Bundle hints); /** - * Hides the UI. + * Hides any SysUI for the assistant, but _does not_ close the assistant itself. */ void hide(); } diff --git a/packages/SystemUI/src/com/android/systemui/assist/ui/DefaultUiController.java b/packages/SystemUI/src/com/android/systemui/assist/ui/DefaultUiController.java index 662de3a5b5f5b..0c4f05123c792 100644 --- a/packages/SystemUI/src/com/android/systemui/assist/ui/DefaultUiController.java +++ b/packages/SystemUI/src/com/android/systemui/assist/ui/DefaultUiController.java @@ -118,7 +118,6 @@ public class DefaultUiController implements AssistManager.UiController { @Override // AssistManager.UiController public void hide() { - Dependency.get(AssistManager.class).hideAssist(); detach(); if (mInvocationAnimator.isRunning()) { mInvocationAnimator.cancel();