Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6e81e69f authored by Omar Eissa's avatar Omar Eissa Committed by Markus S
Browse files

Allow resetting the voice recognition service if its package uninstalled

Previously, if voice interaction service is set on the device, and the
current voice recognition service package gets uninstalled, we were
returning early from onSomePackagesChanged preventing the logic of
resetting the current recognizer from being invoked.

Bug: 352024705
Test: Manual, uninstall voice recognition app and check adb shell settings get secure voice_recognition_service
Flag: EXEMPT CVE_FIX
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:e8d07dd802a9172e68a9a043804fe11c48180e7f)
Cherrypick-From: https://googleplex-android-review.googlesource.com/q/commit:f094607d69179f65e856eb766ebc7d1f6ca079f6
Merged-In: I563ad50dac05a019c2ce8b727b5e5744ba848cc0
Change-Id: I563ad50dac05a019c2ce8b727b5e5744ba848cc0
parent 5217a41b
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -1337,10 +1337,11 @@ public class VoiceInteractionManagerService extends SystemService {
                                switchImplementationIfNeededLocked(true);
                            }
                        }
                        return;
                    }

                    if (curAssistant != null) {
                    // If interactor isn't null, then we would have done the needed checks already
                    // in the above code.
                    if (curInteractor == null && curAssistant != null) {
                        int change = isPackageDisappearing(curAssistant.getPackageName());
                        if (change == PACKAGE_PERMANENT_CHANGE) {
                            // If the currently set assistant is being removed, then we should