Loading services/java/com/android/server/SystemServer.java +7 −5 Original line number Diff line number Diff line Loading @@ -1331,11 +1331,13 @@ public final class SystemServer { traceEnd(); } if (mPackageManager.hasSystemFeature(PackageManager.FEATURE_VOICE_RECOGNIZERS)) { // We need to always start this service, regardless of whether the // FEATURE_VOICE_RECOGNIZERS feature is set, because it needs to take care // of initializing various settings. It will internally modify its behavior // based on that feature. traceBeginAndSlog("StartVoiceRecognitionManager"); mSystemServiceManager.startService(VOICE_RECOGNITION_MANAGER_SERVICE_CLASS); traceEnd(); } if (GestureLauncherService.isGestureLauncherEnabled(context.getResources())) { traceBeginAndSlog("StartGestureLauncher"); Loading services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerService.java +10 −5 Original line number Diff line number Diff line Loading @@ -183,7 +183,7 @@ public class VoiceInteractionManagerService extends SystemService { private final boolean mEnableService; VoiceInteractionManagerServiceStub() { mEnableService = shouldEnableService(mContext.getResources()); mEnableService = shouldEnableService(mContext); } // TODO: VI Make sure the caller is the current user or profile Loading Loading @@ -348,10 +348,15 @@ public class VoiceInteractionManagerService extends SystemService { } } private boolean shouldEnableService(Resources res) { // VoiceInteractionService should not be enabled on low ram devices unless it has the config flag. return !ActivityManager.isLowRamDeviceStatic() || getForceVoiceInteractionServicePackage(res) != null; 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 // voice interaction service. return (!ActivityManager.isLowRamDeviceStatic() && context.getPackageManager().hasSystemFeature( PackageManager.FEATURE_VOICE_RECOGNIZERS)) || getForceVoiceInteractionServicePackage(context.getResources()) != null; } private String getForceVoiceInteractionServicePackage(Resources res) { Loading Loading
services/java/com/android/server/SystemServer.java +7 −5 Original line number Diff line number Diff line Loading @@ -1331,11 +1331,13 @@ public final class SystemServer { traceEnd(); } if (mPackageManager.hasSystemFeature(PackageManager.FEATURE_VOICE_RECOGNIZERS)) { // We need to always start this service, regardless of whether the // FEATURE_VOICE_RECOGNIZERS feature is set, because it needs to take care // of initializing various settings. It will internally modify its behavior // based on that feature. traceBeginAndSlog("StartVoiceRecognitionManager"); mSystemServiceManager.startService(VOICE_RECOGNITION_MANAGER_SERVICE_CLASS); traceEnd(); } if (GestureLauncherService.isGestureLauncherEnabled(context.getResources())) { traceBeginAndSlog("StartGestureLauncher"); Loading
services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerService.java +10 −5 Original line number Diff line number Diff line Loading @@ -183,7 +183,7 @@ public class VoiceInteractionManagerService extends SystemService { private final boolean mEnableService; VoiceInteractionManagerServiceStub() { mEnableService = shouldEnableService(mContext.getResources()); mEnableService = shouldEnableService(mContext); } // TODO: VI Make sure the caller is the current user or profile Loading Loading @@ -348,10 +348,15 @@ public class VoiceInteractionManagerService extends SystemService { } } private boolean shouldEnableService(Resources res) { // VoiceInteractionService should not be enabled on low ram devices unless it has the config flag. return !ActivityManager.isLowRamDeviceStatic() || getForceVoiceInteractionServicePackage(res) != null; 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 // voice interaction service. return (!ActivityManager.isLowRamDeviceStatic() && context.getPackageManager().hasSystemFeature( PackageManager.FEATURE_VOICE_RECOGNIZERS)) || getForceVoiceInteractionServicePackage(context.getResources()) != null; } private String getForceVoiceInteractionServicePackage(Resources res) { Loading