summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerService.java15
1 files changed, 8 insertions, 7 deletions
diff --git a/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerService.java b/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerService.java
index bbf3d45d7c99..613c4ffceffc 100644
--- a/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerService.java
+++ b/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerService.java
@@ -371,14 +371,15 @@ public class VoiceInteractionManagerService extends SystemService {
}
private boolean shouldEnableService(Context context) {
- // VoiceInteractionService should not be enabled on any low RAM devices
- // or devices that have not declared the recognition feature, unless the
- // device's configuration has explicitly set the config flag for a fixed
+ // VoiceInteractionService should not be enabled on devices that have not declared the
+ // recognition feature (including low-ram devices where notLowRam="true" takes effect),
+ // unless the device's configuration has explicitly set the config flag for a fixed
// voice interaction service.
- return (!ActivityManager.isLowRamDeviceStatic()
- && context.getPackageManager().hasSystemFeature(
- PackageManager.FEATURE_VOICE_RECOGNIZERS)) ||
- getForceVoiceInteractionServicePackage(context.getResources()) != null;
+ if (getForceVoiceInteractionServicePackage(context.getResources()) != null) {
+ return true;
+ }
+ return context.getPackageManager()
+ .hasSystemFeature(PackageManager.FEATURE_VOICE_RECOGNIZERS);
}
private String getForceVoiceInteractionServicePackage(Resources res) {