Merge "Shutdown hotword detection service when software hotword detector is shutdown" into sc-dev am: 870c4116c1 am: aa0b719c40

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15461817

Change-Id: I2d5ee271b6f24884baaf0db774a598340d787b38
diff --git a/core/java/android/service/voice/VoiceInteractionService.java b/core/java/android/service/voice/VoiceInteractionService.java
index 6a0fec7..f52c9ff 100644
--- a/core/java/android/service/voice/VoiceInteractionService.java
+++ b/core/java/android/service/voice/VoiceInteractionService.java
@@ -520,6 +520,12 @@
             // Ignore.
         }
 
+        try {
+            mSystemService.shutdownHotwordDetectionService();
+        } catch (Exception ex) {
+            // Ignore.
+        }
+
         mSoftwareHotwordDetector = null;
     }