diff --git a/core/java/android/app/AppOpsManager.java b/core/java/android/app/AppOpsManager.java index 161b7313b8935..b85b1861aa025 100644 --- a/core/java/android/app/AppOpsManager.java +++ b/core/java/android/app/AppOpsManager.java @@ -7689,8 +7689,8 @@ public class AppOpsManager { if (code != OP_RECORD_AUDIO) { return false; } - final String voiceRecognitionComponent = Settings.Secure.getString( - context.getContentResolver(), Settings.Secure.VOICE_RECOGNITION_SERVICE); + final String voiceRecognitionComponent = Settings.Secure.getStringForUser( + context.getContentResolver(), Settings.Secure.VOICE_RECOGNITION_SERVICE, userId); final String voiceRecognitionServicePackageName = getComponentPackageNameFromString(voiceRecognitionComponent);