This CL converts 19 test classes under com.android.inputmethod.latin
to Android Testing Support Library.
Bug: 110805255
Test: verified as follows. No new test failures.
tapas adb LatinIME LatinIMETests arm64 userdebug && \
DISABLE_PROGUARD=true make -j LatinIME && \
adb install -r $OUT/system/app/LatinIME/LatinIME.apk && \
atest LatinIMETests:com.android.inputmethod.latin
Change-Id: I878fcae0126f57c43a644af341e5a0a8ac8f5cc9
implementation DictionaryFacilitatorImpl.java and add a java-overridable
factory DictionaryFacilitatorProvider.java used to create a
DictionaryFacilitator.
Change-Id: Id4a58ae31feaa4d12a048a772c8d76ff82fdee45
Attempt to use dictionary facilitor without invoking
preference manager. Instead use account from settings only when
things are being reset/changed. Discussion forked from ag/591663
Overall, the idea here is to maintain an account information
inside dictionary groups. Reset the dictionary groups if
account changes (the way we do for locale). Since only user
history dictionary is currently affected, the check to reset user
history dictionary also includes the check to verify the account.
For other things remain the same.
SettingsValues holds the current account (and is updated if prefs change
due to change in account settings). The updated settings are then
propagated to dictionary facilitator via LatinIME#loadSettings.
Bug:18104749,18469539
Change-Id: I553e776e7ea125d0fb7a1fe70a4c7eb0b2277fb8
Add API to ExpandableBinaryDictionary to dump content
from a given dictionary. We use this for dumping data
for sync process.
Refactored UserHistoryDictionaryTests to scrap out the util
methods for testing. These utility methods would be used
for testing sync + user dictionary code in LatinIMEGoogleTests
Bug:18106539
Change-Id: I357f9192ea1bd69a526d0b620c25616a2e8e9d5b
UserHistoryDictionary currently uses locale to determine the
UserHistoryDictionary on the filesystem. With this change we
use the account name as well. Thus each UserHistoryDictionary
would following the following spec:
UserHistoryDictionary.<locale>.<account>.dict.
In case no account is selected, we default to the existing
spec:
UserHistoryDictionary.<locale>.dict
Example
UserHistoryDictionary.en_US.testaccount@example.com.dict
Bug: 18104749
Change-Id: Iab031e166b55cf2ded68275a7e9be22475737b37
This CL fixes the following compiler warnings.
- Indirect access to static member
- Access to a non-accessible member of an enclosing type
- Parameter assignment
- Method can be static
- Local variable declaration hides another field or variable
- Value of local variable is not used
- Unused import
- Unused private member
- Unnecessary 'else' statement
- Unnecessary declaration of throw exception
- Redundant type arguments
- Missing '@Override' annotation
- Unused '@SuppressWarning' annotations
Bug: 18003991
Change-Id: Icfebe753e53a2cc621848f769d6a3d7ce501ebc7
clearAndFlushDictionary() was needed when dictionaries are constructed
in java side. All expandable dictionaries now use native code; thus,
this method is same to clear() and no longer needed.
Bug: 13755213
Change-Id: Ifd836e64f8ff807930f7cd2319b103b65e8fce70