IME switcher visibility should ignore aux IMEs.

With this CL, the number of enabled auxiliary IME subtypes such as voice
IME is no longer taken into account for the IME switcher visibility.

Bug: 25432652
Change-Id: Iadec2950568d7174797306797791d2f69c2bfdd6
diff --git a/services/core/java/com/android/server/InputMethodManagerService.java b/services/core/java/com/android/server/InputMethodManagerService.java
index cd9086d..7b45c0f 100644
--- a/services/core/java/com/android/server/InputMethodManagerService.java
+++ b/services/core/java/com/android/server/InputMethodManagerService.java
@@ -178,7 +178,6 @@
     static final int SECURE_SUGGESTION_SPANS_MAX_SIZE = 20;
 
     private static final int NOT_A_SUBTYPE_ID = InputMethodUtils.NOT_A_SUBTYPE_ID;
-    private static final String TAG_TRY_SUPPRESSING_IME_SWITCHER = "TrySuppressingImeSwitcher";
 
 
     final Context mContext;
@@ -1705,9 +1704,6 @@
         if (N > 2) return true;
         if (N < 1) return false;
         int nonAuxCount = 0;
-        int auxCount = 0;
-        InputMethodSubtype nonAuxSubtype = null;
-        InputMethodSubtype auxSubtype = null;
         for(int i = 0; i < N; ++i) {
             final InputMethodInfo imi = imis.get(i);
             final List<InputMethodSubtype> subtypes =
@@ -1720,25 +1716,10 @@
                     final InputMethodSubtype subtype = subtypes.get(j);
                     if (!subtype.isAuxiliary()) {
                         ++nonAuxCount;
-                        nonAuxSubtype = subtype;
-                    } else {
-                        ++auxCount;
-                        auxSubtype = subtype;
                     }
                 }
             }
-        }
-        if (nonAuxCount > 1 || auxCount > 1) {
-            return true;
-        } else if (nonAuxCount == 1 && auxCount == 1) {
-            if (nonAuxSubtype != null && auxSubtype != null
-                    && (nonAuxSubtype.getLocale().equals(auxSubtype.getLocale())
-                            || auxSubtype.overridesImplicitlyEnabledSubtype()
-                            || nonAuxSubtype.overridesImplicitlyEnabledSubtype())
-                    && nonAuxSubtype.containsExtraValueKey(TAG_TRY_SUPPRESSING_IME_SWITCHER)) {
-                return false;
-            }
-            return true;
+            if (nonAuxCount > 1) return true;
         }
         return false;
     }