diff options
Diffstat (limited to 'java')
-rw-r--r-- | java/proguard.flags | 4 | ||||
-rw-r--r-- | java/res/xml/key_styles_currency.xml | 28 | ||||
-rw-r--r-- | java/res/xml/key_styles_currency_dollar.xml | 12 | ||||
-rw-r--r-- | java/res/xml/key_styles_currency_euro.xml | 14 | ||||
-rw-r--r-- | java/src/com/android/inputmethod/latin/ResearchLogger.java | 12 | ||||
-rw-r--r-- | java/src/com/android/inputmethod/latin/define/ProductionFlag.java | 21 | ||||
-rw-r--r-- | java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerService.java | 6 |
7 files changed, 71 insertions, 26 deletions
diff --git a/java/proguard.flags b/java/proguard.flags index 701786a84..e33706c47 100644 --- a/java/proguard.flags +++ b/java/proguard.flags @@ -47,6 +47,10 @@ <init>(...); } +-keep class com.android.inputmethod.latin.ResearchLogger { + void setLogFileManager(...); +} + # The support library contains references to newer platform versions. # Don't warn about those in case this app is linking against an older # platform version. We know about them, and they are safe. diff --git a/java/res/xml/key_styles_currency.xml b/java/res/xml/key_styles_currency.xml index 9dec7afcc..bd1d959e4 100644 --- a/java/res/xml/key_styles_currency.xml +++ b/java/res/xml/key_styles_currency.xml @@ -79,23 +79,27 @@ <case latin:languageCode="iw" > + <!-- U+20AA: "₪" NEW SHEQEL SIGN + U+00A3: "£" POUND SIGN + U+20AC: "€" EURO SIGN + U+00A2: "¢" CENT SIGN --> <key-style latin:styleName="currencyKeyStyle" - latin:keyLabel="₪" + latin:keyLabel="₪" latin:moreKeys="@string/more_keys_for_currency_general" /> <key-style latin:styleName="moreCurrency1KeyStyle" - latin:keyLabel="£" /> + latin:keyLabel="£" /> <key-style latin:styleName="moreCurrency2KeyStyle" - latin:keyLabel="€" /> + latin:keyLabel="€" /> <key-style latin:styleName="moreCurrency3KeyStyle" latin:keyLabel="$" - latin:moreKeys="¢" /> + latin:moreKeys="¢" /> <key-style latin:styleName="moreCurrency4KeyStyle" - latin:keyLabel="¢" /> + latin:keyLabel="¢" /> </case> <case latin:languageCode="fa" @@ -127,23 +131,27 @@ <case latin:countryCode="GB" > + <!-- U+00A3: "£" POUND SIGN + U+20AC: "€" EURO SIGN + U+00A5: "¥" YEN SIGN + U+00A2: "¢" CENT SIGN --> <key-style latin:styleName="currencyKeyStyle" - latin:keyLabel="£" + latin:keyLabel="£" latin:moreKeys="@string/more_keys_for_currency_pound" /> <key-style latin:styleName="moreCurrency1KeyStyle" - latin:keyLabel="€" /> + latin:keyLabel="€" /> <key-style latin:styleName="moreCurrency2KeyStyle" - latin:keyLabel="¥" /> + latin:keyLabel="¥" /> <key-style latin:styleName="moreCurrency3KeyStyle" latin:keyLabel="$" - latin:moreKeys="¢" /> + latin:moreKeys="¢" /> <key-style latin:styleName="moreCurrency4KeyStyle" - latin:keyLabel="¢" /> + latin:keyLabel="¢" /> </case> <default> <include diff --git a/java/res/xml/key_styles_currency_dollar.xml b/java/res/xml/key_styles_currency_dollar.xml index d5dca2afa..8dd849879 100644 --- a/java/res/xml/key_styles_currency_dollar.xml +++ b/java/res/xml/key_styles_currency_dollar.xml @@ -19,20 +19,24 @@ --> <merge xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"> + <!-- U+00A3: "£" POUND SIGN + U+00A2: "¢" CENT SIGN + U+20AC: "€" EURO SIGN + U+00A5: "¥" YEN SIGN --> <key-style latin:styleName="currencyKeyStyle" latin:keyLabel="$" latin:moreKeys="@string/more_keys_for_currency_dollar" /> <key-style latin:styleName="moreCurrency1KeyStyle" - latin:keyLabel="£" /> + latin:keyLabel="£" /> <key-style latin:styleName="moreCurrency2KeyStyle" - latin:keyLabel="¢" /> + latin:keyLabel="¢" /> <key-style latin:styleName="moreCurrency3KeyStyle" - latin:keyLabel="€" /> + latin:keyLabel="€" /> <key-style latin:styleName="moreCurrency4KeyStyle" - latin:keyLabel="¥" /> + latin:keyLabel="¥" /> </merge> diff --git a/java/res/xml/key_styles_currency_euro.xml b/java/res/xml/key_styles_currency_euro.xml index 6edddf074..0573e0991 100644 --- a/java/res/xml/key_styles_currency_euro.xml +++ b/java/res/xml/key_styles_currency_euro.xml @@ -19,21 +19,25 @@ --> <merge xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"> + <!-- U+20AC: "€" EURO SIGN + U+00A3: "£" POUND SIGN + U+00A5: "¥" YEN SIGN + U+00A2: "¢" CENT SIGN --> <key-style latin:styleName="currencyKeyStyle" - latin:keyLabel="€" + latin:keyLabel="€" latin:moreKeys="@string/more_keys_for_currency_euro" /> <key-style latin:styleName="moreCurrency1KeyStyle" - latin:keyLabel="£" /> + latin:keyLabel="£" /> <key-style latin:styleName="moreCurrency2KeyStyle" - latin:keyLabel="¥" /> + latin:keyLabel="¥" /> <key-style latin:styleName="moreCurrency3KeyStyle" latin:keyLabel="$" - latin:moreKeys="¢" /> + latin:moreKeys="¢" /> <key-style latin:styleName="moreCurrency4KeyStyle" - latin:keyLabel="¢" /> + latin:keyLabel="¢" /> </merge> diff --git a/java/src/com/android/inputmethod/latin/ResearchLogger.java b/java/src/com/android/inputmethod/latin/ResearchLogger.java index 6ba9118d6..3b110bd78 100644 --- a/java/src/com/android/inputmethod/latin/ResearchLogger.java +++ b/java/src/com/android/inputmethod/latin/ResearchLogger.java @@ -49,7 +49,7 @@ public class ResearchLogger implements SharedPreferences.OnSharedPreferenceChang private static final ResearchLogger sInstance = new ResearchLogger(new LogFileManager()); public static boolean sIsLogging = false; - private final Handler mLoggingHandler; + /* package */ final Handler mLoggingHandler; private InputMethodService mIms; private final Date mDate; private final SimpleDateFormat mDateFormat; @@ -183,11 +183,13 @@ public class ResearchLogger implements SharedPreferences.OnSharedPreferenceChang } /** - * Change to a different logFileManager. Will not allow it to be set to null. + * Change to a different logFileManager. + * + * @throws IllegalArgumentException if logFileManager is null */ - /* package */ void setLogFileManager(ResearchLogger.LogFileManager manager) { + void setLogFileManager(LogFileManager manager) { if (manager == null) { - Log.w(TAG, "warning: trying to set null logFileManager. ignoring."); + throw new IllegalArgumentException("warning: trying to set null logFileManager"); } else { mLogFileManager = manager; } @@ -241,8 +243,6 @@ public class ResearchLogger implements SharedPreferences.OnSharedPreferenceChang sb.append('\t'); sb.append(x); sb.append('\t'); sb.append(y); write(LogGroup.KEY, sb.toString()); - - LatinImeLogger.onPrintAllUsabilityStudyLogs(); } public void logCorrection(String subgroup, String before, String after, int position) { diff --git a/java/src/com/android/inputmethod/latin/define/ProductionFlag.java b/java/src/com/android/inputmethod/latin/define/ProductionFlag.java new file mode 100644 index 000000000..cfb1d09cc --- /dev/null +++ b/java/src/com/android/inputmethod/latin/define/ProductionFlag.java @@ -0,0 +1,21 @@ +/* + * Copyright (C) 2012 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ + +package com.android.inputmethod.latin.define; + +public class ProductionFlag { + public static final boolean IS_EXPERIMENTAL = false; +} diff --git a/java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerService.java b/java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerService.java index cd34ba832..5a173857e 100644 --- a/java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerService.java +++ b/java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerService.java @@ -353,6 +353,11 @@ public class AndroidSpellCheckerService extends SpellCheckerService @Override public boolean onUnbind(final Intent intent) { + closeAllDictionaries(); + return false; + } + + private void closeAllDictionaries() { final Map<String, DictionaryPool> oldPools = mDictionaryPools; mDictionaryPools = Collections.synchronizedMap(new TreeMap<String, DictionaryPool>()); final Map<String, Dictionary> oldUserDictionaries = mUserDictionaries; @@ -378,7 +383,6 @@ public class AndroidSpellCheckerService extends SpellCheckerService dictToClose.close(); } } - return false; } private DictionaryPool getDictionaryPool(final String locale) { |