From f5c37eb3b7e7b377aa7adb7fce58006ee06bd450 Mon Sep 17 00:00:00 2001 From: Amith Yamasani Date: Mon, 23 May 2016 17:21:08 -0700 Subject: [PATCH] Use correct synchronization lock This is to fix an incorrect unregister() that was crashing the system server. The only way it could be happening is because of incorrect locking. So, hopefully this fixes it. Bug: 28813750 Change-Id: Ie3c47ffa3024a0c533e12db0d2d021df8fc0367a --- .../voiceinteraction/VoiceInteractionManagerService.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerService.java b/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerService.java index 57d68fd9e37eb..51f5899b6841c 100644 --- a/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerService.java +++ b/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerService.java @@ -1101,7 +1101,7 @@ public class VoiceInteractionManagerService extends SystemService { if (hit && doit) { // The user is force stopping our current interactor/recognizer. // Clear the current settings and restore default state. - synchronized (VoiceInteractionManagerService.this) { + synchronized (VoiceInteractionManagerServiceStub.this) { unloadAllKeyphraseModels(); if (mImpl != null) { mImpl.shutdownLocked(); @@ -1126,7 +1126,7 @@ public class VoiceInteractionManagerService extends SystemService { int userHandle = getChangingUserId(); if (DEBUG) Slog.d(TAG, "onSomePackagesChanged user=" + userHandle); - synchronized (VoiceInteractionManagerService.this) { + synchronized (VoiceInteractionManagerServiceStub.this) { ComponentName curInteractor = getCurInteractor(userHandle); ComponentName curRecognizer = getCurRecognizer(userHandle); if (curRecognizer == null) {