Fix voice settings to not be broken. :(
It was setting the wrong recognizer activity, so when you changed the voice interactor it would break the recognizer but at least it would reset to the default interactor at boot and not still be broken. :p Change-Id: Icfec4f11526528b821e5fd67a6519bf5874ea133
This commit is contained in:
@@ -136,10 +136,8 @@ public final class VoiceInputHelper {
|
||||
continue;
|
||||
}
|
||||
mAvailableInteractionInfos.add(new InteractionInfo(mContext.getPackageManager(), info));
|
||||
if (info.getRecognitionService() != null) {
|
||||
interactorRecognizers.add(new ComponentName(resolveInfo.serviceInfo.packageName,
|
||||
info.getRecognitionService()));
|
||||
}
|
||||
interactorRecognizers.add(new ComponentName(resolveInfo.serviceInfo.packageName,
|
||||
info.getRecognitionService()));
|
||||
}
|
||||
Collections.sort(mAvailableInteractionInfos);
|
||||
|
||||
|
@@ -146,12 +146,11 @@ public class VoiceInputSettings extends SettingsPreferenceFragment implements
|
||||
// Put the new value back into secure settings.
|
||||
Settings.Secure.putString(getActivity().getContentResolver(),
|
||||
Settings.Secure.VOICE_INTERACTION_SERVICE, key);
|
||||
// Eventually we will require that an interactor always specify a recognizer
|
||||
if (info.settings != null) {
|
||||
Settings.Secure.putString(getActivity().getContentResolver(),
|
||||
Settings.Secure.VOICE_RECOGNITION_SERVICE,
|
||||
info.settings.flattenToShortString());
|
||||
}
|
||||
Settings.Secure.putString(getActivity().getContentResolver(),
|
||||
Settings.Secure.VOICE_RECOGNITION_SERVICE,
|
||||
new ComponentName(info.service.packageName,
|
||||
info.serviceInfo.getRecognitionService())
|
||||
.flattenToShortString());
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user