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

Commit 6c10494f authored by Amith Yamasani's avatar Amith Yamasani Committed by android-build-merger
Browse files

Merge "Reinitialize voice interaction service on unlock" into nyc-dev am: ea61e63b am: 108a2896

am: b5f9d7f3

* commit 'b5f9d7f3':
  Reinitialize voice interaction service on unlock

Change-Id: I8be291db1a21c239286c3f23c70911e7f853b766
parents 23713601 b5f9d7f3
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -127,6 +127,12 @@ public class VoiceInteractionManagerService extends SystemService {
        mServiceStub.initForUser(userHandle);
    }

    @Override
    public void onUnlockUser(int userHandle) {
        mServiceStub.initForUser(userHandle);
        mServiceStub.switchImplementationIfNeeded(false);
    }

    @Override
    public void onSwitchUser(int userHandle) {
        mServiceStub.switchUser(userHandle);
@@ -362,6 +368,12 @@ public class VoiceInteractionManagerService extends SystemService {
            }
        }

        void switchImplementationIfNeeded(boolean force) {
            synchronized (this) {
                switchImplementationIfNeededLocked(force);
            }
        }

        void switchImplementationIfNeededLocked(boolean force) {
            if (!mSafeMode) {
                String curService = Settings.Secure.getStringForUser(