Loading java/src/com/android/inputmethod/accessibility/KeyCodeDescriptionMapper.java +2 −1 Original line number Diff line number Diff line Loading @@ -346,7 +346,8 @@ final class KeyCodeDescriptionMapper { } // TODO: Remove this method once TTS supports emoticon verbalization. private String getSpokenEmoticonDescription(final Context context, final String outputText) { private static String getSpokenEmoticonDescription(final Context context, final String outputText) { final StringBuilder sb = new StringBuilder(SPOKEN_EMOTICON_RESOURCE_NAME_PREFIX); final int textLength = outputText.length(); for (int index = 0; index < textLength; index = outputText.offsetByCodePoints(index, 1)) { Loading java/src/com/android/inputmethod/accessibility/KeyboardAccessibilityNodeProvider.java +1 −2 Original line number Diff line number Diff line Loading @@ -329,9 +329,8 @@ final class KeyboardAccessibilityNodeProvider<KV extends KeyboardView> if (currentSettings.isWordSeparator(key.getCode())) { return mAccessibilityUtils.getAutoCorrectionDescription( keyCodeDescription, shouldObscure); } else { return keyCodeDescription; } return keyCodeDescription; } /** Loading java/src/com/android/inputmethod/compat/CompatUtils.java +1 −1 Original line number Diff line number Diff line Loading @@ -144,7 +144,7 @@ public final class CompatUtils { public <T> ToObjectMethodWrapper<T> getMethod(final String name, final T defaultValue, final Class<?>... parameterTypes) { return new ToObjectMethodWrapper<T>(CompatUtils.getMethod(mClass, name, parameterTypes), return new ToObjectMethodWrapper<>(CompatUtils.getMethod(mClass, name, parameterTypes), defaultValue); } Loading java/src/com/android/inputmethod/compat/CursorAnchorInfoCompatWrapper.java +1 −1 Original line number Diff line number Diff line Loading @@ -46,7 +46,7 @@ public class CursorAnchorInfoCompatWrapper { */ public static final int FLAG_IS_RTL = 0x04; private CursorAnchorInfoCompatWrapper() { CursorAnchorInfoCompatWrapper() { // This class is not publicly instantiable. } Loading java/src/com/android/inputmethod/compat/LocaleSpanCompatUtils.java +10 −16 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ package com.android.inputmethod.compat; import android.text.Spannable; import android.text.Spanned; import android.text.style.LocaleSpan; import android.util.Log; Loading Loading @@ -127,13 +128,13 @@ public final class LocaleSpanCompatUtils { final int spanFlag = spannable.getSpanFlags(existingLocaleSpan); if (spanStart < newStart) { newStart = spanStart; isStartExclusive = ((spanFlag & Spannable.SPAN_EXCLUSIVE_EXCLUSIVE) == Spannable.SPAN_EXCLUSIVE_EXCLUSIVE); isStartExclusive = ((spanFlag & Spanned.SPAN_EXCLUSIVE_EXCLUSIVE) == Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); } if (newEnd < spanEnd) { newEnd = spanEnd; isEndExclusive = ((spanFlag & Spannable.SPAN_EXCLUSIVE_EXCLUSIVE) == Spannable.SPAN_EXCLUSIVE_EXCLUSIVE); isEndExclusive = ((spanFlag & Spanned.SPAN_EXCLUSIVE_EXCLUSIVE) == Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); } existingLocaleSpansToBeMerged.add(existingLocaleSpan); } Loading Loading @@ -201,24 +202,17 @@ public final class LocaleSpanCompatUtils { private static int getSpanFlag(final int originalFlag, final boolean isStartExclusive, final boolean isEndExclusive) { return (originalFlag & ~Spannable.SPAN_POINT_MARK_MASK) | return (originalFlag & ~Spanned.SPAN_POINT_MARK_MASK) | getSpanPointMarkFlag(isStartExclusive, isEndExclusive); } private static int getSpanPointMarkFlag(final boolean isStartExclusive, final boolean isEndExclusive) { if (isStartExclusive) { if (isEndExclusive) { return Spannable.SPAN_EXCLUSIVE_EXCLUSIVE; } else { return Spannable.SPAN_EXCLUSIVE_INCLUSIVE; } } else { if (isEndExclusive) { return Spannable.SPAN_INCLUSIVE_EXCLUSIVE; } else { return Spannable.SPAN_INCLUSIVE_INCLUSIVE; } return isEndExclusive ? Spanned.SPAN_EXCLUSIVE_EXCLUSIVE : Spanned.SPAN_EXCLUSIVE_INCLUSIVE; } return isEndExclusive ? Spanned.SPAN_INCLUSIVE_EXCLUSIVE : Spanned.SPAN_INCLUSIVE_INCLUSIVE; } } Loading
java/src/com/android/inputmethod/accessibility/KeyCodeDescriptionMapper.java +2 −1 Original line number Diff line number Diff line Loading @@ -346,7 +346,8 @@ final class KeyCodeDescriptionMapper { } // TODO: Remove this method once TTS supports emoticon verbalization. private String getSpokenEmoticonDescription(final Context context, final String outputText) { private static String getSpokenEmoticonDescription(final Context context, final String outputText) { final StringBuilder sb = new StringBuilder(SPOKEN_EMOTICON_RESOURCE_NAME_PREFIX); final int textLength = outputText.length(); for (int index = 0; index < textLength; index = outputText.offsetByCodePoints(index, 1)) { Loading
java/src/com/android/inputmethod/accessibility/KeyboardAccessibilityNodeProvider.java +1 −2 Original line number Diff line number Diff line Loading @@ -329,9 +329,8 @@ final class KeyboardAccessibilityNodeProvider<KV extends KeyboardView> if (currentSettings.isWordSeparator(key.getCode())) { return mAccessibilityUtils.getAutoCorrectionDescription( keyCodeDescription, shouldObscure); } else { return keyCodeDescription; } return keyCodeDescription; } /** Loading
java/src/com/android/inputmethod/compat/CompatUtils.java +1 −1 Original line number Diff line number Diff line Loading @@ -144,7 +144,7 @@ public final class CompatUtils { public <T> ToObjectMethodWrapper<T> getMethod(final String name, final T defaultValue, final Class<?>... parameterTypes) { return new ToObjectMethodWrapper<T>(CompatUtils.getMethod(mClass, name, parameterTypes), return new ToObjectMethodWrapper<>(CompatUtils.getMethod(mClass, name, parameterTypes), defaultValue); } Loading
java/src/com/android/inputmethod/compat/CursorAnchorInfoCompatWrapper.java +1 −1 Original line number Diff line number Diff line Loading @@ -46,7 +46,7 @@ public class CursorAnchorInfoCompatWrapper { */ public static final int FLAG_IS_RTL = 0x04; private CursorAnchorInfoCompatWrapper() { CursorAnchorInfoCompatWrapper() { // This class is not publicly instantiable. } Loading
java/src/com/android/inputmethod/compat/LocaleSpanCompatUtils.java +10 −16 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ package com.android.inputmethod.compat; import android.text.Spannable; import android.text.Spanned; import android.text.style.LocaleSpan; import android.util.Log; Loading Loading @@ -127,13 +128,13 @@ public final class LocaleSpanCompatUtils { final int spanFlag = spannable.getSpanFlags(existingLocaleSpan); if (spanStart < newStart) { newStart = spanStart; isStartExclusive = ((spanFlag & Spannable.SPAN_EXCLUSIVE_EXCLUSIVE) == Spannable.SPAN_EXCLUSIVE_EXCLUSIVE); isStartExclusive = ((spanFlag & Spanned.SPAN_EXCLUSIVE_EXCLUSIVE) == Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); } if (newEnd < spanEnd) { newEnd = spanEnd; isEndExclusive = ((spanFlag & Spannable.SPAN_EXCLUSIVE_EXCLUSIVE) == Spannable.SPAN_EXCLUSIVE_EXCLUSIVE); isEndExclusive = ((spanFlag & Spanned.SPAN_EXCLUSIVE_EXCLUSIVE) == Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); } existingLocaleSpansToBeMerged.add(existingLocaleSpan); } Loading Loading @@ -201,24 +202,17 @@ public final class LocaleSpanCompatUtils { private static int getSpanFlag(final int originalFlag, final boolean isStartExclusive, final boolean isEndExclusive) { return (originalFlag & ~Spannable.SPAN_POINT_MARK_MASK) | return (originalFlag & ~Spanned.SPAN_POINT_MARK_MASK) | getSpanPointMarkFlag(isStartExclusive, isEndExclusive); } private static int getSpanPointMarkFlag(final boolean isStartExclusive, final boolean isEndExclusive) { if (isStartExclusive) { if (isEndExclusive) { return Spannable.SPAN_EXCLUSIVE_EXCLUSIVE; } else { return Spannable.SPAN_EXCLUSIVE_INCLUSIVE; } } else { if (isEndExclusive) { return Spannable.SPAN_INCLUSIVE_EXCLUSIVE; } else { return Spannable.SPAN_INCLUSIVE_INCLUSIVE; } return isEndExclusive ? Spanned.SPAN_EXCLUSIVE_EXCLUSIVE : Spanned.SPAN_EXCLUSIVE_INCLUSIVE; } return isEndExclusive ? Spanned.SPAN_INCLUSIVE_EXCLUSIVE : Spanned.SPAN_INCLUSIVE_INCLUSIVE; } }