Loading services/voiceinteraction/java/com/android/server/soundtrigger/SoundTriggerService.java +2 −1 Original line number Original line Diff line number Diff line Loading @@ -687,6 +687,7 @@ public class SoundTriggerService extends SystemService { @Override @Override public int startRecognitionForService(ParcelUuid soundModelId, Bundle params, public int startRecognitionForService(ParcelUuid soundModelId, Bundle params, ComponentName detectionService, SoundTrigger.RecognitionConfig config) { ComponentName detectionService, SoundTrigger.RecognitionConfig config) { final UserHandle userHandle = Binder.getCallingUserHandle(); mEventLogger.enqueue(new SessionEvent(Type.START_RECOGNITION_SERVICE, mEventLogger.enqueue(new SessionEvent(Type.START_RECOGNITION_SERVICE, getUuid(soundModelId))); getUuid(soundModelId))); try (SafeCloseable ignored = ClearCallingIdentityContext.create()) { try (SafeCloseable ignored = ClearCallingIdentityContext.create()) { Loading @@ -699,7 +700,7 @@ public class SoundTriggerService extends SystemService { IRecognitionStatusCallback callback = IRecognitionStatusCallback callback = new RemoteSoundTriggerDetectionService(soundModelId.getUuid(), params, new RemoteSoundTriggerDetectionService(soundModelId.getUuid(), params, detectionService, Binder.getCallingUserHandle(), config); detectionService, userHandle, config); synchronized (mLock) { synchronized (mLock) { SoundModel soundModel = mLoadedModels.get(soundModelId.getUuid()); SoundModel soundModel = mLoadedModels.get(soundModelId.getUuid()); Loading Loading
services/voiceinteraction/java/com/android/server/soundtrigger/SoundTriggerService.java +2 −1 Original line number Original line Diff line number Diff line Loading @@ -687,6 +687,7 @@ public class SoundTriggerService extends SystemService { @Override @Override public int startRecognitionForService(ParcelUuid soundModelId, Bundle params, public int startRecognitionForService(ParcelUuid soundModelId, Bundle params, ComponentName detectionService, SoundTrigger.RecognitionConfig config) { ComponentName detectionService, SoundTrigger.RecognitionConfig config) { final UserHandle userHandle = Binder.getCallingUserHandle(); mEventLogger.enqueue(new SessionEvent(Type.START_RECOGNITION_SERVICE, mEventLogger.enqueue(new SessionEvent(Type.START_RECOGNITION_SERVICE, getUuid(soundModelId))); getUuid(soundModelId))); try (SafeCloseable ignored = ClearCallingIdentityContext.create()) { try (SafeCloseable ignored = ClearCallingIdentityContext.create()) { Loading @@ -699,7 +700,7 @@ public class SoundTriggerService extends SystemService { IRecognitionStatusCallback callback = IRecognitionStatusCallback callback = new RemoteSoundTriggerDetectionService(soundModelId.getUuid(), params, new RemoteSoundTriggerDetectionService(soundModelId.getUuid(), params, detectionService, Binder.getCallingUserHandle(), config); detectionService, userHandle, config); synchronized (mLock) { synchronized (mLock) { SoundModel soundModel = mLoadedModels.get(soundModelId.getUuid()); SoundModel soundModel = mLoadedModels.get(soundModelId.getUuid()); Loading