Find new recognizer if old one is gone

Before, RecognitionManagerService just cleared the recognizer
setting, which the Settings app really doesn't like.

Bug: 6332933
Change-Id: If4f9b583c304c5ea99021dddda50fca55e3ac541
This commit is contained in:
Bjorn Bringert
2012-04-16 18:16:37 +01:00
parent 32f038deab
commit ddf322915b

View File

@ -75,7 +75,10 @@ public class RecognitionManagerService extends Binder {
try {
mContext.getPackageManager().getServiceInfo(comp, 0);
} catch (NameNotFoundException e) {
setCurRecognizer(null);
comp = findAvailRecognizer(null);
if (comp != null) {
setCurRecognizer(comp);
}
}
} else {
comp = findAvailRecognizer(null);