am 05f1f0ec: am 555b07df: am 2c64b539: am 596532d9: Properly initialize recognition service if the recognizer component changed.

* commit '05f1f0ece8f39e77c96825fb2e3451ebd388adad':
  Properly initialize recognition service if the recognizer component changed.
diff --git a/services/java/com/android/server/RecognitionManagerService.java b/services/java/com/android/server/RecognitionManagerService.java
index 1e0755d..c2e749d 100644
--- a/services/java/com/android/server/RecognitionManagerService.java
+++ b/services/java/com/android/server/RecognitionManagerService.java
@@ -89,17 +89,15 @@
     private void initForUser(int userHandle) {
         if (DEBUG) Slog.i(TAG, "initForUser user=" + userHandle);
         ComponentName comp = getCurRecognizer(userHandle);
+        ServiceInfo info = null;
         if (comp != null) {
-            // See if the current recognizer is no longer available.
+            // See if the current recognizer is still available.
             try {
-                mIPm.getServiceInfo(comp, 0, userHandle);
+                info = mIPm.getServiceInfo(comp, 0, userHandle);
             } catch (RemoteException e) {
-                comp = findAvailRecognizer(null, userHandle);
-                if (comp != null) {
-                    setCurRecognizer(comp, userHandle);
-                }
             }
-        } else {
+        }
+        if (info == null) {
             comp = findAvailRecognizer(null, userHandle);
             if (comp != null) {
                 setCurRecognizer(comp, userHandle);