diff options
author | Bjorn Bringert <bringert@android.com> | 2012-04-16 18:16:37 +0100 |
---|---|---|
committer | Bjorn Bringert <bringert@android.com> | 2012-04-16 18:16:37 +0100 |
commit | ddf322915ba87ef0bf604406ae441c63b371fda0 (patch) | |
tree | bc90e868c6901eabc86bd3ad312b2e58dc08ea44 | |
parent | 32f038deabc516cb9e1420eee300a581c5692460 (diff) | |
download | frameworks_base-ddf322915ba87ef0bf604406ae441c63b371fda0.zip frameworks_base-ddf322915ba87ef0bf604406ae441c63b371fda0.tar.gz frameworks_base-ddf322915ba87ef0bf604406ae441c63b371fda0.tar.bz2 |
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
-rw-r--r-- | services/java/com/android/server/RecognitionManagerService.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/services/java/com/android/server/RecognitionManagerService.java b/services/java/com/android/server/RecognitionManagerService.java index 8e55512..85224d8 100644 --- a/services/java/com/android/server/RecognitionManagerService.java +++ b/services/java/com/android/server/RecognitionManagerService.java @@ -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); |