Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5fd5aa3d authored by Satoshi Kataoka's avatar Satoshi Kataoka
Browse files

Fix compatibility issue on InputMethodSubtype

Bug: 11032428
Change-Id: If722bbbfb69d00e1830007582d46a33319203eea
parent 48d2bcf2
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -534,6 +534,13 @@ public final class InputMethodSubtype implements Parcelable {
    private static int hashCodeInternal(String locale, String mode, String extraValue,
            boolean isAuxiliary, boolean overridesImplicitlyEnabledSubtype,
            boolean isAsciiCapable) {
        // CAVEAT: Must revisit how to compute needsToCalculateCompatibleHashCode when a new
        // attribute is added in order to avoid enabled subtypes being unexpectedly disabled.
        final boolean needsToCalculateCompatibleHashCode = !isAsciiCapable;
        if (needsToCalculateCompatibleHashCode) {
            return Arrays.hashCode(new Object[] {locale, mode, extraValue, isAuxiliary,
                    overridesImplicitlyEnabledSubtype});
        }
        return Arrays.hashCode(new Object[] {locale, mode, extraValue, isAuxiliary,
                overridesImplicitlyEnabledSubtype, isAsciiCapable});
    }