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

Commit 0c8d5ca0 authored by Jean Chalard's avatar Jean Chalard
Browse files

Fix Eclipse warnings.

This change is only there to fix warning issued by Eclipse.
It should have absolutely no impact on the program logic.

Change-Id: Ie0e242ac6c167297d33de19902340b0f6ecae9e1
parent 4556de4b
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -118,7 +118,7 @@ public class InputMethodManagerCompatWrapper {
        }
        Object retval = CompatUtils.invoke(mImm, null, METHOD_getEnabledInputMethodSubtypeList,
                (imi != null ? imi.getInputMethodInfo() : null), allowsImplicitlySelectedSubtypes);
        if (retval == null || !(retval instanceof List) || ((List<?>)retval).isEmpty()) {
        if (retval == null || !(retval instanceof List<?>) || ((List<?>)retval).isEmpty()) {
            if (!FORCE_ENABLE_VOICE_EVEN_WITH_NO_VOICE_SUBTYPES) {
                // Returns an empty list
                return Collections.emptyList();
@@ -137,7 +137,7 @@ public class InputMethodManagerCompatWrapper {
            }
            return subtypeList;
        }
        return CompatUtils.copyInputMethodSubtypeListToWrapper((List<?>)retval);
        return CompatUtils.copyInputMethodSubtypeListToWrapper(retval);
    }

    private InputMethodInfoCompatWrapper getLatinImeInputMethodInfo() {
@@ -159,7 +159,7 @@ public class InputMethodManagerCompatWrapper {
    public Map<InputMethodInfoCompatWrapper, List<InputMethodSubtypeCompatWrapper>>
            getShortcutInputMethodsAndSubtypes() {
        Object retval = CompatUtils.invoke(mImm, null, METHOD_getShortcutInputMethodsAndSubtypes);
        if (retval == null || !(retval instanceof Map) || ((Map<?, ?>)retval).isEmpty()) {
        if (retval == null || !(retval instanceof Map<?, ?>) || ((Map<?, ?>)retval).isEmpty()) {
            if (!FORCE_ENABLE_VOICE_EVEN_WITH_NO_VOICE_SUBTYPES) {
                // Returns an empty map
                return Collections.emptyMap();
+6 −6
Original line number Diff line number Diff line
@@ -754,15 +754,15 @@ public class VoiceProxy implements VoiceInput.UiListener {
    }

    public static class VoiceLoggerWrapper {
        private static final VoiceLoggerWrapper sInstance = new VoiceLoggerWrapper();
        private static final VoiceLoggerWrapper sLoggerWrapperInstance = new VoiceLoggerWrapper();
        private VoiceInputLogger mLogger;

        public static VoiceLoggerWrapper getInstance(Context context) {
            if (sInstance.mLogger == null) {
            if (sLoggerWrapperInstance.mLogger == null) {
                // Not thread safe, but it's ok.
                sInstance.mLogger = VoiceInputLogger.getLogger(context);
                sLoggerWrapperInstance.mLogger = VoiceInputLogger.getLogger(context);
            }
            return sInstance;
            return sLoggerWrapperInstance;
        }

        // private for the singleton
@@ -795,10 +795,10 @@ public class VoiceProxy implements VoiceInput.UiListener {
    }

    public static class VoiceInputWrapper {
        private static final VoiceInputWrapper sInstance = new VoiceInputWrapper();
        private static final VoiceInputWrapper sInputWrapperInstance = new VoiceInputWrapper();
        private VoiceInput mVoiceInput;
        public static VoiceInputWrapper getInstance() {
            return sInstance;
            return sInputWrapperInstance;
        }
        public void setVoiceInput(VoiceInput voiceInput, SubtypeSwitcher switcher) {
            if (mVoiceInput == null && voiceInput != null) {
+1 −4
Original line number Diff line number Diff line
@@ -16,7 +16,6 @@

package com.android.inputmethod.deprecated.languageswitcher;

import com.android.inputmethod.compat.InputMethodSubtypeCompatWrapper;
import com.android.inputmethod.latin.LatinIME;
import com.android.inputmethod.latin.LatinImeLogger;
import com.android.inputmethod.latin.Settings;
@@ -38,6 +37,7 @@ import java.util.Locale;
public class LanguageSwitcher {
    private static final String TAG = LanguageSwitcher.class.getSimpleName();

    @SuppressWarnings("unused")
    private static final String KEYBOARD_MODE = "keyboard";
    private static final String[] EMPTY_STIRNG_ARRAY = new String[0];

@@ -154,7 +154,6 @@ public class LanguageSwitcher {
    /**
     * Returns the currently selected input locale, or the display locale if no specific
     * locale was selected for input.
     * @return
     */
    public Locale getInputLocale() {
        if (getLocaleCount() == 0) return mDefaultInputLocale;
@@ -175,7 +174,6 @@ public class LanguageSwitcher {
    /**
     * Returns the next input locale in the list. Wraps around to the beginning of the
     * list if we're at the end of the list.
     * @return
     */
    public Locale getNextInputLocale() {
        if (getLocaleCount() == 0) return mDefaultInputLocale;
@@ -201,7 +199,6 @@ public class LanguageSwitcher {
    /**
     * Returns the previous input locale in the list. Wraps around to the end of the
     * list if we're at the beginning of the list.
     * @return
     */
    public Locale getPrevInputLocale() {
        if (getLocaleCount() == 0) return mDefaultInputLocale;
+0 −1
Original line number Diff line number Diff line
@@ -17,7 +17,6 @@
package com.android.inputmethod.deprecated.voice;

import com.android.common.speech.LoggingEvents;
import com.android.common.userhappiness.UserHappinessSignals;
import com.android.inputmethod.deprecated.compat.VoiceInputLoggerCompatUtils;

import android.content.Context;
+1 −1
Original line number Diff line number Diff line
@@ -145,7 +145,7 @@ public class BinaryDictionary extends Dictionary {
     * @param context application context for reading resources
     * @param dicTypeId the type of the dictionary being created, out of the list in Suggest.DIC_*
     * @param locale the locale for which to create the dictionary
     * @param fallBackResId the id of the resource to use as a fallback if no pack is found
     * @param fallbackResId the id of the resource to use as a fallback if no pack is found
     * @return an initialized instance of BinaryDictionary
     */
    public static BinaryDictionary initDictionaryFromManager(Context context, int dicTypeId,
Loading