diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..037fe92
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,7 @@
+# Gradle
+.externalNativeBuild/
+.gradle/
+.idea/
+LatinIME.iml
+build/
+local.properties
diff --git a/Android.bp b/Android.bp
new file mode 100644
index 0000000..3abd6c1
--- /dev/null
+++ b/Android.bp
@@ -0,0 +1,39 @@
+// Copyright (C) 2018 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.
+
+filegroup {
+    name: "dicttool_deps",
+    srcs: [
+        "java/src/com/android/inputmethod/latin/makedict/**/*.java",
+
+        // Dependencies for Dicttool. Most of these files are needed by BinaryDictionary.java. Note that
+        // a significant part of the dependencies are mocked in the compat/ directory, with empty or
+        // nearly-empty implementations, for parts that we don't use in Dicttool.
+        "java/src/com/android/inputmethod/latin/BinaryDictionary.java",
+        "java/src/com/android/inputmethod/latin/DicTraverseSession.java",
+        "java/src/com/android/inputmethod/latin/Dictionary.java",
+        "java/src/com/android/inputmethod/latin/NgramContext.java",
+        "java/src/com/android/inputmethod/latin/SuggestedWords.java",
+        "java/src/com/android/inputmethod/latin/settings/SettingsValuesForSuggestion.java",
+        "java/src/com/android/inputmethod/latin/utils/BinaryDictionaryUtils.java",
+        "java/src/com/android/inputmethod/latin/utils/CombinedFormatUtils.java",
+        "java/src/com/android/inputmethod/latin/utils/JniUtils.java",
+
+        "java/src/com/android/inputmethod/latin/define/DebugFlags.java",
+        "java/src/com/android/inputmethod/latin/define/DecoderSpecificConstants.java",
+
+        "tests/src/com/android/inputmethod/latin/utils/ByteArrayDictBuffer.java",
+        "tests/src/com/android/inputmethod/latin/makedict/**/*.java",
+    ],
+}
diff --git a/Android.mk b/Android.mk
deleted file mode 100644
index 17eeba8..0000000
--- a/Android.mk
+++ /dev/null
@@ -1,16 +0,0 @@
-# Copyright (C) 2013 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.
-
-subdirs := common native java tests tools
-include $(call all-named-subdir-makefiles, $(subdirs))
diff --git a/CleanSpec.mk b/CleanSpec.mk
index be13c30..98df622 100644
--- a/CleanSpec.mk
+++ b/CleanSpec.mk
@@ -52,6 +52,9 @@
 $(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/SHARED_LIBRARIES/libjni_latinime_intermediates)
 $(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/SHARED_LIBRARIES/libjni_latinime_intermediates)
 $(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/SHARED_LIBRARIES/libjni_latinime_intermediates)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/app/LatinIME)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib*/libjni_latinime.so)
+
 # ************************************************
 # NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST
 # ************************************************
diff --git a/java/MODULE_LICENSE_APACHE2 b/MODULE_LICENSE_APACHE2
similarity index 100%
rename from java/MODULE_LICENSE_APACHE2
rename to MODULE_LICENSE_APACHE2
diff --git a/NOTICE b/NOTICE
new file mode 100644
index 0000000..aa32554
--- /dev/null
+++ b/NOTICE
@@ -0,0 +1,192 @@
+
+   Copyright (c) 2008, 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.
+
+   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.
+
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+
+Includes Dictionaries © Lexiteria LLC.  Used by permission.
diff --git a/OWNERS b/OWNERS
new file mode 100644
index 0000000..3d48518
--- /dev/null
+++ b/OWNERS
@@ -0,0 +1,6 @@
+# Recommended reviewers for general changes.
+# takaoka@google.com
+# yukawa@google.com
+#
+# Recommended reviewers for non-trivial build rule changes.
+# dwillemsen@google.com
diff --git a/build.gradle b/build.gradle
new file mode 100644
index 0000000..ab631c0
--- /dev/null
+++ b/build.gradle
@@ -0,0 +1,110 @@
+buildscript {
+    repositories {
+        google()
+        jcenter()
+    }
+    dependencies {
+        classpath 'com.android.tools.build:gradle:3.2.0-beta03'
+    }
+}
+
+apply plugin: 'com.android.application'
+
+android {
+    compileSdkVersion 28
+    buildToolsVersion '28.0.0'
+
+    // Required if using classes in android.test.runner
+    useLibrary 'android.test.runner'
+
+    // Required if using classes in android.test.base
+    useLibrary 'android.test.base'
+
+    // Required if using classes in android.test.mock
+    useLibrary 'android.test.mock'
+
+    defaultConfig {
+        minSdkVersion 21
+        targetSdkVersion 28
+        versionName "1.0"
+
+        applicationId 'com.android.inputmethod.latin'
+        testApplicationId 'com.android.inputmethod.latin.tests'
+        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
+        vectorDrawables.useSupportLibrary = false
+
+        signingConfig signingConfigs.debug
+    }
+
+    signingConfigs {
+        debug {
+            storeFile file("java/shared.keystore")
+        }
+    }
+
+    buildTypes {
+        debug {
+            minifyEnabled false
+        }
+        release {
+            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard.flags'
+        }
+    }
+
+    compileOptions {
+        sourceCompatibility JavaVersion.VERSION_1_8
+        targetCompatibility JavaVersion.VERSION_1_8
+    }
+
+    flavorDimensions "default"
+
+    sourceSets {
+        main {
+            res.srcDirs = ['java/res']
+            java.srcDirs = ['common/src', 'java/src']
+            manifest.srcFile 'java/AndroidManifest.xml'
+        }
+
+        androidTest {
+            res.srcDirs = ['tests/res']
+            java.srcDirs = ['tests/src']
+            manifest.srcFile "tests/AndroidManifest.xml"
+        }
+    }
+
+    lintOptions {
+        checkReleaseBuilds false
+    }
+
+    aaptOptions {
+        noCompress 'dict'
+    }
+
+    externalNativeBuild {
+        ndkBuild {
+            path 'native/jni/Android.mk'
+        }
+    }
+}
+
+repositories {
+    maven { url "../../../prebuilts/fullsdk-darwin/extras/android/m2repository" }
+    maven { url "../../../prebuilts/fullsdk-linux/extras/android/m2repository" }
+    mavenCentral()
+    google()
+    jcenter()
+}
+
+dependencies {
+    implementation 'androidx.legacy:legacy-support-v4:+'
+    implementation 'com.google.code.findbugs:jsr305:3.0.2'
+
+    testImplementation 'junit:junit:4.12'
+    androidTestImplementation "org.mockito:mockito-core:1.9.5"
+    androidTestImplementation 'com.google.dexmaker:dexmaker:1.2'
+    androidTestImplementation 'com.google.dexmaker:dexmaker-mockito:1.2'
+    androidTestImplementation 'com.android.support.test:runner:1.0.2'
+    androidTestImplementation 'com.android.support.test:rules:1.0.2'
+    androidTestImplementation 'com.android.support.test.uiautomator:uiautomator-v18:2.1.3'
+    androidTestImplementation "com.android.support:support-annotations:27.1.1"
+}
diff --git a/common/Android.bp b/common/Android.bp
new file mode 100644
index 0000000..925eef7
--- /dev/null
+++ b/common/Android.bp
@@ -0,0 +1,21 @@
+// Copyright (C) 2014 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.
+
+java_library {
+    name: "latinime-common",
+    host_supported: true,
+    srcs: ["src/**/*.java"],
+    static_libs: ["jsr305"],
+    sdk_version: "21",
+}
diff --git a/common/Android.mk b/common/Android.mk
deleted file mode 100644
index 132a223..0000000
--- a/common/Android.mk
+++ /dev/null
@@ -1,28 +0,0 @@
-# Copyright (C) 2014 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.
-
-LOCAL_PATH := $(call my-dir)
-include $(CLEAR_VARS)
-LOCAL_MODULE := latinime-common
-LOCAL_SRC_FILES := $(call all-java-files-under, src)
-LOCAL_STATIC_JAVA_LIBRARIES := jsr305
-LOCAL_SDK_VERSION := 21
-include $(BUILD_STATIC_JAVA_LIBRARY)
-
-# Also build a host side library
-include $(CLEAR_VARS)
-LOCAL_MODULE := latinime-common-host
-LOCAL_SRC_FILES := $(call all-java-files-under, src)
-LOCAL_STATIC_JAVA_LIBRARIES := jsr305lib
-include $(BUILD_HOST_JAVA_LIBRARY)
diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar
new file mode 100644
index 0000000..13372ae
--- /dev/null
+++ b/gradle/wrapper/gradle-wrapper.jar
Binary files differ
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
new file mode 100644
index 0000000..33c5632
--- /dev/null
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,6 @@
+#Sat Jun 23 15:45:27 PDT 2018
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip
diff --git a/gradlew b/gradlew
new file mode 100755
index 0000000..9d82f78
--- /dev/null
+++ b/gradlew
@@ -0,0 +1,160 @@
+#!/usr/bin/env bash
+
+##############################################################################
+##
+##  Gradle start up script for UN*X
+##
+##############################################################################
+
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+DEFAULT_JVM_OPTS=""
+
+APP_NAME="Gradle"
+APP_BASE_NAME=`basename "$0"`
+
+# Use the maximum available, or set MAX_FD != -1 to use that value.
+MAX_FD="maximum"
+
+warn ( ) {
+    echo "$*"
+}
+
+die ( ) {
+    echo
+    echo "$*"
+    echo
+    exit 1
+}
+
+# OS specific support (must be 'true' or 'false').
+cygwin=false
+msys=false
+darwin=false
+case "`uname`" in
+  CYGWIN* )
+    cygwin=true
+    ;;
+  Darwin* )
+    darwin=true
+    ;;
+  MINGW* )
+    msys=true
+    ;;
+esac
+
+# Attempt to set APP_HOME
+# Resolve links: $0 may be a link
+PRG="$0"
+# Need this for relative symlinks.
+while [ -h "$PRG" ] ; do
+    ls=`ls -ld "$PRG"`
+    link=`expr "$ls" : '.*-> \(.*\)$'`
+    if expr "$link" : '/.*' > /dev/null; then
+        PRG="$link"
+    else
+        PRG=`dirname "$PRG"`"/$link"
+    fi
+done
+SAVED="`pwd`"
+cd "`dirname \"$PRG\"`/" >/dev/null
+APP_HOME="`pwd -P`"
+cd "$SAVED" >/dev/null
+
+CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
+
+# Determine the Java command to use to start the JVM.
+if [ -n "$JAVA_HOME" ] ; then
+    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+        # IBM's JDK on AIX uses strange locations for the executables
+        JAVACMD="$JAVA_HOME/jre/sh/java"
+    else
+        JAVACMD="$JAVA_HOME/bin/java"
+    fi
+    if [ ! -x "$JAVACMD" ] ; then
+        die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+    fi
+else
+    JAVACMD="java"
+    which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+fi
+
+# Increase the maximum file descriptors if we can.
+if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
+    MAX_FD_LIMIT=`ulimit -H -n`
+    if [ $? -eq 0 ] ; then
+        if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
+            MAX_FD="$MAX_FD_LIMIT"
+        fi
+        ulimit -n $MAX_FD
+        if [ $? -ne 0 ] ; then
+            warn "Could not set maximum file descriptor limit: $MAX_FD"
+        fi
+    else
+        warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
+    fi
+fi
+
+# For Darwin, add options to specify how the application appears in the dock
+if $darwin; then
+    GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
+fi
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin ; then
+    APP_HOME=`cygpath --path --mixed "$APP_HOME"`
+    CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
+    JAVACMD=`cygpath --unix "$JAVACMD"`
+
+    # We build the pattern for arguments to be converted via cygpath
+    ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
+    SEP=""
+    for dir in $ROOTDIRSRAW ; do
+        ROOTDIRS="$ROOTDIRS$SEP$dir"
+        SEP="|"
+    done
+    OURCYGPATTERN="(^($ROOTDIRS))"
+    # Add a user-defined pattern to the cygpath arguments
+    if [ "$GRADLE_CYGPATTERN" != "" ] ; then
+        OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
+    fi
+    # Now convert the arguments - kludge to limit ourselves to /bin/sh
+    i=0
+    for arg in "$@" ; do
+        CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
+        CHECK2=`echo "$arg"|egrep -c "^-"`                                 ### Determine if an option
+
+        if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then                    ### Added a condition
+            eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
+        else
+            eval `echo args$i`="\"$arg\""
+        fi
+        i=$((i+1))
+    done
+    case $i in
+        (0) set -- ;;
+        (1) set -- "$args0" ;;
+        (2) set -- "$args0" "$args1" ;;
+        (3) set -- "$args0" "$args1" "$args2" ;;
+        (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
+        (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
+        (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
+        (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
+        (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
+        (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
+    esac
+fi
+
+# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
+function splitJvmOpts() {
+    JVM_OPTS=("$@")
+}
+eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
+JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
+
+exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
diff --git a/gradlew.bat b/gradlew.bat
new file mode 100644
index 0000000..aec9973
--- /dev/null
+++ b/gradlew.bat
@@ -0,0 +1,90 @@
+@if "%DEBUG%" == "" @echo off
+@rem ##########################################################################
+@rem
+@rem  Gradle startup script for Windows
+@rem
+@rem ##########################################################################
+
+@rem Set local scope for the variables with windows NT shell
+if "%OS%"=="Windows_NT" setlocal
+
+@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+set DEFAULT_JVM_OPTS=
+
+set DIRNAME=%~dp0
+if "%DIRNAME%" == "" set DIRNAME=.
+set APP_BASE_NAME=%~n0
+set APP_HOME=%DIRNAME%
+
+@rem Find java.exe
+if defined JAVA_HOME goto findJavaFromJavaHome
+
+set JAVA_EXE=java.exe
+%JAVA_EXE% -version >NUL 2>&1
+if "%ERRORLEVEL%" == "0" goto init
+
+echo.
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:findJavaFromJavaHome
+set JAVA_HOME=%JAVA_HOME:"=%
+set JAVA_EXE=%JAVA_HOME%/bin/java.exe
+
+if exist "%JAVA_EXE%" goto init
+
+echo.
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:init
+@rem Get command-line arguments, handling Windowz variants
+
+if not "%OS%" == "Windows_NT" goto win9xME_args
+if "%@eval[2+2]" == "4" goto 4NT_args
+
+:win9xME_args
+@rem Slurp the command line arguments.
+set CMD_LINE_ARGS=
+set _SKIP=2
+
+:win9xME_args_slurp
+if "x%~1" == "x" goto execute
+
+set CMD_LINE_ARGS=%*
+goto execute
+
+:4NT_args
+@rem Get arguments from the 4NT Shell from JP Software
+set CMD_LINE_ARGS=%$
+
+:execute
+@rem Setup the command line
+
+set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
+
+@rem Execute Gradle
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
+
+:end
+@rem End local scope for the variables with windows NT shell
+if "%ERRORLEVEL%"=="0" goto mainEnd
+
+:fail
+rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
+rem the _cmd.exe /c_ return code!
+if  not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
+exit /b 1
+
+:mainEnd
+if "%OS%"=="Windows_NT" endlocal
+
+:omega
diff --git a/java/Android.bp b/java/Android.bp
new file mode 100644
index 0000000..f41e94a
--- /dev/null
+++ b/java/Android.bp
@@ -0,0 +1,46 @@
+// Copyright (C) 2011 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.
+
+android_app {
+    name: "LatinIME",
+
+    srcs: ["src/**/*.java"],
+
+    certificate: "shared",
+
+    jni_libs: ["libjni_latinime"],
+
+    static_libs: [
+        "android-common",
+        "jsr305",
+        "latinime-common",
+        "androidx.legacy_legacy-support-v4",
+    ],
+
+    // Do not compress dictionary files to mmap dict data runtime
+    aaptflags: ["-0 .dict"],
+
+    // Include all the resources regardless of system supported locales
+    aapt_include_all_resources: true,
+
+    min_sdk_version: "14",
+    target_sdk_version: "23",
+    sdk_version: "current",
+
+    product_specific: true,
+
+    optimize: {
+        proguard_flags_files: ["proguard.flags"],
+    },
+}
diff --git a/java/Android.mk b/java/Android.mk
deleted file mode 100644
index 154f3a2..0000000
--- a/java/Android.mk
+++ /dev/null
@@ -1,46 +0,0 @@
-# Copyright (C) 2011 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.
-
-LOCAL_PATH := $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_MODULE_TAGS := optional
-
-LOCAL_SRC_FILES := $(call all-java-files-under, src ../java-overridable/src)
-
-LOCAL_PACKAGE_NAME := LatinIME
-
-LOCAL_CERTIFICATE := shared
-
-LOCAL_JNI_SHARED_LIBRARIES := libjni_latinime
-
-LOCAL_STATIC_JAVA_LIBRARIES := \
-        android-common inputmethod-common jsr305 latinime-common
-
-LOCAL_STATIC_ANDROID_LIBRARIES := \
-        android-support-v4
-
-LOCAL_USE_AAPT2 := true
-
-# Do not compress dictionary files to mmap dict data runtime
-LOCAL_AAPT_FLAGS := -0 .dict
-
-# Include all the resources regardless of system supported locales
-LOCAL_AAPT_INCLUDE_ALL_RESOURCES := true
-
-LOCAL_SDK_VERSION := current
-
-LOCAL_PROGUARD_FLAG_FILES := proguard.flags
-
-include $(BUILD_PACKAGE)
diff --git a/java/AndroidManifest.xml b/java/AndroidManifest.xml
index dedece5..79d3373 100644
--- a/java/AndroidManifest.xml
+++ b/java/AndroidManifest.xml
@@ -16,9 +16,10 @@
 
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
         coreApp="true"
-        package="com.android.inputmethod.latin">
+        package="com.android.inputmethod.latin"
+        android:versionCode="28">
 
-    <uses-sdk android:minSdkVersion="14" android:targetSdkVersion="23" />
+    <uses-sdk android:minSdkVersion="21" android:targetSdkVersion="28" />
 
     <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
     <uses-permission android:name="android.permission.DOWNLOAD_WITHOUT_NOTIFICATION" />
diff --git a/java/res/layout/emoji_palettes_view.xml b/java/res/layout/emoji_palettes_view.xml
index 26cc042..7c5f6c0 100644
--- a/java/res/layout/emoji_palettes_view.xml
+++ b/java/res/layout/emoji_palettes_view.xml
@@ -71,7 +71,7 @@
             android:soundEffectsEnabled="false"
             android:contentDescription="@string/spoken_description_delete" />
     </LinearLayout>
-    <android.support.v4.view.ViewPager
+    <androidx.viewpager.widget.ViewPager
         android:id="@+id/emoji_keyboard_pager"
         android:layout_width="match_parent"
         android:layout_height="wrap_content" />
diff --git a/java/res/layout/user_dictionary_add_word.xml b/java/res/layout/user_dictionary_add_word.xml
deleted file mode 100644
index 615fde5..0000000
--- a/java/res/layout/user_dictionary_add_word.xml
+++ /dev/null
@@ -1,90 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2013 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.
-  -->
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    android:id="@+id/user_dict_settings_add_dialog_top"
-    android:layout_width="match_parent"
-    android:layout_height="wrap_content"
-    android:orientation="vertical" >
-
-    <LinearLayout
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:orientation="vertical" >
-
-        <com.android.internal.widget.DialogTitle
-            style="?android:attr/windowTitleStyle"
-            android:layout_width="match_parent"
-            android:layout_height="64dip"
-            android:layout_marginEnd="16dip"
-            android:layout_marginStart="16dip"
-            android:ellipsize="end"
-            android:gravity="center_vertical|start"
-            android:singleLine="true"
-            android:text="@string/user_dict_settings_add_dialog_title" />
-
-        <View
-            android:layout_width="match_parent"
-            android:layout_height="2dip"
-            android:background="@android:color/holo_blue_light" />
-    </LinearLayout>
-
-    <EditText
-        android:id="@+id/user_dictionary_add_word_text"
-        android:layout_width="match_parent"
-        android:layout_height="match_parent"
-        android:layout_gravity="fill_horizontal|center_vertical"
-        android:layout_marginBottom="8dip"
-        android:layout_marginStart="8dip"
-        android:layout_marginTop="8dip"
-        android:hint="@string/user_dict_settings_add_word_hint"
-        android:imeOptions="flagNoFullscreen"
-        android:inputType="textNoSuggestions"
-        android:maxLength="@integer/config_user_dictionary_max_word_length" >
-
-        <requestFocus />
-    </EditText>
-
-    <LinearLayout
-        style="?android:attr/buttonBarStyle"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:measureWithLargestChild="true"
-        android:orientation="horizontal" >
-
-        <Button
-            style="?android:attr/buttonBarButtonStyle"
-            android:layout_width="0dip"
-            android:layout_height="wrap_content"
-            android:layout_gravity="start"
-            android:layout_weight="1"
-            android:maxLines="2"
-            android:onClick="onClickCancel"
-            android:text="@string/cancel"
-            android:textSize="14sp" />
-
-        <Button
-            style="?android:attr/buttonBarButtonStyle"
-            android:layout_width="0dip"
-            android:layout_height="wrap_content"
-            android:layout_gravity="end"
-            android:layout_weight="1"
-            android:maxLines="2"
-            android:onClick="onClickConfirm"
-            android:text="@string/user_dict_settings_add_dialog_confirm"
-            android:textSize="14sp" />
-    </LinearLayout>
-
-</LinearLayout>
\ No newline at end of file
diff --git a/java/res/values-de/strings-emoji-descriptions.xml b/java/res/values-de/strings-emoji-descriptions.xml
index 0e4699b..75c8efa 100644
--- a/java/res/values-de/strings-emoji-descriptions.xml
+++ b/java/res/values-de/strings-emoji-descriptions.xml
@@ -249,7 +249,7 @@
     <string name="spoken_emoji_1F194" msgid="4903128609556175887">"Quadrat mit \"ID\""</string>
     <string name="spoken_emoji_1F195" msgid="1433142500411060924">"Quadrat mit \"New\""</string>
     <string name="spoken_emoji_1F196" msgid="8825160701159634202">"Quadrat mit \"NG\" (No Good)"</string>
-    <string name="spoken_emoji_1F197" msgid="7841079241554176535">"Quadrat mit \"OK\""</string>
+    <string name="spoken_emoji_1F197" msgid="7841079241554176535">"Quadrat mit \"Ok\""</string>
     <string name="spoken_emoji_1F198" msgid="7020298909426960622">"Quadrat mit \"SOS\""</string>
     <string name="spoken_emoji_1F199" msgid="5971252667136235630">"Quadrat mit \"UP\" und Ausrufezeichen"</string>
     <string name="spoken_emoji_1F19A" msgid="4557270135899843959">"Quadrat mit \"VS\" (Versus)"</string>
@@ -651,7 +651,7 @@
     <string name="spoken_emoji_1F449" msgid="4764447975177805991">"Handrückseite mit nach rechts deutendem Zeigefinger"</string>
     <string name="spoken_emoji_1F44A" msgid="7197417095486424841">"Faust"</string>
     <string name="spoken_emoji_1F44B" msgid="1975968945250833117">"Winkende Hand"</string>
-    <string name="spoken_emoji_1F44C" msgid="3185919567897876562">"Handzeichen für \"OK\""</string>
+    <string name="spoken_emoji_1F44C" msgid="3185919567897876562">"Handzeichen für \"Ok\""</string>
     <string name="spoken_emoji_1F44D" msgid="6182553970602667815">"Daumen hoch"</string>
     <string name="spoken_emoji_1F44E" msgid="8030851867365111809">"Daumen runter"</string>
     <string name="spoken_emoji_1F44F" msgid="5148753662268213389">"Klatschende Hände"</string>
@@ -1082,7 +1082,7 @@
     <!-- no translation found for spoken_emoji_1F644 (446284817942609022) -->
     <skip />
     <string name="spoken_emoji_1F645" msgid="5202090629227587076">"Gesicht mit Nicht in Ordnung-Geste"</string>
-    <string name="spoken_emoji_1F646" msgid="6734425134415138134">"Gesicht mit OK-Geste"</string>
+    <string name="spoken_emoji_1F646" msgid="6734425134415138134">"Gesicht mit Ok-Geste"</string>
     <string name="spoken_emoji_1F647" msgid="1090285518444205483">"Sich tief verneigende Person"</string>
     <string name="spoken_emoji_1F648" msgid="8978535230610522356">"Nichts-Sehen-Affe"</string>
     <string name="spoken_emoji_1F649" msgid="8486145279809495102">"Nichts-Hören-Affe"</string>
diff --git a/java/res/values-pt/strings-emoji-descriptions.xml b/java/res/values-pt/strings-emoji-descriptions.xml
index e6f51a9..05d3739 100644
--- a/java/res/values-pt/strings-emoji-descriptions.xml
+++ b/java/res/values-pt/strings-emoji-descriptions.xml
@@ -813,7 +813,7 @@
     <string name="spoken_emoji_1F4EB" msgid="6491414165464146137">"Caixa de correio fechada com bandeira levantada"</string>
     <string name="spoken_emoji_1F4EC" msgid="7369517138779988438">"Caixa de correio aberta com bandeira levantada"</string>
     <string name="spoken_emoji_1F4ED" msgid="5657520436285454241">"Caixa de correio aberta com bandeira abaixada"</string>
-    <string name="spoken_emoji_1F4EE" msgid="8464138906243608614">"Caixa de correio"</string>
+    <string name="spoken_emoji_1F4EE" msgid="8464138906243608614">"Caixa de e-mails"</string>
     <string name="spoken_emoji_1F4EF" msgid="8801427577198798226">"Corneta de correio"</string>
     <string name="spoken_emoji_1F4F0" msgid="6330208624731662525">"Jornal"</string>
     <string name="spoken_emoji_1F4F1" msgid="3966503935581675695">"Celular"</string>
diff --git a/java/shared.keystore b/java/shared.keystore
new file mode 100644
index 0000000..9c2f1bd
--- /dev/null
+++ b/java/shared.keystore
Binary files differ
diff --git a/java/src/com/android/inputmethod/accessibility/AccessibilityUtils.java b/java/src/com/android/inputmethod/accessibility/AccessibilityUtils.java
index 442ab3e..31e142e 100644
--- a/java/src/com/android/inputmethod/accessibility/AccessibilityUtils.java
+++ b/java/src/com/android/inputmethod/accessibility/AccessibilityUtils.java
@@ -21,7 +21,7 @@
 import android.os.Build;
 import android.os.SystemClock;
 import android.provider.Settings;
-import android.support.v4.view.accessibility.AccessibilityEventCompat;
+import androidx.core.view.accessibility.AccessibilityEventCompat;
 import android.text.TextUtils;
 import android.util.Log;
 import android.view.MotionEvent;
diff --git a/java/src/com/android/inputmethod/accessibility/KeyboardAccessibilityDelegate.java b/java/src/com/android/inputmethod/accessibility/KeyboardAccessibilityDelegate.java
index 237117d..f7a1163 100644
--- a/java/src/com/android/inputmethod/accessibility/KeyboardAccessibilityDelegate.java
+++ b/java/src/com/android/inputmethod/accessibility/KeyboardAccessibilityDelegate.java
@@ -18,9 +18,9 @@
 
 import android.content.Context;
 import android.os.SystemClock;
-import android.support.v4.view.AccessibilityDelegateCompat;
-import android.support.v4.view.ViewCompat;
-import android.support.v4.view.accessibility.AccessibilityNodeInfoCompat;
+import androidx.core.view.AccessibilityDelegateCompat;
+import androidx.core.view.ViewCompat;
+import androidx.core.view.accessibility.AccessibilityNodeInfoCompat;
 import android.util.Log;
 import android.view.MotionEvent;
 import android.view.View;
diff --git a/java/src/com/android/inputmethod/accessibility/KeyboardAccessibilityNodeProvider.java b/java/src/com/android/inputmethod/accessibility/KeyboardAccessibilityNodeProvider.java
index 2de71ce..a3511c6 100644
--- a/java/src/com/android/inputmethod/accessibility/KeyboardAccessibilityNodeProvider.java
+++ b/java/src/com/android/inputmethod/accessibility/KeyboardAccessibilityNodeProvider.java
@@ -18,11 +18,11 @@
 
 import android.graphics.Rect;
 import android.os.Bundle;
-import android.support.v4.view.ViewCompat;
-import android.support.v4.view.accessibility.AccessibilityEventCompat;
-import android.support.v4.view.accessibility.AccessibilityNodeInfoCompat;
-import android.support.v4.view.accessibility.AccessibilityNodeProviderCompat;
-import android.support.v4.view.accessibility.AccessibilityRecordCompat;
+import androidx.core.view.ViewCompat;
+import androidx.core.view.accessibility.AccessibilityEventCompat;
+import androidx.core.view.accessibility.AccessibilityNodeInfoCompat;
+import androidx.core.view.accessibility.AccessibilityNodeProviderCompat;
+import androidx.core.view.accessibility.AccessibilityRecordCompat;
 import android.util.Log;
 import android.view.View;
 import android.view.accessibility.AccessibilityEvent;
diff --git a/java-overridable/src/com/android/inputmethod/compat/AppWorkaroundsHelper.java b/java/src/com/android/inputmethod/compat/AppWorkaroundsHelper.java
similarity index 100%
rename from java-overridable/src/com/android/inputmethod/compat/AppWorkaroundsHelper.java
rename to java/src/com/android/inputmethod/compat/AppWorkaroundsHelper.java
diff --git a/java/src/com/android/inputmethod/compat/UserManagerCompatUtils.java b/java/src/com/android/inputmethod/compat/UserManagerCompatUtils.java
index 5dee316..a0ca2c9 100644
--- a/java/src/com/android/inputmethod/compat/UserManagerCompatUtils.java
+++ b/java/src/com/android/inputmethod/compat/UserManagerCompatUtils.java
@@ -19,7 +19,7 @@
 import android.content.Context;
 import android.os.Build;
 import android.os.UserManager;
-import android.support.annotation.IntDef;
+import androidx.annotation.IntDef;
 
 import java.lang.annotation.Retention;
 import java.lang.reflect.Method;
diff --git a/java/src/com/android/inputmethod/compat/ViewCompatUtils.java b/java/src/com/android/inputmethod/compat/ViewCompatUtils.java
index 16260ab..a584625 100644
--- a/java/src/com/android/inputmethod/compat/ViewCompatUtils.java
+++ b/java/src/com/android/inputmethod/compat/ViewCompatUtils.java
@@ -20,7 +20,7 @@
 
 import java.lang.reflect.Method;
 
-// TODO: Use {@link android.support.v4.view.ViewCompat} instead of this utility class.
+// TODO: Use {@link androidx.core.view.ViewCompat} instead of this utility class.
 // Currently {@link #getPaddingEnd(View)} and {@link #setPaddingRelative(View,int,int,int,int)}
 // are missing from android-support-v4 static library in KitKat SDK.
 public final class ViewCompatUtils {
diff --git a/java-overridable/src/com/android/inputmethod/dictionarypack/DictionaryPackConstants.java b/java/src/com/android/inputmethod/dictionarypack/DictionaryPackConstants.java
similarity index 100%
rename from java-overridable/src/com/android/inputmethod/dictionarypack/DictionaryPackConstants.java
rename to java/src/com/android/inputmethod/dictionarypack/DictionaryPackConstants.java
diff --git a/java-overridable/src/com/android/inputmethod/dictionarypack/MetadataUriGetter.java b/java/src/com/android/inputmethod/dictionarypack/MetadataUriGetter.java
similarity index 100%
rename from java-overridable/src/com/android/inputmethod/dictionarypack/MetadataUriGetter.java
rename to java/src/com/android/inputmethod/dictionarypack/MetadataUriGetter.java
diff --git a/java/src/com/android/inputmethod/keyboard/emoji/EmojiLayoutParams.java b/java/src/com/android/inputmethod/keyboard/emoji/EmojiLayoutParams.java
index 582e091..797541a 100644
--- a/java/src/com/android/inputmethod/keyboard/emoji/EmojiLayoutParams.java
+++ b/java/src/com/android/inputmethod/keyboard/emoji/EmojiLayoutParams.java
@@ -17,7 +17,7 @@
 package com.android.inputmethod.keyboard.emoji;
 
 import android.content.res.Resources;
-import android.support.v4.view.ViewPager;
+import androidx.viewpager.widget.ViewPager;
 import android.view.View;
 import android.widget.LinearLayout;
 
diff --git a/java/src/com/android/inputmethod/keyboard/emoji/EmojiPalettesAdapter.java b/java/src/com/android/inputmethod/keyboard/emoji/EmojiPalettesAdapter.java
index 68056e0..18b9c7e 100644
--- a/java/src/com/android/inputmethod/keyboard/emoji/EmojiPalettesAdapter.java
+++ b/java/src/com/android/inputmethod/keyboard/emoji/EmojiPalettesAdapter.java
@@ -16,7 +16,7 @@
 
 package com.android.inputmethod.keyboard.emoji;
 
-import android.support.v4.view.PagerAdapter;
+import androidx.viewpager.widget.PagerAdapter;
 import android.util.Log;
 import android.util.SparseArray;
 import android.view.LayoutInflater;
diff --git a/java/src/com/android/inputmethod/keyboard/emoji/EmojiPalettesView.java b/java/src/com/android/inputmethod/keyboard/emoji/EmojiPalettesView.java
index a3b869d..9ba8d2b 100644
--- a/java/src/com/android/inputmethod/keyboard/emoji/EmojiPalettesView.java
+++ b/java/src/com/android/inputmethod/keyboard/emoji/EmojiPalettesView.java
@@ -23,7 +23,7 @@
 import android.content.res.TypedArray;
 import android.graphics.Color;
 import android.preference.PreferenceManager;
-import android.support.v4.view.ViewPager;
+import androidx.viewpager.widget.ViewPager;
 import android.util.AttributeSet;
 import android.util.Pair;
 import android.util.TypedValue;
diff --git a/java-overridable/src/com/android/inputmethod/latin/DictionaryFacilitatorProvider.java b/java/src/com/android/inputmethod/latin/DictionaryFacilitatorProvider.java
similarity index 100%
rename from java-overridable/src/com/android/inputmethod/latin/DictionaryFacilitatorProvider.java
rename to java/src/com/android/inputmethod/latin/DictionaryFacilitatorProvider.java
diff --git a/java/src/com/android/inputmethod/latin/PersonalDictionaryLookup.java b/java/src/com/android/inputmethod/latin/PersonalDictionaryLookup.java
deleted file mode 100644
index eed4ec1..0000000
--- a/java/src/com/android/inputmethod/latin/PersonalDictionaryLookup.java
+++ /dev/null
@@ -1,651 +0,0 @@
-/*
- * Copyright (C) 2015 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;
-
-import android.content.ContentResolver;
-import android.content.Context;
-import android.database.ContentObserver;
-import android.database.Cursor;
-import android.net.Uri;
-import android.provider.UserDictionary;
-import android.text.TextUtils;
-import android.util.Log;
-
-import com.android.inputmethod.annotations.UsedForTesting;
-import com.android.inputmethod.latin.common.CollectionUtils;
-import com.android.inputmethod.latin.common.LocaleUtils;
-import com.android.inputmethod.latin.define.DebugFlags;
-import com.android.inputmethod.latin.utils.ExecutorUtils;
-
-import java.io.Closeable;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Locale;
-import java.util.Map;
-import java.util.Set;
-import java.util.concurrent.ScheduledFuture;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicBoolean;
-
-import javax.annotation.Nonnull;
-import javax.annotation.Nullable;
-
-/**
- * This class provides the ability to look into the system-wide "Personal dictionary". It loads the
- * data once when created and reloads it when notified of changes to {@link UserDictionary}
- *
- * It can be used directly to validate words or expand shortcuts, and it can be used by instances
- * of {@link PersonalLanguageModelHelper} that create language model files for a specific input
- * locale.
- *
- * Note, that the initial dictionary loading happens asynchronously so it is possible (hopefully
- * rarely) that {@link #isValidWord} or {@link #expandShortcut} is called before the initial load
- * has started.
- *
- * The caller should explicitly call {@link #close} when the object is no longer needed, in order
- * to release any resources and references to this object.  A service should create this object in
- * {@link android.app.Service#onCreate} and close it in {@link android.app.Service#onDestroy}.
- */
-public class PersonalDictionaryLookup implements Closeable {
-
-    /**
-     * To avoid loading too many dictionary entries in memory, we cap them at this number.  If
-     * that number is exceeded, the lowest-frequency items will be dropped.  Note, there is no
-     * explicit cap on the number of locales in every entry.
-     */
-    private static final int MAX_NUM_ENTRIES = 1000;
-
-    /**
-     * The delay (in milliseconds) to impose on reloads.  Previously scheduled reloads will be
-     * cancelled if a new reload is scheduled before the delay expires.  Thus, only the last
-     * reload in the series of frequent reloads will execute.
-     *
-     * Note, this value should be low enough to allow the "Add to dictionary" feature in the
-     * TextView correction (red underline) drop-down menu to work properly in the following case:
-     *
-     *   1. User types OOV (out-of-vocabulary) word.
-     *   2. The OOV is red-underlined.
-     *   3. User selects "Add to dictionary".  The red underline disappears while the OOV is
-     *      in a composing span.
-     *   4. The user taps space.  The red underline should NOT reappear.  If this value is very
-     *      high and the user performs the space tap fast enough, the red underline may reappear.
-     */
-    @UsedForTesting
-    static final int RELOAD_DELAY_MS = 200;
-
-    @UsedForTesting
-    static final Locale ANY_LOCALE = new Locale("");
-
-    private final String mTag;
-    private final ContentResolver mResolver;
-    private final String mServiceName;
-
-    /**
-     * Interface to implement for classes interested in getting notified of updates.
-     */
-    public static interface PersonalDictionaryListener {
-        public void onUpdate();
-    }
-
-    private final Set<PersonalDictionaryListener> mListeners = new HashSet<>();
-
-    public void addListener(@Nonnull final PersonalDictionaryListener listener) {
-        mListeners.add(listener);
-    }
-
-    public void removeListener(@Nonnull final PersonalDictionaryListener listener) {
-        mListeners.remove(listener);
-    }
-
-    /**
-     * Broadcast the update to all the Locale-specific language models.
-     */
-    @UsedForTesting
-    void notifyListeners() {
-        for (PersonalDictionaryListener listener : mListeners) {
-            listener.onUpdate();
-        }
-    }
-
-    /**
-     *  Content observer for changes to the personal dictionary. It has the following properties:
-     *    1. It spawns off a reload in another thread, after some delay.
-     *    2. It cancels previously scheduled reloads, and only executes the latest.
-     *    3. It may be called multiple times quickly in succession (and is in fact called so
-     *       when the dictionary is edited through its settings UI, when sometimes multiple
-     *       notifications are sent for the edited entry, but also for the entire dictionary).
-     */
-    private class PersonalDictionaryContentObserver extends ContentObserver implements Runnable {
-        public PersonalDictionaryContentObserver() {
-            super(null);
-        }
-
-        @Override
-        public boolean deliverSelfNotifications() {
-            return true;
-        }
-
-        // Support pre-API16 platforms.
-        @Override
-        public void onChange(boolean selfChange) {
-            onChange(selfChange, null);
-        }
-
-        @Override
-        public void onChange(boolean selfChange, Uri uri) {
-            if (DebugFlags.DEBUG_ENABLED) {
-                Log.d(mTag, "onChange() : URI = " + uri);
-            }
-            // Cancel (but don't interrupt) any pending reloads (except the initial load).
-            if (mReloadFuture != null && !mReloadFuture.isCancelled() &&
-                    !mReloadFuture.isDone()) {
-                // Note, that if already cancelled or done, this will do nothing.
-                boolean isCancelled = mReloadFuture.cancel(false);
-                if (DebugFlags.DEBUG_ENABLED) {
-                    if (isCancelled) {
-                        Log.d(mTag, "onChange() : Canceled previous reload request");
-                    } else {
-                        Log.d(mTag, "onChange() : Failed to cancel previous reload request");
-                    }
-                }
-            }
-
-            if (DebugFlags.DEBUG_ENABLED) {
-                Log.d(mTag, "onChange() : Scheduling reload in " + RELOAD_DELAY_MS + " ms");
-            }
-
-            // Schedule a new reload after RELOAD_DELAY_MS.
-            mReloadFuture = ExecutorUtils.getBackgroundExecutor(mServiceName)
-                    .schedule(this, RELOAD_DELAY_MS, TimeUnit.MILLISECONDS);
-        }
-
-        @Override
-        public void run() {
-            loadPersonalDictionary();
-        }
-    }
-
-    private final PersonalDictionaryContentObserver mPersonalDictionaryContentObserver =
-            new PersonalDictionaryContentObserver();
-
-    /**
-     * Indicates that a load is in progress, so no need for another.
-     */
-    private AtomicBoolean mIsLoading = new AtomicBoolean(false);
-
-    /**
-     * Indicates that this lookup object has been close()d.
-     */
-    private AtomicBoolean mIsClosed = new AtomicBoolean(false);
-
-    /**
-     * We store a map from a dictionary word to the set of locales & raw string(as it appears)
-     * We then iterate over the set of locales to find a match using LocaleUtils.
-     */
-    private volatile HashMap<String, HashMap<Locale, String>> mDictWords;
-
-    /**
-     * We store a map from a shortcut to a word for each locale.
-     * Shortcuts that apply to any locale are keyed by {@link #ANY_LOCALE}.
-     */
-    private volatile HashMap<Locale, HashMap<String, String>> mShortcutsPerLocale;
-
-    /**
-     *  The last-scheduled reload future.  Saved in order to cancel a pending reload if a new one
-     * is coming.
-     */
-    private volatile ScheduledFuture<?> mReloadFuture;
-
-    private volatile List<DictionaryStats> mDictionaryStats;
-
-    /**
-     * @param context the context from which to obtain content resolver
-     */
-    public PersonalDictionaryLookup(
-            @Nonnull final Context context,
-            @Nonnull final String serviceName) {
-        mTag = serviceName + ".Personal";
-
-        Log.i(mTag, "create()");
-
-        mServiceName = serviceName;
-        mDictionaryStats = new ArrayList<DictionaryStats>();
-        mDictionaryStats.add(new DictionaryStats(ANY_LOCALE, Dictionary.TYPE_USER, 0));
-        mDictionaryStats.add(new DictionaryStats(ANY_LOCALE, Dictionary.TYPE_USER_SHORTCUT, 0));
-
-        // Obtain a content resolver.
-        mResolver = context.getContentResolver();
-    }
-
-    public List<DictionaryStats> getDictionaryStats() {
-        return mDictionaryStats;
-    }
-
-    public void open() {
-        Log.i(mTag, "open()");
-
-        // Schedule the initial load to run immediately.  It's possible that the first call to
-        // isValidWord occurs before the dictionary has actually loaded, so it should not
-        // assume that the dictionary has been loaded.
-        loadPersonalDictionary();
-
-        // Register the observer to be notified on changes to the personal dictionary and all
-        // individual items.
-        //
-        // If the user is interacting with the Personal Dictionary settings UI, or with the
-        // "Add to dictionary" drop-down option, duplicate notifications will be sent for the same
-        // edit: if a new entry is added, there is a notification for the entry itself, and
-        // separately for the entire dictionary. However, when used programmatically,
-        // only notifications for the specific edits are sent. Thus, the observer is registered to
-        // receive every possible notification, and instead has throttling logic to avoid doing too
-        // many reloads.
-        mResolver.registerContentObserver(
-                UserDictionary.Words.CONTENT_URI,
-                true /* notifyForDescendents */,
-                mPersonalDictionaryContentObserver);
-    }
-
-    /**
-     * To be called by the garbage collector in the off chance that the service did not clean up
-     * properly.  Do not rely on this getting called, and make sure close() is called explicitly.
-     */
-    @Override
-    public void finalize() throws Throwable {
-        try {
-            if (DebugFlags.DEBUG_ENABLED) {
-                Log.d(mTag, "finalize()");
-            }
-            close();
-        } finally {
-            super.finalize();
-        }
-    }
-
-    /**
-     * Cleans up PersonalDictionaryLookup: shuts down any extra threads and unregisters the observer.
-     *
-     * It is safe, but not advised to call this multiple times, and isValidWord would continue to
-     * work, but no data will be reloaded any longer.
-     */
-    @Override
-    public void close() {
-        if (DebugFlags.DEBUG_ENABLED) {
-            Log.d(mTag, "close() : Unregistering content observer");
-        }
-        if (mIsClosed.compareAndSet(false, true)) {
-            // Unregister the content observer.
-            mResolver.unregisterContentObserver(mPersonalDictionaryContentObserver);
-        }
-    }
-
-    /**
-     * Returns true if the initial load has been performed.
-     *
-     * @return true if the initial load is successful
-     */
-    public boolean isLoaded() {
-        return mDictWords != null && mShortcutsPerLocale != null;
-    }
-
-    /**
-     * Returns the set of words defined for the given locale and more general locales.
-     *
-     * For example, input locale en_US uses data for en_US, en, and the global dictionary.
-     *
-     * Note that this method returns expanded words, not shortcuts. Shortcuts are handled
-     * by {@link #getShortcutsForLocale}.
-     *
-     * @param inputLocale the locale to restrict for
-     * @return set of words that apply to the given locale.
-     */
-    public Set<String> getWordsForLocale(@Nonnull final Locale inputLocale) {
-        final HashMap<String, HashMap<Locale, String>> dictWords = mDictWords;
-        if (CollectionUtils.isNullOrEmpty(dictWords)) {
-            return Collections.emptySet();
-        }
-
-        final Set<String> words = new HashSet<>();
-        final String inputLocaleString = inputLocale.toString();
-        for (String word : dictWords.keySet()) {
-            HashMap<Locale, String> localeStringMap = dictWords.get(word);
-                if (!CollectionUtils.isNullOrEmpty(localeStringMap)) {
-                    for (Locale wordLocale : localeStringMap.keySet()) {
-                        final String wordLocaleString = wordLocale.toString();
-                        final int match = LocaleUtils.getMatchLevel(wordLocaleString, inputLocaleString);
-                        if (LocaleUtils.isMatch(match)) {
-                            words.add(localeStringMap.get(wordLocale));
-                        }
-                    }
-            }
-        }
-        return words;
-    }
-
-    /**
-     * Returns the set of shortcuts defined for the given locale and more general locales.
-     *
-     * For example, input locale en_US uses data for en_US, en, and the global dictionary.
-     *
-     * Note that this method returns shortcut keys, not expanded words. Words are handled
-     * by {@link #getWordsForLocale}.
-     *
-     * @param inputLocale the locale to restrict for
-     * @return set of shortcuts that apply to the given locale.
-     */
-    public Set<String> getShortcutsForLocale(@Nonnull final Locale inputLocale) {
-        final Map<Locale, HashMap<String, String>> shortcutsPerLocale = mShortcutsPerLocale;
-        if (CollectionUtils.isNullOrEmpty(shortcutsPerLocale)) {
-            return Collections.emptySet();
-        }
-
-        final Set<String> shortcuts = new HashSet<>();
-        if (!TextUtils.isEmpty(inputLocale.getCountry())) {
-            // First look for the country-specific shortcut: en_US, en_UK, fr_FR, etc.
-            final Map<String, String> countryShortcuts = shortcutsPerLocale.get(inputLocale);
-            if (!CollectionUtils.isNullOrEmpty(countryShortcuts)) {
-                shortcuts.addAll(countryShortcuts.keySet());
-            }
-        }
-
-        // Next look for the language-specific shortcut: en, fr, etc.
-        final Locale languageOnlyLocale =
-                LocaleUtils.constructLocaleFromString(inputLocale.getLanguage());
-        final Map<String, String> languageShortcuts = shortcutsPerLocale.get(languageOnlyLocale);
-        if (!CollectionUtils.isNullOrEmpty(languageShortcuts)) {
-            shortcuts.addAll(languageShortcuts.keySet());
-        }
-
-        // If all else fails, look for a global shortcut.
-        final Map<String, String> globalShortcuts = shortcutsPerLocale.get(ANY_LOCALE);
-        if (!CollectionUtils.isNullOrEmpty(globalShortcuts)) {
-            shortcuts.addAll(globalShortcuts.keySet());
-        }
-
-        return shortcuts;
-    }
-
-    /**
-     * Determines if the given word is a valid word in the given locale based on the dictionary.
-     * It tries hard to find a match: for example, casing is ignored and if the word is present in a
-     * more general locale (e.g. en or all locales), and isValidWord is asking for a more specific
-     * locale (e.g. en_US), it will be considered a match.
-     *
-     * @param word the word to match
-     * @param inputLocale the locale in which to match the word
-     * @return true iff the word has been matched for this locale in the dictionary.
-     */
-    public boolean isValidWord(@Nonnull final String word, @Nonnull final Locale inputLocale) {
-        if (!isLoaded()) {
-            // This is a corner case in the event the initial load of the dictionary has not
-            // completed. In that case, we assume the word is not a valid word in the dictionary.
-            if (DebugFlags.DEBUG_ENABLED) {
-                Log.d(mTag, "isValidWord() : Initial load not complete");
-            }
-            return false;
-        }
-
-        if (DebugFlags.DEBUG_ENABLED) {
-            Log.d(mTag, "isValidWord() : Word [" + word + "] in Locale [" + inputLocale + "]");
-        }
-        // Atomically obtain the current copy of mDictWords;
-        final HashMap<String, HashMap<Locale, String>> dictWords = mDictWords;
-        // Lowercase the word using the given locale. Note, that dictionary
-        // words are lowercased using their locale, and theoretically the
-        // lowercasing between two matching locales may differ. For simplicity
-        // we ignore that possibility.
-        final String lowercased = word.toLowerCase(inputLocale);
-        final HashMap<Locale, String> dictLocales = dictWords.get(lowercased);
-
-        if (CollectionUtils.isNullOrEmpty(dictLocales)) {
-            if (DebugFlags.DEBUG_ENABLED) {
-                Log.d(mTag, "isValidWord() : No entry for word [" + word + "]");
-            }
-            return false;
-        } else {
-            if (DebugFlags.DEBUG_ENABLED) {
-                Log.d(mTag, "isValidWord() : Found entry for word [" + word + "]");
-            }
-            // Iterate over the locales this word is in.
-            for (final Locale dictLocale : dictLocales.keySet()) {
-                final int matchLevel = LocaleUtils.getMatchLevel(dictLocale.toString(),
-                        inputLocale.toString());
-                if (DebugFlags.DEBUG_ENABLED) {
-                    Log.d(mTag, "isValidWord() : MatchLevel for DictLocale [" + dictLocale
-                            + "] and InputLocale [" + inputLocale + "] is " + matchLevel);
-                }
-                if (LocaleUtils.isMatch(matchLevel)) {
-                    if (DebugFlags.DEBUG_ENABLED) {
-                        Log.d(mTag, "isValidWord() : MatchLevel " + matchLevel + " IS a match");
-                    }
-                    return true;
-                }
-                if (DebugFlags.DEBUG_ENABLED) {
-                    Log.d(mTag, "isValidWord() : MatchLevel " + matchLevel + " is NOT a match");
-                }
-            }
-            if (DebugFlags.DEBUG_ENABLED) {
-                Log.d(mTag, "isValidWord() : False, since none of the locales matched");
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Expands the given shortcut for the given locale.
-     *
-     * @param shortcut the shortcut to expand
-     * @param inputLocale the locale in which to expand the shortcut
-     * @return expanded shortcut iff the word is a shortcut in the dictionary.
-     */
-    @Nullable public String expandShortcut(
-            @Nonnull final String shortcut, @Nonnull final Locale inputLocale) {
-        if (DebugFlags.DEBUG_ENABLED) {
-            Log.d(mTag, "expandShortcut() : Shortcut [" + shortcut + "] for [" + inputLocale + "]");
-        }
-
-        // Atomically obtain the current copy of mShortcuts;
-        final HashMap<Locale, HashMap<String, String>> shortcutsPerLocale = mShortcutsPerLocale;
-
-        // Exit as early as possible. Most users don't use shortcuts.
-        if (CollectionUtils.isNullOrEmpty(shortcutsPerLocale)) {
-            if (DebugFlags.DEBUG_ENABLED) {
-                Log.d(mTag, "expandShortcut() : User has no shortcuts");
-            }
-            return null;
-        }
-
-        if (!TextUtils.isEmpty(inputLocale.getCountry())) {
-            // First look for the country-specific shortcut: en_US, en_UK, fr_FR, etc.
-            final String expansionForCountry = expandShortcut(
-                    shortcutsPerLocale, shortcut, inputLocale);
-            if (!TextUtils.isEmpty(expansionForCountry)) {
-                if (DebugFlags.DEBUG_ENABLED) {
-                    Log.d(mTag, "expandShortcut() : Country expansion is ["
-                            + expansionForCountry + "]");
-                }
-                return expansionForCountry;
-            }
-        }
-
-        // Next look for the language-specific shortcut: en, fr, etc.
-        final Locale languageOnlyLocale =
-                LocaleUtils.constructLocaleFromString(inputLocale.getLanguage());
-        final String expansionForLanguage = expandShortcut(
-                shortcutsPerLocale, shortcut, languageOnlyLocale);
-        if (!TextUtils.isEmpty(expansionForLanguage)) {
-            if (DebugFlags.DEBUG_ENABLED) {
-                Log.d(mTag, "expandShortcut() : Language expansion is ["
-                        + expansionForLanguage + "]");
-            }
-            return expansionForLanguage;
-        }
-
-        // If all else fails, look for a global shortcut.
-        final String expansionForGlobal = expandShortcut(shortcutsPerLocale, shortcut, ANY_LOCALE);
-        if (!TextUtils.isEmpty(expansionForGlobal) && DebugFlags.DEBUG_ENABLED) {
-            Log.d(mTag, "expandShortcut() : Global expansion is [" + expansionForGlobal + "]");
-        }
-        return expansionForGlobal;
-    }
-
-    @Nullable private String expandShortcut(
-            @Nullable final HashMap<Locale, HashMap<String, String>> shortcutsPerLocale,
-            @Nonnull final String shortcut,
-            @Nonnull final Locale locale) {
-        if (CollectionUtils.isNullOrEmpty(shortcutsPerLocale)) {
-            return null;
-        }
-        final HashMap<String, String> localeShortcuts = shortcutsPerLocale.get(locale);
-        if (CollectionUtils.isNullOrEmpty(localeShortcuts)) {
-            return null;
-        }
-        return localeShortcuts.get(shortcut);
-    }
-
-    /**
-     * Loads the personal dictionary in the current thread.
-     *
-     * Only one reload can happen at a time. If already running, will exit quickly.
-     */
-    private void loadPersonalDictionary() {
-        // Bail out if already in the process of loading.
-        if (!mIsLoading.compareAndSet(false, true)) {
-            Log.i(mTag, "loadPersonalDictionary() : Already Loading (exit)");
-            return;
-        }
-        Log.i(mTag, "loadPersonalDictionary() : Start Loading");
-        HashMap<String, HashMap<Locale, String>> dictWords = new HashMap<>();
-        HashMap<Locale, HashMap<String, String>> shortcutsPerLocale = new HashMap<>();
-        // Load the dictionary.  Items are returned in the default sort order (by frequency).
-        Cursor cursor = mResolver.query(UserDictionary.Words.CONTENT_URI,
-                null, null, null, UserDictionary.Words.DEFAULT_SORT_ORDER);
-        if (null == cursor || cursor.getCount() < 1) {
-            Log.i(mTag, "loadPersonalDictionary() : Empty");
-        } else {
-            // Iterate over the entries in the personal dictionary.  Note, that iteration is in
-            // descending frequency by default.
-            while (dictWords.size() < MAX_NUM_ENTRIES && cursor.moveToNext()) {
-                // If there is no column for locale, skip this entry. An empty
-                // locale on the other hand will not be skipped.
-                final int dictLocaleIndex = cursor.getColumnIndex(UserDictionary.Words.LOCALE);
-                if (dictLocaleIndex < 0) {
-                    if (DebugFlags.DEBUG_ENABLED) {
-                        Log.d(mTag, "loadPersonalDictionary() : Entry without LOCALE, skipping");
-                    }
-                    continue;
-                }
-                // If there is no column for word, skip this entry.
-                final int dictWordIndex = cursor.getColumnIndex(UserDictionary.Words.WORD);
-                if (dictWordIndex < 0) {
-                    if (DebugFlags.DEBUG_ENABLED) {
-                        Log.d(mTag, "loadPersonalDictionary() : Entry without WORD, skipping");
-                    }
-                    continue;
-                }
-                // If the word is null, skip this entry.
-                final String rawDictWord = cursor.getString(dictWordIndex);
-                if (null == rawDictWord) {
-                    if (DebugFlags.DEBUG_ENABLED) {
-                        Log.d(mTag, "loadPersonalDictionary() : Null word");
-                    }
-                    continue;
-                }
-                // If the locale is null, that's interpreted to mean all locales. Note, the special
-                // zz locale for an Alphabet (QWERTY) layout will not match any actual language.
-                String localeString = cursor.getString(dictLocaleIndex);
-                if (null == localeString) {
-                    if (DebugFlags.DEBUG_ENABLED) {
-                        Log.d(mTag, "loadPersonalDictionary() : Null locale for word [" +
-                                rawDictWord + "], assuming all locales");
-                    }
-                    // For purposes of LocaleUtils, an empty locale matches everything.
-                    localeString = "";
-                }
-                final Locale dictLocale = LocaleUtils.constructLocaleFromString(localeString);
-                // Lowercase the word before storing it.
-                final String dictWord = rawDictWord.toLowerCase(dictLocale);
-                if (DebugFlags.DEBUG_ENABLED) {
-                    Log.d(mTag, "loadPersonalDictionary() : Adding word [" + dictWord
-                            + "] for locale " + dictLocale + "with value" + rawDictWord);
-                }
-                // Check if there is an existing entry for this word.
-                HashMap<Locale, String> dictLocales = dictWords.get(dictWord);
-                if (CollectionUtils.isNullOrEmpty(dictLocales)) {
-                    // If there is no entry for this word, create one.
-                    if (DebugFlags.DEBUG_ENABLED) {
-                        Log.d(mTag, "loadPersonalDictionary() : Word [" + dictWord +
-                                "] not seen for other locales, creating new entry");
-                    }
-                    dictLocales = new HashMap<>();
-                    dictWords.put(dictWord, dictLocales);
-                }
-                // Append the locale to the list of locales this word is in.
-                dictLocales.put(dictLocale, rawDictWord);
-
-                // If there is no column for a shortcut, we're done.
-                final int shortcutIndex = cursor.getColumnIndex(UserDictionary.Words.SHORTCUT);
-                if (shortcutIndex < 0) {
-                    if (DebugFlags.DEBUG_ENABLED) {
-                        Log.d(mTag, "loadPersonalDictionary() : Entry without SHORTCUT, done");
-                    }
-                    continue;
-                }
-                // If the shortcut is null, we're done.
-                final String shortcut = cursor.getString(shortcutIndex);
-                if (shortcut == null) {
-                    if (DebugFlags.DEBUG_ENABLED) {
-                        Log.d(mTag, "loadPersonalDictionary() : Null shortcut");
-                    }
-                    continue;
-                }
-                // Else, save the shortcut.
-                HashMap<String, String> localeShortcuts = shortcutsPerLocale.get(dictLocale);
-                if (localeShortcuts == null) {
-                    localeShortcuts = new HashMap<>();
-                    shortcutsPerLocale.put(dictLocale, localeShortcuts);
-                }
-                // Map to the raw input, which might be capitalized.
-                // This lets the user create a shortcut from "gm" to "General Motors".
-                localeShortcuts.put(shortcut, rawDictWord);
-            }
-        }
-
-        List<DictionaryStats> stats = new ArrayList<>();
-        stats.add(new DictionaryStats(ANY_LOCALE, Dictionary.TYPE_USER, dictWords.size()));
-        int numShortcuts = 0;
-        for (HashMap<String, String> shortcuts : shortcutsPerLocale.values()) {
-            numShortcuts += shortcuts.size();
-        }
-        stats.add(new DictionaryStats(ANY_LOCALE, Dictionary.TYPE_USER_SHORTCUT, numShortcuts));
-        mDictionaryStats = stats;
-
-        // Atomically replace the copy of mDictWords and mShortcuts.
-        mDictWords = dictWords;
-        mShortcutsPerLocale = shortcutsPerLocale;
-
-        // Allow other calls to loadPersonalDictionary to execute now.
-        mIsLoading.set(false);
-
-        Log.i(mTag, "loadPersonalDictionary() : Loaded " + mDictWords.size()
-                + " words and " + numShortcuts + " shortcuts");
-
-        notifyListeners();
-    }
-}
diff --git a/java-overridable/src/com/android/inputmethod/latin/about/AboutPreferences.java b/java/src/com/android/inputmethod/latin/about/AboutPreferences.java
similarity index 100%
rename from java-overridable/src/com/android/inputmethod/latin/about/AboutPreferences.java
rename to java/src/com/android/inputmethod/latin/about/AboutPreferences.java
diff --git a/java-overridable/src/com/android/inputmethod/latin/accounts/AccountStateChangedListener.java b/java/src/com/android/inputmethod/latin/accounts/AccountStateChangedListener.java
similarity index 97%
rename from java-overridable/src/com/android/inputmethod/latin/accounts/AccountStateChangedListener.java
rename to java/src/com/android/inputmethod/latin/accounts/AccountStateChangedListener.java
index 60d420f..3c39c9a 100644
--- a/java-overridable/src/com/android/inputmethod/latin/accounts/AccountStateChangedListener.java
+++ b/java/src/com/android/inputmethod/latin/accounts/AccountStateChangedListener.java
@@ -16,7 +16,7 @@
 
 package com.android.inputmethod.latin.accounts;
 
-import android.support.annotation.NonNull;
+import androidx.annotation.NonNull;
 
 import javax.annotation.Nullable;
 
diff --git a/java-overridable/src/com/android/inputmethod/latin/accounts/LoginAccountUtils.java b/java/src/com/android/inputmethod/latin/accounts/LoginAccountUtils.java
similarity index 100%
rename from java-overridable/src/com/android/inputmethod/latin/accounts/LoginAccountUtils.java
rename to java/src/com/android/inputmethod/latin/accounts/LoginAccountUtils.java
diff --git a/java-overridable/src/com/android/inputmethod/latin/define/DebugFlags.java b/java/src/com/android/inputmethod/latin/define/DebugFlags.java
similarity index 100%
rename from java-overridable/src/com/android/inputmethod/latin/define/DebugFlags.java
rename to java/src/com/android/inputmethod/latin/define/DebugFlags.java
diff --git a/java-overridable/src/com/android/inputmethod/latin/define/DecoderSpecificConstants.java b/java/src/com/android/inputmethod/latin/define/DecoderSpecificConstants.java
similarity index 100%
rename from java-overridable/src/com/android/inputmethod/latin/define/DecoderSpecificConstants.java
rename to java/src/com/android/inputmethod/latin/define/DecoderSpecificConstants.java
diff --git a/java-overridable/src/com/android/inputmethod/latin/define/JniLibName.java b/java/src/com/android/inputmethod/latin/define/JniLibName.java
similarity index 100%
rename from java-overridable/src/com/android/inputmethod/latin/define/JniLibName.java
rename to java/src/com/android/inputmethod/latin/define/JniLibName.java
diff --git a/java-overridable/src/com/android/inputmethod/latin/define/ProductionFlags.java b/java/src/com/android/inputmethod/latin/define/ProductionFlags.java
similarity index 100%
rename from java-overridable/src/com/android/inputmethod/latin/define/ProductionFlags.java
rename to java/src/com/android/inputmethod/latin/define/ProductionFlags.java
diff --git a/java/src/com/android/inputmethod/latin/makedict/FormatSpec.java b/java/src/com/android/inputmethod/latin/makedict/FormatSpec.java
index e422c4c..288261b 100644
--- a/java/src/com/android/inputmethod/latin/makedict/FormatSpec.java
+++ b/java/src/com/android/inputmethod/latin/makedict/FormatSpec.java
@@ -174,6 +174,9 @@
     public static final int VERSION202 = 202;
     // format version for Fava Dictionaries.
     public static final int VERSION_DELIGHT3 = 86736212;
+    public static final int MINIMUM_SUPPORTED_VERSION_OF_CODE_POINT_TABLE = VERSION201;
+    // Dictionary version used for testing.
+    public static final int VERSION4_ONLY_FOR_TESTING = 399;
     public static final int VERSION402 = 402;
     public static final int VERSION403 = 403;
     public static final int VERSION4 = VERSION403;
diff --git a/java/src/com/android/inputmethod/latin/permissions/PermissionsActivity.java b/java/src/com/android/inputmethod/latin/permissions/PermissionsActivity.java
index bdd63fa..36d8ed9 100644
--- a/java/src/com/android/inputmethod/latin/permissions/PermissionsActivity.java
+++ b/java/src/com/android/inputmethod/latin/permissions/PermissionsActivity.java
@@ -21,8 +21,8 @@
 import android.content.Context;
 import android.content.Intent;
 import android.os.Bundle;
-import android.support.annotation.NonNull;
-import android.support.v4.app.ActivityCompat;
+import androidx.annotation.NonNull;
+import androidx.core.app.ActivityCompat;
 
 /**
  * An activity to help request permissions. It's used when no other activity is available, e.g. in
diff --git a/java/src/com/android/inputmethod/latin/permissions/PermissionsUtil.java b/java/src/com/android/inputmethod/latin/permissions/PermissionsUtil.java
index 747f64f..9a618a7 100644
--- a/java/src/com/android/inputmethod/latin/permissions/PermissionsUtil.java
+++ b/java/src/com/android/inputmethod/latin/permissions/PermissionsUtil.java
@@ -20,9 +20,9 @@
 import android.content.Context;
 import android.content.pm.PackageManager;
 import android.os.Build;
-import android.support.annotation.NonNull;
-import android.support.v4.app.ActivityCompat;
-import android.support.v4.content.ContextCompat;
+import androidx.annotation.NonNull;
+import androidx.core.app.ActivityCompat;
+import androidx.core.content.ContextCompat;
 
 import java.util.ArrayList;
 import java.util.List;
diff --git a/java-overridable/src/com/android/inputmethod/latin/settings/AdditionalFeaturesSettingUtils.java b/java/src/com/android/inputmethod/latin/settings/AdditionalFeaturesSettingUtils.java
similarity index 100%
rename from java-overridable/src/com/android/inputmethod/latin/settings/AdditionalFeaturesSettingUtils.java
rename to java/src/com/android/inputmethod/latin/settings/AdditionalFeaturesSettingUtils.java
diff --git a/java/src/com/android/inputmethod/latin/settings/CustomInputStyleSettingsFragment.java b/java/src/com/android/inputmethod/latin/settings/CustomInputStyleSettingsFragment.java
index 46fcc71..56e8f16 100644
--- a/java/src/com/android/inputmethod/latin/settings/CustomInputStyleSettingsFragment.java
+++ b/java/src/com/android/inputmethod/latin/settings/CustomInputStyleSettingsFragment.java
@@ -26,7 +26,7 @@
 import android.preference.Preference;
 import android.preference.PreferenceFragment;
 import android.preference.PreferenceGroup;
-import android.support.v4.view.ViewCompat;
+import androidx.core.view.ViewCompat;
 import android.text.TextUtils;
 import android.util.Log;
 import android.view.LayoutInflater;
diff --git a/java/src/com/android/inputmethod/latin/settings/SettingsActivity.java b/java/src/com/android/inputmethod/latin/settings/SettingsActivity.java
index a7d157a..ac16577 100644
--- a/java/src/com/android/inputmethod/latin/settings/SettingsActivity.java
+++ b/java/src/com/android/inputmethod/latin/settings/SettingsActivity.java
@@ -25,7 +25,7 @@
 import android.content.Intent;
 import android.os.Bundle;
 import android.preference.PreferenceActivity;
-import android.support.v4.app.ActivityCompat;
+import androidx.core.app.ActivityCompat;
 import android.view.MenuItem;
 
 public final class SettingsActivity extends PreferenceActivity
diff --git a/java/src/com/android/inputmethod/latin/setup/SetupStartIndicatorView.java b/java/src/com/android/inputmethod/latin/setup/SetupStartIndicatorView.java
index 73d25f6..789694f 100644
--- a/java/src/com/android/inputmethod/latin/setup/SetupStartIndicatorView.java
+++ b/java/src/com/android/inputmethod/latin/setup/SetupStartIndicatorView.java
@@ -21,7 +21,7 @@
 import android.graphics.Canvas;
 import android.graphics.Paint;
 import android.graphics.Path;
-import android.support.v4.view.ViewCompat;
+import androidx.core.view.ViewCompat;
 import android.util.AttributeSet;
 import android.view.LayoutInflater;
 import android.view.View;
diff --git a/java/src/com/android/inputmethod/latin/setup/SetupStepIndicatorView.java b/java/src/com/android/inputmethod/latin/setup/SetupStepIndicatorView.java
index 6734e61..9a39cea 100644
--- a/java/src/com/android/inputmethod/latin/setup/SetupStepIndicatorView.java
+++ b/java/src/com/android/inputmethod/latin/setup/SetupStepIndicatorView.java
@@ -20,7 +20,7 @@
 import android.graphics.Canvas;
 import android.graphics.Paint;
 import android.graphics.Path;
-import android.support.v4.view.ViewCompat;
+import androidx.core.view.ViewCompat;
 import android.util.AttributeSet;
 import android.view.View;
 
diff --git a/java/src/com/android/inputmethod/latin/spellcheck/SpellCheckerSettingsActivity.java b/java/src/com/android/inputmethod/latin/spellcheck/SpellCheckerSettingsActivity.java
index 356d9d0..5f99f90 100644
--- a/java/src/com/android/inputmethod/latin/spellcheck/SpellCheckerSettingsActivity.java
+++ b/java/src/com/android/inputmethod/latin/spellcheck/SpellCheckerSettingsActivity.java
@@ -24,7 +24,7 @@
 import android.os.Build;
 import android.os.Bundle;
 import android.preference.PreferenceActivity;
-import android.support.v4.app.ActivityCompat;
+import androidx.core.app.ActivityCompat;
 
 /**
  * Spell checker preference screen.
diff --git a/java/src/com/android/inputmethod/latin/suggestions/SuggestionStripView.java b/java/src/com/android/inputmethod/latin/suggestions/SuggestionStripView.java
index c1d1fad..840a4aa 100644
--- a/java/src/com/android/inputmethod/latin/suggestions/SuggestionStripView.java
+++ b/java/src/com/android/inputmethod/latin/suggestions/SuggestionStripView.java
@@ -21,7 +21,7 @@
 import android.content.res.TypedArray;
 import android.graphics.Color;
 import android.graphics.drawable.Drawable;
-import android.support.v4.view.ViewCompat;
+import androidx.core.view.ViewCompat;
 import android.text.TextUtils;
 import android.util.AttributeSet;
 import android.util.TypedValue;
diff --git a/java-overridable/src/com/android/inputmethod/latin/touchinputconsumer/GestureConsumer.java b/java/src/com/android/inputmethod/latin/touchinputconsumer/GestureConsumer.java
similarity index 100%
rename from java-overridable/src/com/android/inputmethod/latin/touchinputconsumer/GestureConsumer.java
rename to java/src/com/android/inputmethod/latin/touchinputconsumer/GestureConsumer.java
diff --git a/java-overridable/src/com/android/inputmethod/latin/utils/DictionaryHeaderUtils.java b/java/src/com/android/inputmethod/latin/utils/DictionaryHeaderUtils.java
similarity index 100%
rename from java-overridable/src/com/android/inputmethod/latin/utils/DictionaryHeaderUtils.java
rename to java/src/com/android/inputmethod/latin/utils/DictionaryHeaderUtils.java
diff --git a/java-overridable/src/com/android/inputmethod/latin/utils/FeedbackUtils.java b/java/src/com/android/inputmethod/latin/utils/FeedbackUtils.java
similarity index 100%
rename from java-overridable/src/com/android/inputmethod/latin/utils/FeedbackUtils.java
rename to java/src/com/android/inputmethod/latin/utils/FeedbackUtils.java
diff --git a/java-overridable/src/com/android/inputmethod/latin/utils/FileTransforms.java b/java/src/com/android/inputmethod/latin/utils/FileTransforms.java
similarity index 100%
rename from java-overridable/src/com/android/inputmethod/latin/utils/FileTransforms.java
rename to java/src/com/android/inputmethod/latin/utils/FileTransforms.java
diff --git a/java-overridable/src/com/android/inputmethod/latin/utils/ManagedProfileUtils.java b/java/src/com/android/inputmethod/latin/utils/ManagedProfileUtils.java
similarity index 100%
rename from java-overridable/src/com/android/inputmethod/latin/utils/ManagedProfileUtils.java
rename to java/src/com/android/inputmethod/latin/utils/ManagedProfileUtils.java
diff --git a/java-overridable/src/com/android/inputmethod/latin/utils/MetadataFileUriGetter.java b/java/src/com/android/inputmethod/latin/utils/MetadataFileUriGetter.java
similarity index 100%
rename from java-overridable/src/com/android/inputmethod/latin/utils/MetadataFileUriGetter.java
rename to java/src/com/android/inputmethod/latin/utils/MetadataFileUriGetter.java
diff --git a/java-overridable/src/com/android/inputmethod/latin/utils/StatsUtils.java b/java/src/com/android/inputmethod/latin/utils/StatsUtils.java
similarity index 100%
rename from java-overridable/src/com/android/inputmethod/latin/utils/StatsUtils.java
rename to java/src/com/android/inputmethod/latin/utils/StatsUtils.java
diff --git a/java-overridable/src/com/android/inputmethod/latin/utils/StatsUtilsManager.java b/java/src/com/android/inputmethod/latin/utils/StatsUtilsManager.java
similarity index 100%
rename from java-overridable/src/com/android/inputmethod/latin/utils/StatsUtilsManager.java
rename to java/src/com/android/inputmethod/latin/utils/StatsUtilsManager.java
diff --git a/java/src/com/android/inputmethodcommon/InputMethodSettingsActivity.java b/java/src/com/android/inputmethodcommon/InputMethodSettingsActivity.java
new file mode 100644
index 0000000..6e868c9
--- /dev/null
+++ b/java/src/com/android/inputmethodcommon/InputMethodSettingsActivity.java
@@ -0,0 +1,94 @@
+/*
+ * Copyright (C) 2011 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.inputmethodcommon;
+
+import android.graphics.drawable.Drawable;
+import android.os.Bundle;
+import android.preference.PreferenceActivity;
+
+/**
+ * This is a helper class for an IME's settings preference activity. It's recommended for every
+ * IME to have its own settings preference activity which inherits this class.
+ */
+public abstract class InputMethodSettingsActivity extends PreferenceActivity
+        implements InputMethodSettingsInterface {
+    private final InputMethodSettingsImpl mSettings = new InputMethodSettingsImpl();
+    @SuppressWarnings("deprecation")
+    @Override
+    public void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        setPreferenceScreen(getPreferenceManager().createPreferenceScreen(this));
+        mSettings.init(this, getPreferenceScreen());
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void setInputMethodSettingsCategoryTitle(int resId) {
+        mSettings.setInputMethodSettingsCategoryTitle(resId);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void setInputMethodSettingsCategoryTitle(CharSequence title) {
+        mSettings.setInputMethodSettingsCategoryTitle(title);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void setSubtypeEnablerTitle(int resId) {
+        mSettings.setSubtypeEnablerTitle(resId);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void setSubtypeEnablerTitle(CharSequence title) {
+        mSettings.setSubtypeEnablerTitle(title);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void setSubtypeEnablerIcon(int resId) {
+        mSettings.setSubtypeEnablerIcon(resId);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void setSubtypeEnablerIcon(Drawable drawable) {
+        mSettings.setSubtypeEnablerIcon(drawable);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void onResume() {
+        super.onResume();
+        mSettings.updateSubtypeEnabler();
+    }
+}
diff --git a/java/src/com/android/inputmethodcommon/InputMethodSettingsFragment.java b/java/src/com/android/inputmethodcommon/InputMethodSettingsFragment.java
new file mode 100644
index 0000000..49f0b87
--- /dev/null
+++ b/java/src/com/android/inputmethodcommon/InputMethodSettingsFragment.java
@@ -0,0 +1,95 @@
+/*
+ * Copyright (C) 2011 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.inputmethodcommon;
+
+import android.content.Context;
+import android.graphics.drawable.Drawable;
+import android.os.Bundle;
+import android.preference.PreferenceFragment;
+
+/**
+ * This is a helper class for an IME's settings preference fragment. It's recommended for every
+ * IME to have its own settings preference fragment which inherits this class.
+ */
+public abstract class InputMethodSettingsFragment extends PreferenceFragment
+        implements InputMethodSettingsInterface {
+    private final InputMethodSettingsImpl mSettings = new InputMethodSettingsImpl();
+    @Override
+    public void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        final Context context = getActivity();
+        setPreferenceScreen(getPreferenceManager().createPreferenceScreen(context));
+        mSettings.init(context, getPreferenceScreen());
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void setInputMethodSettingsCategoryTitle(int resId) {
+        mSettings.setInputMethodSettingsCategoryTitle(resId);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void setInputMethodSettingsCategoryTitle(CharSequence title) {
+        mSettings.setInputMethodSettingsCategoryTitle(title);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void setSubtypeEnablerTitle(int resId) {
+        mSettings.setSubtypeEnablerTitle(resId);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void setSubtypeEnablerTitle(CharSequence title) {
+        mSettings.setSubtypeEnablerTitle(title);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void setSubtypeEnablerIcon(int resId) {
+        mSettings.setSubtypeEnablerIcon(resId);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void setSubtypeEnablerIcon(Drawable drawable) {
+        mSettings.setSubtypeEnablerIcon(drawable);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void onResume() {
+        super.onResume();
+        mSettings.updateSubtypeEnabler();
+    }
+}
diff --git a/java/src/com/android/inputmethodcommon/InputMethodSettingsImpl.java b/java/src/com/android/inputmethodcommon/InputMethodSettingsImpl.java
new file mode 100644
index 0000000..cfa1a65
--- /dev/null
+++ b/java/src/com/android/inputmethodcommon/InputMethodSettingsImpl.java
@@ -0,0 +1,179 @@
+/*
+ * Copyright (C) 2011 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.inputmethodcommon;
+
+import android.content.Context;
+import android.content.Intent;
+import android.graphics.drawable.Drawable;
+import android.preference.Preference;
+import android.preference.Preference.OnPreferenceClickListener;
+import android.preference.PreferenceScreen;
+import android.provider.Settings;
+import android.text.TextUtils;
+import android.view.inputmethod.InputMethodInfo;
+import android.view.inputmethod.InputMethodManager;
+import android.view.inputmethod.InputMethodSubtype;
+
+import java.util.List;
+
+/* package private */ class InputMethodSettingsImpl implements InputMethodSettingsInterface {
+    private Preference mSubtypeEnablerPreference;
+    private int mInputMethodSettingsCategoryTitleRes;
+    private CharSequence mInputMethodSettingsCategoryTitle;
+    private int mSubtypeEnablerTitleRes;
+    private CharSequence mSubtypeEnablerTitle;
+    private int mSubtypeEnablerIconRes;
+    private Drawable mSubtypeEnablerIcon;
+    private InputMethodManager mImm;
+    private InputMethodInfo mImi;
+
+    /**
+     * Initialize internal states of this object.
+     * @param context the context for this application.
+     * @param prefScreen a PreferenceScreen of PreferenceActivity or PreferenceFragment.
+     * @return true if this application is an IME and has two or more subtypes, false otherwise.
+     */
+    public boolean init(final Context context, final PreferenceScreen prefScreen) {
+        mImm = (InputMethodManager) context.getSystemService(Context.INPUT_METHOD_SERVICE);
+        mImi = getMyImi(context, mImm);
+        if (mImi == null || mImi.getSubtypeCount() <= 1) {
+            return false;
+        }
+        final Intent intent = new Intent(Settings.ACTION_INPUT_METHOD_SUBTYPE_SETTINGS);
+        intent.putExtra(Settings.EXTRA_INPUT_METHOD_ID, mImi.getId());
+        intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK
+                | Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED
+                | Intent.FLAG_ACTIVITY_CLEAR_TOP);
+        mSubtypeEnablerPreference = new Preference(context);
+        mSubtypeEnablerPreference.setIntent(intent);
+        prefScreen.addPreference(mSubtypeEnablerPreference);
+        updateSubtypeEnabler();
+        return true;
+    }
+
+    private static InputMethodInfo getMyImi(Context context, InputMethodManager imm) {
+        final List<InputMethodInfo> imis = imm.getInputMethodList();
+        for (int i = 0; i < imis.size(); ++i) {
+            final InputMethodInfo imi = imis.get(i);
+            if (imis.get(i).getPackageName().equals(context.getPackageName())) {
+                return imi;
+            }
+        }
+        return null;
+    }
+
+    private static String getEnabledSubtypesLabel(
+            Context context, InputMethodManager imm, InputMethodInfo imi) {
+        if (context == null || imm == null || imi == null) return null;
+        final List<InputMethodSubtype> subtypes = imm.getEnabledInputMethodSubtypeList(imi, true);
+        final StringBuilder sb = new StringBuilder();
+        final int N = subtypes.size();
+        for (int i = 0; i < N; ++i) {
+            final InputMethodSubtype subtype = subtypes.get(i);
+            if (sb.length() > 0) {
+                sb.append(", ");
+            }
+            sb.append(subtype.getDisplayName(context, imi.getPackageName(),
+                    imi.getServiceInfo().applicationInfo));
+        }
+        return sb.toString();
+    }
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void setInputMethodSettingsCategoryTitle(int resId) {
+        mInputMethodSettingsCategoryTitleRes = resId;
+        updateSubtypeEnabler();
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void setInputMethodSettingsCategoryTitle(CharSequence title) {
+        mInputMethodSettingsCategoryTitleRes = 0;
+        mInputMethodSettingsCategoryTitle = title;
+        updateSubtypeEnabler();
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void setSubtypeEnablerTitle(int resId) {
+        mSubtypeEnablerTitleRes = resId;
+        updateSubtypeEnabler();
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void setSubtypeEnablerTitle(CharSequence title) {
+        mSubtypeEnablerTitleRes = 0;
+        mSubtypeEnablerTitle = title;
+        updateSubtypeEnabler();
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void setSubtypeEnablerIcon(int resId) {
+        mSubtypeEnablerIconRes = resId;
+        updateSubtypeEnabler();
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void setSubtypeEnablerIcon(Drawable drawable) {
+        mSubtypeEnablerIconRes = 0;
+        mSubtypeEnablerIcon = drawable;
+        updateSubtypeEnabler();
+    }
+
+    public void updateSubtypeEnabler() {
+        final Preference pref = mSubtypeEnablerPreference;
+        if (pref == null) {
+            return;
+        }
+        final Context context = pref.getContext();
+        final CharSequence title;
+        if (mSubtypeEnablerTitleRes != 0) {
+            title = context.getString(mSubtypeEnablerTitleRes);
+        } else {
+            title = mSubtypeEnablerTitle;
+        }
+        pref.setTitle(title);
+        final Intent intent = pref.getIntent();
+        if (intent != null) {
+            intent.putExtra(Intent.EXTRA_TITLE, title);
+        }
+        final String summary = getEnabledSubtypesLabel(context, mImm, mImi);
+        if (!TextUtils.isEmpty(summary)) {
+            pref.setSummary(summary);
+        }
+        if (mSubtypeEnablerIconRes != 0) {
+            pref.setIcon(mSubtypeEnablerIconRes);
+        } else {
+            pref.setIcon(mSubtypeEnablerIcon);
+        }
+    }
+}
diff --git a/java/src/com/android/inputmethodcommon/InputMethodSettingsInterface.java b/java/src/com/android/inputmethodcommon/InputMethodSettingsInterface.java
new file mode 100644
index 0000000..6e97fae
--- /dev/null
+++ b/java/src/com/android/inputmethodcommon/InputMethodSettingsInterface.java
@@ -0,0 +1,63 @@
+/*
+ * Copyright (C) 2011 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.inputmethodcommon;
+
+import android.graphics.drawable.Drawable;
+
+/**
+ * InputMethodSettingsInterface is the interface for adding IME related preferences to
+ * PreferenceActivity or PreferenceFragment.
+ */
+public interface InputMethodSettingsInterface {
+    /**
+     * Sets the title for the input method settings category with a resource ID.
+     * @param resId The resource ID of the title.
+     */
+    public void setInputMethodSettingsCategoryTitle(int resId);
+
+    /**
+     * Sets the title for the input method settings category with a CharSequence.
+     * @param title The title for this preference.
+     */
+    public void setInputMethodSettingsCategoryTitle(CharSequence title);
+
+    /**
+     * Sets the title for the input method enabler preference for launching subtype enabler with a
+     * resource ID.
+     * @param resId The resource ID of the title.
+     */
+    public void setSubtypeEnablerTitle(int resId);
+
+    /**
+     * Sets the title for the input method enabler preference for launching subtype enabler with a
+     * CharSequence.
+     * @param title The title for this preference.
+     */
+    public void setSubtypeEnablerTitle(CharSequence title);
+
+    /**
+     * Sets the icon for the preference for launching subtype enabler with a resource ID.
+     * @param resId The resource id of an optional icon for the preference.
+     */
+    public void setSubtypeEnablerIcon(int resId);
+
+    /**
+     * Sets the icon for the Preference for launching subtype enabler with a Drawable.
+     * @param drawable The drawable of an optional icon for the preference.
+     */
+    public void setSubtypeEnablerIcon(Drawable drawable);
+}
diff --git a/native/Android.mk b/native/Android.mk
deleted file mode 100644
index 5053e7d..0000000
--- a/native/Android.mk
+++ /dev/null
@@ -1 +0,0 @@
-include $(call all-subdir-makefiles)
diff --git a/native/dicttoolkit/Android.bp b/native/dicttoolkit/Android.bp
new file mode 100644
index 0000000..b214ff9
--- /dev/null
+++ b/native/dicttoolkit/Android.bp
@@ -0,0 +1,94 @@
+// Copyright (C) 2014 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.
+
+cc_defaults {
+    name: "dicttoolkit_defaults",
+
+    cflags: [
+        "-Werror",
+        "-Wall",
+        "-Wextra",
+        "-Weffc++",
+        "-Wformat=2",
+        "-Wcast-qual",
+        "-Wcast-align",
+        "-Wwrite-strings",
+        "-Wfloat-equal",
+        "-Wpointer-arith",
+        "-Winit-self",
+        "-Wredundant-decls",
+        "-Woverloaded-virtual",
+        "-Wsign-promo",
+        "-Wno-system-headers",
+
+        // To suppress compiler warnings for unused variables/functions used for debug features etc.
+        "-Wno-unused-parameter",
+        "-Wno-unused-function",
+    ],
+
+    local_include_dirs: ["src"],
+    // TODO
+    include_dirs: ["packages/inputmethods/LatinIME/native/jni/src"],
+
+    product_variables: {
+        unbundled_build: {
+            enabled: false,
+        },
+    },
+}
+
+cc_library_host_static {
+    name: "liblatinime_dicttoolkit",
+    defaults: ["dicttoolkit_defaults"],
+
+    srcs: [
+        "src/command_executors/diff_executor.cpp",
+        "src/command_executors/header_executor.cpp",
+        "src/command_executors/help_executor.cpp",
+        "src/command_executors/info_executor.cpp",
+        "src/command_executors/makedict_executor.cpp",
+        "src/offdevice_intermediate_dict/offdevice_intermediate_dict.cpp",
+        "src/utils/arguments_parser.cpp",
+        "src/utils/command_utils.cpp",
+        "src/utils/utf8_utils.cpp",
+
+        ":LATIN_IME_CORE_SRC_FILES",
+    ],
+}
+
+cc_binary_host {
+    name: "dicttoolkit",
+    defaults: ["dicttoolkit_defaults"],
+
+    srcs: ["dict_toolkit_main.cpp"],
+    static_libs: ["liblatinime_dicttoolkit"],
+}
+
+cc_test_host {
+    name: "dicttoolkit_unittests",
+    defaults: ["dicttoolkit_defaults"],
+
+    srcs: [
+        "tests/command_executors/diff_executor_test.cpp",
+        "tests/command_executors/header_executor_test.cpp",
+        "tests/command_executors/info_executor_test.cpp",
+        "tests/command_executors/makedict_executor_test.cpp",
+        "tests/dict_toolkit_defines_test.cpp",
+        "tests/offdevice_intermediate_dict/offdevice_intermediate_dict_test.cpp",
+        "tests/utils/arguments_parser_test.cpp",
+        "tests/utils/command_utils_test.cpp",
+        "tests/utils/utf8_utils_test.cpp",
+    ],
+    static_libs: ["liblatinime_dicttoolkit"],
+}
diff --git a/native/dicttoolkit/Android.mk b/native/dicttoolkit/Android.mk
deleted file mode 100644
index 7a44686..0000000
--- a/native/dicttoolkit/Android.mk
+++ /dev/null
@@ -1,66 +0,0 @@
-# Copyright (C) 2014 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.
-
-ifeq (,$(TARGET_BUILD_APPS))
-
-# Only build if it's explicitly requested, or running mm/mmm.
-ifneq ($(ONE_SHOT_MAKEFILE)$(filter $(MAKECMDGOALS),dicttoolkit),)
-
-# HACK: Temporarily disable host tool build on Mac until the build system is ready for C++11.
-LATINIME_HOST_OSNAME := $(shell uname -s)
-ifneq ($(LATINIME_HOST_OSNAME), Darwin) # TODO: Remove this
-
-LOCAL_PATH := $(call my-dir)
-
-include $(CLEAR_VARS)
-
-LATIN_IME_CORE_PATH := $(LOCAL_PATH)/../jni
-
-LATIN_IME_DICT_TOOLKIT_SRC_DIR := src
-LATIN_IME_CORE_SRC_DIR := ../jni/src
-
-LOCAL_CFLAGS += -Werror -Wall -Wextra -Weffc++ -Wformat=2 -Wcast-qual -Wcast-align \
-    -Wwrite-strings -Wfloat-equal -Wpointer-arith -Winit-self -Wredundant-decls \
-    -Woverloaded-virtual -Wsign-promo -Wno-system-headers
-
-# To suppress compiler warnings for unused variables/functions used for debug features etc.
-LOCAL_CFLAGS += -Wno-unused-parameter -Wno-unused-function
-LOCAL_CFLAGS += -Wno-unused-parameter -Wno-unused-function
-
-include $(LOCAL_PATH)/NativeFileList.mk
-include $(LATIN_IME_CORE_PATH)/NativeFileList.mk
-
-LOCAL_C_INCLUDES += $(LOCAL_PATH)/$(LATIN_IME_DICT_TOOLKIT_SRC_DIR) \
-    $(LATIN_IME_CORE_PATH)/$(LATIN_IME_CORE_SRC_DIR)
-
-LOCAL_SRC_FILES := $(LATIN_IME_DICT_TOOLKIT_MAIN_SRC_FILES) \
-    $(addprefix $(LATIN_IME_DICT_TOOLKIT_SRC_DIR)/, $(LATIN_IME_DICT_TOOLKIT_SRC_FILES)) \
-    $(addprefix $(LATIN_IME_CORE_SRC_DIR)/, $(LATIN_IME_CORE_SRC_FILES))
-
-LOCAL_MODULE := dicttoolkit
-LOCAL_MODULE_TAGS := optional
-
-LOCAL_CXX_STL := libc++
-
-include $(BUILD_HOST_EXECUTABLE)
-#################### Clean up the tmp vars
-include $(LOCAL_PATH)/CleanupNativeFileList.mk
-#################### Unit test
-include $(LOCAL_PATH)/UnitTests.mk
-
-endif # Darwin - TODO: Remove this
-
-endif
-
-endif # TARGET_BUILD_APPS
diff --git a/native/dicttoolkit/CleanupNativeFileList.mk b/native/dicttoolkit/CleanupNativeFileList.mk
deleted file mode 100644
index b804b41..0000000
--- a/native/dicttoolkit/CleanupNativeFileList.mk
+++ /dev/null
@@ -1,17 +0,0 @@
-# Copyright (C) 2014 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.
-
-LATIN_IME_DICT_TOOLKIT_MAIN_SRC_FILES :=
-LATIN_IME_DICT_TOOLKIT_SRC_FILES :=
-LATIN_IME_DICT_TOOLKIT_TEST_FILES :=
diff --git a/native/dicttoolkit/NativeFileList.mk b/native/dicttoolkit/NativeFileList.mk
deleted file mode 100644
index 9a547b0..0000000
--- a/native/dicttoolkit/NativeFileList.mk
+++ /dev/null
@@ -1,44 +0,0 @@
-# Copyright (C) 2014 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.
-
-LATIN_IME_DICT_TOOLKIT_MAIN_SRC_FILES := \
-    dict_toolkit_main.cpp
-
-LATIN_IME_DICT_TOOLKIT_SRC_FILES := \
-    $(addprefix command_executors/, \
-        diff_executor.cpp \
-        header_executor.cpp \
-        help_executor.cpp \
-        info_executor.cpp \
-        makedict_executor.cpp) \
-    $(addprefix offdevice_intermediate_dict/, \
-        offdevice_intermediate_dict.cpp) \
-    $(addprefix utils/, \
-        arguments_parser.cpp \
-        command_utils.cpp \
-        utf8_utils.cpp)
-
-LATIN_IME_DICT_TOOLKIT_TEST_FILES := \
-    $(addprefix command_executors/, \
-        diff_executor_test.cpp \
-        header_executor_test.cpp \
-        info_executor_test.cpp \
-        makedict_executor_test.cpp) \
-    dict_toolkit_defines_test.cpp \
-    $(addprefix offdevice_intermediate_dict/, \
-        offdevice_intermediate_dict_test.cpp) \
-    $(addprefix utils/, \
-        arguments_parser_test.cpp \
-        command_utils_test.cpp \
-        utf8_utils_test.cpp)
diff --git a/native/dicttoolkit/UnitTests.mk b/native/dicttoolkit/UnitTests.mk
deleted file mode 100644
index 55177c0..0000000
--- a/native/dicttoolkit/UnitTests.mk
+++ /dev/null
@@ -1,65 +0,0 @@
-# Copyright (C) 2014 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.
-
-ifeq (,$(TARGET_BUILD_APPS))
-
-LOCAL_PATH := $(call my-dir)
-
-######################################
-include $(CLEAR_VARS)
-
-LATIN_IME_CORE_PATH := $(LOCAL_PATH)/../jni
-
-LATIN_IME_DICT_TOOLKIT_SRC_DIR := src
-LATIN_IME_CORE_SRC_DIR := ../jni/src
-LATIN_DICT_TOOLKIT_TEST_SRC_DIR := tests
-
-include $(LOCAL_PATH)/NativeFileList.mk
-include $(LATIN_IME_CORE_PATH)/NativeFileList.mk
-
-LATIN_IME_SRC_DIR := src
-LOCAL_ADDRESS_SANITIZER := true
-LOCAL_CFLAGS += -Wno-unused-parameter -Wno-unused-function
-LOCAL_CXX_STL := libc++
-LOCAL_C_INCLUDES += $(LOCAL_PATH)/$(LATIN_IME_DICT_TOOLKIT_SRC_DIR) \
-    $(LATIN_IME_CORE_PATH)/$(LATIN_IME_CORE_SRC_DIR)
-LOCAL_MODULE := liblatinime_dicttoolkit_host_static_for_unittests
-LOCAL_MODULE_TAGS := optional
-LOCAL_SRC_FILES := \
-    $(addprefix $(LATIN_IME_DICT_TOOLKIT_SRC_DIR)/, $(LATIN_IME_DICT_TOOLKIT_SRC_FILES)) \
-    $(addprefix $(LATIN_IME_CORE_SRC_DIR)/, $(LATIN_IME_CORE_SRC_FILES))
-include $(BUILD_HOST_STATIC_LIBRARY)
-
-include $(CLEAR_VARS)
-
-LOCAL_ADDRESS_SANITIZER := true
-LOCAL_CFLAGS += -Wno-unused-parameter -Wno-unused-function
-LOCAL_CXX_STL := libc++
-LOCAL_C_INCLUDES += $(LOCAL_PATH)/$(LATIN_IME_DICT_TOOLKIT_SRC_DIR) \
-    $(LATIN_IME_CORE_PATH)/$(LATIN_IME_CORE_SRC_DIR)
-LOCAL_MODULE := dicttoolkit_unittests
-LOCAL_MODULE_TAGS := tests
-LOCAL_SRC_FILES := \
-    $(addprefix $(LATIN_DICT_TOOLKIT_TEST_SRC_DIR)/, $(LATIN_IME_DICT_TOOLKIT_TEST_FILES))
-LOCAL_STATIC_LIBRARIES += liblatinime_dicttoolkit_host_static_for_unittests
-include $(BUILD_HOST_NATIVE_TEST)
-
-include $(LOCAL_PATH)/CleanupNativeFileList.mk
-
-#################### Clean up the tmp vars
-LATINIME_HOST_OSNAME :=
-LATIN_IME_SRC_DIR :=
-LATIN_IME_TEST_SRC_DIR :=
-
-endif # TARGET_BUILD_APPS
diff --git a/native/dicttoolkit/src/offdevice_intermediate_dict/offdevice_intermediate_dict.cpp b/native/dicttoolkit/src/offdevice_intermediate_dict/offdevice_intermediate_dict.cpp
index af28131..e94a9c2 100644
--- a/native/dicttoolkit/src/offdevice_intermediate_dict/offdevice_intermediate_dict.cpp
+++ b/native/dicttoolkit/src/offdevice_intermediate_dict/offdevice_intermediate_dict.cpp
@@ -93,7 +93,7 @@
     const OffdeviceIntermediateDictPtNodeArray *ptNodeArray = &mRootPtNodeArray;
     for (size_t i = 0; i < codePoints.size();) {
         bool foundNext = false;
-        for (const auto ptNode : ptNodeArray->getPtNodeList()) {
+        for (const auto& ptNode : ptNodeArray->getPtNodeList()) {
             const CodePointArrayView ptNodeCodePoints = ptNode->getPtNodeCodePoints();
             if (codePoints[i] < ptNodeCodePoints[0]) {
                 continue;
diff --git a/native/dicttoolkit/src/offdevice_intermediate_dict/offdevice_intermediate_dict.h b/native/dicttoolkit/src/offdevice_intermediate_dict/offdevice_intermediate_dict.h
index 13d26ba..ea17a31 100644
--- a/native/dicttoolkit/src/offdevice_intermediate_dict/offdevice_intermediate_dict.h
+++ b/native/dicttoolkit/src/offdevice_intermediate_dict/offdevice_intermediate_dict.h
@@ -20,7 +20,7 @@
 #include "dict_toolkit_defines.h"
 #include "offdevice_intermediate_dict/offdevice_intermediate_dict_header.h"
 #include "offdevice_intermediate_dict/offdevice_intermediate_dict_pt_node_array.h"
-#include "suggest/core/dictionary/property/word_property.h"
+#include "dictionary/property/word_property.h"
 #include "utils/int_array_view.h"
 
 namespace latinime {
diff --git a/native/dicttoolkit/src/offdevice_intermediate_dict/offdevice_intermediate_dict_pt_node.h b/native/dicttoolkit/src/offdevice_intermediate_dict/offdevice_intermediate_dict_pt_node.h
index 721ccd7..e7d7e13 100644
--- a/native/dicttoolkit/src/offdevice_intermediate_dict/offdevice_intermediate_dict_pt_node.h
+++ b/native/dicttoolkit/src/offdevice_intermediate_dict/offdevice_intermediate_dict_pt_node.h
@@ -21,7 +21,7 @@
 
 #include "dict_toolkit_defines.h"
 #include "offdevice_intermediate_dict/offdevice_intermediate_dict_pt_node_array.h"
-#include "suggest/core/dictionary/property/word_property.h"
+#include "dictionary/property/word_property.h"
 #include "utils/int_array_view.h"
 
 namespace latinime {
diff --git a/native/dicttoolkit/tests/offdevice_intermediate_dict/offdevice_intermediate_dict_test.cpp b/native/dicttoolkit/tests/offdevice_intermediate_dict/offdevice_intermediate_dict_test.cpp
index f2e24ab..89598de 100644
--- a/native/dicttoolkit/tests/offdevice_intermediate_dict/offdevice_intermediate_dict_test.cpp
+++ b/native/dicttoolkit/tests/offdevice_intermediate_dict/offdevice_intermediate_dict_test.cpp
@@ -20,7 +20,7 @@
 
 #include <vector>
 
-#include "suggest/core/dictionary/property/word_property.h"
+#include "dictionary/property/word_property.h"
 #include "utils/int_array_view.h"
 
 namespace latinime {
diff --git a/native/jni/Android.bp b/native/jni/Android.bp
new file mode 100644
index 0000000..5649fc1
--- /dev/null
+++ b/native/jni/Android.bp
@@ -0,0 +1,215 @@
+// Copyright (C) 2013 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.
+
+filegroup {
+    name: "LATIN_IME_CORE_SRC_FILES",
+    srcs: [
+        "src/dictionary/header/header_policy.cpp",
+        "src/dictionary/header/header_read_write_utils.cpp",
+        "src/dictionary/property/ngram_context.cpp",
+        "src/dictionary/structure/dictionary_structure_with_buffer_policy_factory.cpp",
+        "src/dictionary/structure/pt_common/bigram/bigram_list_read_write_utils.cpp",
+        "src/dictionary/structure/pt_common/dynamic_pt_gc_event_listeners.cpp",
+        "src/dictionary/structure/pt_common/dynamic_pt_reading_helper.cpp",
+        "src/dictionary/structure/pt_common/dynamic_pt_reading_utils.cpp",
+        "src/dictionary/structure/pt_common/dynamic_pt_updating_helper.cpp",
+        "src/dictionary/structure/pt_common/dynamic_pt_writing_utils.cpp",
+        "src/dictionary/structure/pt_common/patricia_trie_reading_utils.cpp",
+        "src/dictionary/structure/pt_common/shortcut/shortcut_list_reading_utils.cpp",
+        "src/dictionary/structure/v2/patricia_trie_policy.cpp",
+        "src/dictionary/structure/v2/ver2_patricia_trie_node_reader.cpp",
+        "src/dictionary/structure/v2/ver2_pt_node_array_reader.cpp",
+        "src/dictionary/structure/v4/ver4_dict_buffers.cpp",
+        "src/dictionary/structure/v4/ver4_dict_constants.cpp",
+        "src/dictionary/structure/v4/ver4_patricia_trie_node_reader.cpp",
+        "src/dictionary/structure/v4/ver4_patricia_trie_node_writer.cpp",
+        "src/dictionary/structure/v4/ver4_patricia_trie_policy.cpp",
+        "src/dictionary/structure/v4/ver4_patricia_trie_reading_utils.cpp",
+        "src/dictionary/structure/v4/ver4_patricia_trie_writing_helper.cpp",
+        "src/dictionary/structure/v4/ver4_pt_node_array_reader.cpp",
+        "src/dictionary/structure/v4/content/dynamic_language_model_probability_utils.cpp",
+        "src/dictionary/structure/v4/content/language_model_dict_content.cpp",
+        "src/dictionary/structure/v4/content/language_model_dict_content_global_counters.cpp",
+        "src/dictionary/structure/v4/content/shortcut_dict_content.cpp",
+        "src/dictionary/structure/v4/content/sparse_table_dict_content.cpp",
+        "src/dictionary/structure/v4/content/terminal_position_lookup_table.cpp",
+        "src/dictionary/utils/buffer_with_extendable_buffer.cpp",
+        "src/dictionary/utils/byte_array_utils.cpp",
+        "src/dictionary/utils/dict_file_writing_utils.cpp",
+        "src/dictionary/utils/file_utils.cpp",
+        "src/dictionary/utils/forgetting_curve_utils.cpp",
+        "src/dictionary/utils/format_utils.cpp",
+        "src/dictionary/utils/mmapped_buffer.cpp",
+        "src/dictionary/utils/multi_bigram_map.cpp",
+        "src/dictionary/utils/probability_utils.cpp",
+        "src/dictionary/utils/sparse_table.cpp",
+        "src/dictionary/utils/trie_map.cpp",
+        "src/suggest/core/suggest.cpp",
+        "src/suggest/core/dicnode/dic_node.cpp",
+        "src/suggest/core/dicnode/dic_node_utils.cpp",
+        "src/suggest/core/dicnode/dic_nodes_cache.cpp",
+        "src/suggest/core/dictionary/dictionary.cpp",
+        "src/suggest/core/dictionary/dictionary_utils.cpp",
+        "src/suggest/core/dictionary/digraph_utils.cpp",
+        "src/suggest/core/dictionary/error_type_utils.cpp",
+        "src/suggest/core/layout/additional_proximity_chars.cpp",
+        "src/suggest/core/layout/proximity_info.cpp",
+        "src/suggest/core/layout/proximity_info_params.cpp",
+        "src/suggest/core/layout/proximity_info_state.cpp",
+        "src/suggest/core/layout/proximity_info_state_utils.cpp",
+        "src/suggest/core/policy/weighting.cpp",
+        "src/suggest/core/session/dic_traverse_session.cpp",
+        "src/suggest/core/result/suggestion_results.cpp",
+        "src/suggest/core/result/suggestions_output_utils.cpp",
+        "src/suggest/policyimpl/gesture/gesture_suggest_policy_factory.cpp",
+        "src/suggest/policyimpl/typing/scoring_params.cpp",
+        "src/suggest/policyimpl/typing/typing_scoring.cpp",
+        "src/suggest/policyimpl/typing/typing_suggest_policy.cpp",
+        "src/suggest/policyimpl/typing/typing_traversal.cpp",
+        "src/suggest/policyimpl/typing/typing_weighting.cpp",
+        "src/utils/autocorrection_threshold_utils.cpp",
+        "src/utils/char_utils.cpp",
+        "src/utils/jni_data_utils.cpp",
+        "src/utils/log_utils.cpp",
+        "src/utils/time_keeper.cpp",
+
+        // BACKWARD_V402
+        "src/dictionary/structure/backward/v402/ver4_dict_buffers.cpp",
+        "src/dictionary/structure/backward/v402/ver4_dict_constants.cpp",
+        "src/dictionary/structure/backward/v402/ver4_patricia_trie_node_reader.cpp",
+        "src/dictionary/structure/backward/v402/ver4_patricia_trie_node_writer.cpp",
+        "src/dictionary/structure/backward/v402/ver4_patricia_trie_policy.cpp",
+        "src/dictionary/structure/backward/v402/ver4_patricia_trie_reading_utils.cpp",
+        "src/dictionary/structure/backward/v402/ver4_patricia_trie_writing_helper.cpp",
+        "src/dictionary/structure/backward/v402/ver4_pt_node_array_reader.cpp",
+        "src/dictionary/structure/backward/v402/content/bigram_dict_content.cpp",
+        "src/dictionary/structure/backward/v402/content/probability_dict_content.cpp",
+        "src/dictionary/structure/backward/v402/content/shortcut_dict_content.cpp",
+        "src/dictionary/structure/backward/v402/content/sparse_table_dict_content.cpp",
+        "src/dictionary/structure/backward/v402/content/terminal_position_lookup_table.cpp",
+        "src/dictionary/structure/backward/v402/bigram/ver4_bigram_list_policy.cpp",
+    ],
+}
+
+cc_library {
+    name: "libjni_latinime",
+    host_supported: true,
+    product_specific: true,
+
+    sdk_version: "14",
+    cflags: [
+        "-Werror",
+        "-Wall",
+        "-Wextra",
+        "-Weffc++",
+        "-Wformat=2",
+        "-Wcast-qual",
+        "-Wcast-align",
+        "-Wwrite-strings",
+        "-Wfloat-equal",
+        "-Wpointer-arith",
+        "-Winit-self",
+        "-Wredundant-decls",
+        "-Woverloaded-virtual",
+        "-Wsign-promo",
+        "-Wno-system-headers",
+        "-Wno-format-nonliteral",
+
+        // To suppress compiler warnings for unused variables/functions used for debug features etc.
+        "-Wno-unused-parameter",
+        "-Wno-unused-function",
+    ],
+    local_include_dirs: ["src"],
+
+    srcs: [
+        "com_android_inputmethod_keyboard_ProximityInfo.cpp",
+        "com_android_inputmethod_latin_BinaryDictionary.cpp",
+        "com_android_inputmethod_latin_BinaryDictionaryUtils.cpp",
+        "com_android_inputmethod_latin_DicTraverseSession.cpp",
+        "jni_common.cpp",
+
+        ":LATIN_IME_CORE_SRC_FILES",
+    ],
+
+    target: {
+        android_x86: {
+            // HACK: -mstackrealign is required for x86 builds running on pre-KitKat devices to avoid crashes
+            // with SSE instructions.
+            cflags: ["-mstackrealign"],
+        },
+        android: {
+            stl: "libc++_static",
+        },
+        host: {
+            cflags: ["-DHOST_TOOL"],
+        },
+    },
+}
+
+cc_library_static {
+    name: "liblatinime_static_for_unittests",
+    host_supported: true,
+
+    cflags: [
+        "-Wno-unused-parameter",
+        "-Wno-unused-function",
+        "-Wall",
+        "-Werror",
+    ],
+    local_include_dirs: ["src"],
+    sdk_version: "14",
+    stl: "libc++_static",
+
+    srcs: [":LATIN_IME_CORE_SRC_FILES"],
+}
+
+cc_test {
+    name: "liblatinime_unittests",
+    host_supported: true,
+
+    cflags: [
+        "-Wno-unused-parameter",
+        "-Wno-unused-function",
+        "-Wall",
+        "-Werror",
+    ],
+    local_include_dirs: ["src"],
+    sdk_version: "14",
+    stl: "libc++_static",
+
+    srcs: [
+        "tests/defines_test.cpp",
+        "tests/dictionary/header/header_read_write_utils_test.cpp",
+        "tests/dictionary/structure/v4/content/language_model_dict_content_test.cpp",
+        "tests/dictionary/structure/v4/content/language_model_dict_content_global_counters_test.cpp",
+        "tests/dictionary/structure/v4/content/probability_entry_test.cpp",
+        "tests/dictionary/structure/v4/content/terminal_position_lookup_table_test.cpp",
+        "tests/dictionary/utils/bloom_filter_test.cpp",
+        "tests/dictionary/utils/buffer_with_extendable_buffer_test.cpp",
+        "tests/dictionary/utils/byte_array_utils_test.cpp",
+        "tests/dictionary/utils/format_utils_test.cpp",
+        "tests/dictionary/utils/probability_utils_test.cpp",
+        "tests/dictionary/utils/sparse_table_test.cpp",
+        "tests/dictionary/utils/trie_map_test.cpp",
+        "tests/suggest/core/dicnode/dic_node_pool_test.cpp",
+        "tests/suggest/core/layout/geometry_utils_test.cpp",
+        "tests/suggest/core/layout/normal_distribution_2d_test.cpp",
+        "tests/suggest/policyimpl/utils/damerau_levenshtein_edit_distance_policy_test.cpp",
+        "tests/utils/autocorrection_threshold_utils_test.cpp",
+        "tests/utils/char_utils_test.cpp",
+        "tests/utils/int_array_view_test.cpp",
+        "tests/utils/time_keeper_test.cpp",
+    ],
+    static_libs: ["liblatinime_static_for_unittests"],
+}
diff --git a/native/jni/Android.mk b/native/jni/Android.mk
deleted file mode 100644
index 5384648..0000000
--- a/native/jni/Android.mk
+++ /dev/null
@@ -1,103 +0,0 @@
-# Copyright (C) 2011 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.
-
-LOCAL_PATH := $(call my-dir)
-
-############ some local flags
-# If you change any of those flags, you need to rebuild both libjni_latinime_common_static
-# and the shared library that uses libjni_latinime_common_static.
-FLAG_DBG ?= false
-FLAG_DO_PROFILE ?= false
-
-######################################
-include $(CLEAR_VARS)
-
-LATIN_IME_SRC_DIR := src
-
-LOCAL_C_INCLUDES += $(LOCAL_PATH)/$(LATIN_IME_SRC_DIR)
-
-LOCAL_CFLAGS += -Werror -Wall -Wextra -Weffc++ -Wformat=2 -Wcast-qual -Wcast-align \
-    -Wwrite-strings -Wfloat-equal -Wpointer-arith -Winit-self -Wredundant-decls \
-    -Woverloaded-virtual -Wsign-promo -Wno-system-headers
-
-# To suppress compiler warnings for unused variables/functions used for debug features etc.
-LOCAL_CFLAGS += -Wno-unused-parameter -Wno-unused-function
-
-# HACK: -mstackrealign is required for x86 builds running on pre-KitKat devices to avoid crashes
-# with SSE instructions.
-ifeq ($(TARGET_ARCH), x86)
-    LOCAL_CFLAGS += -mstackrealign
-endif # x86
-
-include $(LOCAL_PATH)/NativeFileList.mk
-
-LOCAL_SRC_FILES := \
-    $(LATIN_IME_JNI_SRC_FILES) \
-    $(addprefix $(LATIN_IME_SRC_DIR)/, $(LATIN_IME_CORE_SRC_FILES))
-
-ifeq ($(FLAG_DO_PROFILE), true)
-    $(warning Making profiling version of native library)
-    LOCAL_CFLAGS += -DFLAG_DO_PROFILE -funwind-tables
-else # FLAG_DO_PROFILE
-ifeq ($(FLAG_DBG), true)
-    $(warning Making debug version of native library)
-    LOCAL_CFLAGS += -DFLAG_DBG -funwind-tables -fno-inline
-ifeq ($(FLAG_FULL_DBG), true)
-    $(warning Making full debug version of native library)
-    LOCAL_CFLAGS += -DFLAG_FULL_DBG
-endif # FLAG_FULL_DBG
-endif # FLAG_DBG
-endif # FLAG_DO_PROFILE
-
-LOCAL_MODULE := libjni_latinime_common_static
-LOCAL_MODULE_TAGS := optional
-
-LOCAL_SDK_VERSION := 14
-LOCAL_NDK_STL_VARIANT := c++_static
-
-include $(BUILD_STATIC_LIBRARY)
-######################################
-include $(CLEAR_VARS)
-
-# All code in LOCAL_WHOLE_STATIC_LIBRARIES will be built into this shared library.
-LOCAL_WHOLE_STATIC_LIBRARIES := libjni_latinime_common_static
-
-ifeq ($(FLAG_DO_PROFILE), true)
-    $(warning Making profiling version of native library)
-    LOCAL_LDFLAGS += -llog
-else # FLAG_DO_PROFILE
-ifeq ($(FLAG_DBG), true)
-    $(warning Making debug version of native library)
-    LOCAL_LDFLAGS += -llog
-endif # FLAG_DBG
-endif # FLAG_DO_PROFILE
-
-LOCAL_MODULE := libjni_latinime
-LOCAL_MODULE_TAGS := optional
-
-LOCAL_SDK_VERSION := 14
-LOCAL_NDK_STL_VARIANT := c++_static
-LOCAL_CFLAGS := -Wall -Werror
-LOCAL_LDFLAGS += -ldl
-
-include $(BUILD_SHARED_LIBRARY)
-#################### Clean up the tmp vars
-include $(LOCAL_PATH)/CleanupNativeFileList.mk
-
-#################### Unit test on host environment
-include $(LOCAL_PATH)/HostUnitTests.mk
-
-#################### Unit test on target environment
-include $(LOCAL_PATH)/TargetUnitTests.mk
-//LOCAL_CFLAGS += -Wall -Werror
diff --git a/native/jni/Application.mk b/native/jni/Application.mk
deleted file mode 100644
index ce09535..0000000
--- a/native/jni/Application.mk
+++ /dev/null
@@ -1 +0,0 @@
-APP_STL := c++_static
diff --git a/native/jni/CleanupNativeFileList.mk b/native/jni/CleanupNativeFileList.mk
deleted file mode 100644
index eed6f1e..0000000
--- a/native/jni/CleanupNativeFileList.mk
+++ /dev/null
@@ -1,19 +0,0 @@
-# Copyright (C) 2013 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.
-
-LATIN_IME_CORE_SRC_FILES :=
-LATIN_IME_CORE_SRC_FILES_BACKWARD_V401 :=
-LATIN_IME_CORE_TEST_FILES :=
-LATIN_IME_JNI_SRC_FILES :=
-LATIN_IME_SRC_DIR :=
diff --git a/native/jni/HostUnitTests.mk b/native/jni/HostUnitTests.mk
deleted file mode 100644
index 94cd764..0000000
--- a/native/jni/HostUnitTests.mk
+++ /dev/null
@@ -1,63 +0,0 @@
-# Copyright (C) 2014 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.
-
-# Host build is never supported in unbundled (NDK/tapas) build
-ifeq (,$(TARGET_BUILD_APPS))
-
-# HACK: Temporarily disable host tool build on Mac until the build system is ready for C++11.
-LATINIME_HOST_OSNAME := $(shell uname -s)
-ifneq ($(LATINIME_HOST_OSNAME), Darwin) # TODO: Remove this
-
-LOCAL_PATH := $(call my-dir)
-
-######################################
-include $(CLEAR_VARS)
-
-include $(LOCAL_PATH)/NativeFileList.mk
-
-#################### Host library for unit test
-LATIN_IME_SRC_DIR := src
-LOCAL_ADDRESS_SANITIZER := true
-LOCAL_CFLAGS += -Wno-unused-parameter -Wno-unused-function -Wall -Werror
-LOCAL_CXX_STL := libc++
-LOCAL_C_INCLUDES += $(LOCAL_PATH)/$(LATIN_IME_SRC_DIR)
-LOCAL_MODULE := liblatinime_host_static_for_unittests
-LOCAL_MODULE_TAGS := optional
-LOCAL_SRC_FILES := $(addprefix $(LATIN_IME_SRC_DIR)/, $(LATIN_IME_CORE_SRC_FILES))
-include $(BUILD_HOST_STATIC_LIBRARY)
-
-#################### Host native tests
-include $(CLEAR_VARS)
-LATIN_IME_TEST_SRC_DIR := tests
-LOCAL_ADDRESS_SANITIZER := true
-LOCAL_CFLAGS += -Wno-unused-parameter -Wno-unused-function
-LOCAL_CFLAGS += -Wall -Werror
-LOCAL_CXX_STL := libc++
-LOCAL_C_INCLUDES += $(LOCAL_PATH)/$(LATIN_IME_SRC_DIR)
-LOCAL_MODULE := liblatinime_host_unittests
-LOCAL_MODULE_TAGS := tests
-LOCAL_SRC_FILES := $(addprefix $(LATIN_IME_TEST_SRC_DIR)/, $(LATIN_IME_CORE_TEST_FILES))
-LOCAL_STATIC_LIBRARIES += liblatinime_host_static_for_unittests
-include $(BUILD_HOST_NATIVE_TEST)
-
-include $(LOCAL_PATH)/CleanupNativeFileList.mk
-
-endif # Darwin - TODO: Remove this
-
-endif # TARGET_BUILD_APPS
-
-#################### Clean up the tmp vars
-LATINIME_HOST_OSNAME :=
-LATIN_IME_SRC_DIR :=
-LATIN_IME_TEST_SRC_DIR :=
diff --git a/native/jni/NativeFileList.mk b/native/jni/NativeFileList.mk
deleted file mode 100644
index d8b69bf..0000000
--- a/native/jni/NativeFileList.mk
+++ /dev/null
@@ -1,146 +0,0 @@
-# Copyright (C) 2013 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.
-
-LATIN_IME_JNI_SRC_FILES := \
-    com_android_inputmethod_keyboard_ProximityInfo.cpp \
-    com_android_inputmethod_latin_BinaryDictionary.cpp \
-    com_android_inputmethod_latin_BinaryDictionaryUtils.cpp \
-    com_android_inputmethod_latin_DicTraverseSession.cpp \
-    jni_common.cpp
-
-LATIN_IME_CORE_SRC_FILES := \
-    $(addprefix dictionary/header/, \
-        header_policy.cpp \
-        header_read_write_utils.cpp) \
-    dictionary/property/ngram_context.cpp \
-    dictionary/structure/dictionary_structure_with_buffer_policy_factory.cpp \
-    $(addprefix dictionary/structure/pt_common/, \
-        bigram/bigram_list_read_write_utils.cpp \
-        dynamic_pt_gc_event_listeners.cpp \
-        dynamic_pt_reading_helper.cpp \
-        dynamic_pt_reading_utils.cpp \
-        dynamic_pt_updating_helper.cpp \
-        dynamic_pt_writing_utils.cpp \
-        patricia_trie_reading_utils.cpp \
-        shortcut/shortcut_list_reading_utils.cpp) \
-    $(addprefix dictionary/structure/v2/, \
-        patricia_trie_policy.cpp \
-        ver2_patricia_trie_node_reader.cpp \
-        ver2_pt_node_array_reader.cpp) \
-    $(addprefix dictionary/structure/v4/, \
-        ver4_dict_buffers.cpp \
-        ver4_dict_constants.cpp \
-        ver4_patricia_trie_node_reader.cpp \
-        ver4_patricia_trie_node_writer.cpp \
-        ver4_patricia_trie_policy.cpp \
-        ver4_patricia_trie_reading_utils.cpp \
-        ver4_patricia_trie_writing_helper.cpp \
-        ver4_pt_node_array_reader.cpp) \
-    $(addprefix dictionary/structure/v4/content/, \
-        dynamic_language_model_probability_utils.cpp \
-        language_model_dict_content.cpp \
-        language_model_dict_content_global_counters.cpp \
-        shortcut_dict_content.cpp \
-        sparse_table_dict_content.cpp \
-        terminal_position_lookup_table.cpp) \
-    $(addprefix dictionary/utils/, \
-        buffer_with_extendable_buffer.cpp \
-        byte_array_utils.cpp \
-        dict_file_writing_utils.cpp \
-        file_utils.cpp \
-        forgetting_curve_utils.cpp \
-        format_utils.cpp \
-        mmapped_buffer.cpp \
-        multi_bigram_map.cpp \
-        probability_utils.cpp \
-        sparse_table.cpp \
-        trie_map.cpp ) \
-    suggest/core/suggest.cpp \
-    $(addprefix suggest/core/dicnode/, \
-        dic_node.cpp \
-        dic_node_utils.cpp \
-        dic_nodes_cache.cpp) \
-    $(addprefix suggest/core/dictionary/, \
-        dictionary.cpp \
-        dictionary_utils.cpp \
-        digraph_utils.cpp \
-        error_type_utils.cpp ) \
-    $(addprefix suggest/core/layout/, \
-        additional_proximity_chars.cpp \
-        proximity_info.cpp \
-        proximity_info_params.cpp \
-        proximity_info_state.cpp \
-        proximity_info_state_utils.cpp) \
-    suggest/core/policy/weighting.cpp \
-    suggest/core/session/dic_traverse_session.cpp \
-    $(addprefix suggest/core/result/, \
-        suggestion_results.cpp \
-        suggestions_output_utils.cpp) \
-    suggest/policyimpl/gesture/gesture_suggest_policy_factory.cpp \
-    $(addprefix suggest/policyimpl/typing/, \
-        scoring_params.cpp \
-        typing_scoring.cpp \
-        typing_suggest_policy.cpp \
-        typing_traversal.cpp \
-        typing_weighting.cpp) \
-    $(addprefix utils/, \
-        autocorrection_threshold_utils.cpp \
-        char_utils.cpp \
-        jni_data_utils.cpp \
-        log_utils.cpp \
-        time_keeper.cpp)
-
-LATIN_IME_CORE_SRC_FILES_BACKWARD_V402 := \
-    $(addprefix dictionary/structure/backward/v402/, \
-        ver4_dict_buffers.cpp \
-        ver4_dict_constants.cpp \
-        ver4_patricia_trie_node_reader.cpp \
-        ver4_patricia_trie_node_writer.cpp \
-        ver4_patricia_trie_policy.cpp \
-        ver4_patricia_trie_reading_utils.cpp \
-        ver4_patricia_trie_writing_helper.cpp \
-        ver4_pt_node_array_reader.cpp) \
-    $(addprefix dictionary/structure/backward/v402/content/, \
-        bigram_dict_content.cpp \
-        probability_dict_content.cpp \
-        shortcut_dict_content.cpp \
-        sparse_table_dict_content.cpp \
-        terminal_position_lookup_table.cpp) \
-    $(addprefix dictionary/structure/backward/v402/bigram/, \
-        ver4_bigram_list_policy.cpp)
-
-LATIN_IME_CORE_SRC_FILES += $(LATIN_IME_CORE_SRC_FILES_BACKWARD_V402)
-
-LATIN_IME_CORE_TEST_FILES := \
-    defines_test.cpp \
-    dictionary/header/header_read_write_utils_test.cpp \
-    dictionary/structure/v4/content/language_model_dict_content_test.cpp \
-    dictionary/structure/v4/content/language_model_dict_content_global_counters_test.cpp \
-    dictionary/structure/v4/content/probability_entry_test.cpp \
-    dictionary/structure/v4/content/terminal_position_lookup_table_test.cpp \
-    dictionary/utils/bloom_filter_test.cpp \
-    dictionary/utils/buffer_with_extendable_buffer_test.cpp \
-    dictionary/utils/byte_array_utils_test.cpp \
-    dictionary/utils/format_utils_test.cpp \
-    dictionary/utils/probability_utils_test.cpp \
-    dictionary/utils/sparse_table_test.cpp \
-    dictionary/utils/trie_map_test.cpp \
-    suggest/core/dicnode/dic_node_pool_test.cpp \
-    suggest/core/layout/geometry_utils_test.cpp \
-    suggest/core/layout/normal_distribution_2d_test.cpp \
-    suggest/policyimpl/utils/damerau_levenshtein_edit_distance_policy_test.cpp \
-    utils/autocorrection_threshold_utils_test.cpp \
-    utils/char_utils_test.cpp \
-    utils/int_array_view_test.cpp \
-    utils/time_keeper_test.cpp
diff --git a/native/jni/TargetUnitTests.mk b/native/jni/TargetUnitTests.mk
deleted file mode 100644
index 32aada0..0000000
--- a/native/jni/TargetUnitTests.mk
+++ /dev/null
@@ -1,50 +0,0 @@
-# Copyright (C) 2014 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.
-
-LOCAL_PATH := $(call my-dir)
-
-######################################
-include $(CLEAR_VARS)
-
-include $(LOCAL_PATH)/NativeFileList.mk
-
-#################### Target library for unit test
-LATIN_IME_SRC_DIR := src
-LOCAL_CFLAGS += -Wno-unused-parameter -Wno-unused-function -Wall -Werror
-LOCAL_C_INCLUDES += $(LOCAL_PATH)/$(LATIN_IME_SRC_DIR)
-LOCAL_MODULE := liblatinime_target_static_for_unittests
-LOCAL_MODULE_TAGS := optional
-LOCAL_SRC_FILES := $(addprefix $(LATIN_IME_SRC_DIR)/, $(LATIN_IME_CORE_SRC_FILES))
-LOCAL_SDK_VERSION := 14
-LOCAL_NDK_STL_VARIANT := c++_static
-include $(BUILD_STATIC_LIBRARY)
-
-#################### Target native tests
-include $(CLEAR_VARS)
-LATIN_IME_TEST_SRC_DIR := tests
-LOCAL_CFLAGS += -Wno-unused-parameter -Wno-unused-function -Wall -Werror
-LOCAL_C_INCLUDES += $(LOCAL_PATH)/$(LATIN_IME_SRC_DIR)
-LOCAL_MODULE := liblatinime_target_unittests
-LOCAL_MODULE_TAGS := tests
-LOCAL_SRC_FILES :=  \
-    $(addprefix $(LATIN_IME_TEST_SRC_DIR)/, $(LATIN_IME_CORE_TEST_FILES))
-LOCAL_STATIC_LIBRARIES += liblatinime_target_static_for_unittests
-LOCAL_SDK_VERSION := 14
-LOCAL_NDK_STL_VARIANT := c++_static
-include $(BUILD_NATIVE_TEST)
-
-#################### Clean up the tmp vars
-LATIN_IME_SRC_DIR :=
-LATIN_IME_TEST_SRC_DIR :=
-include $(LOCAL_PATH)/CleanupNativeFileList.mk
diff --git a/native/jni/src/defines.h b/native/jni/src/defines.h
index 10b930e..1531b6c 100644
--- a/native/jni/src/defines.h
+++ b/native/jni/src/defines.h
@@ -17,6 +17,8 @@
 #ifndef LATINIME_DEFINES_H
 #define LATINIME_DEFINES_H
 
+#include <cstdint>
+
 #ifdef __GNUC__
 #define AK_FORCE_INLINE __attribute__((always_inline)) __inline__
 #else // __GNUC__
@@ -51,7 +53,7 @@
     int si = 0;
     int di = 0;
     while (si < sourceSize && di < destLimit && 0 != source[si]) {
-        const int codePoint = source[si++];
+        const uint32_t codePoint = static_cast<uint32_t>(source[si++]);
         if (codePoint < 0x7F) { // One byte
             dest[di++] = codePoint;
         } else if (codePoint < 0x7FF) { // Two bytes
diff --git a/native/jni/src/dictionary/structure/v4/ver4_patricia_trie_policy.cpp b/native/jni/src/dictionary/structure/v4/ver4_patricia_trie_policy.cpp
index 1dbec55..6f96a5a 100644
--- a/native/jni/src/dictionary/structure/v4/ver4_patricia_trie_policy.cpp
+++ b/native/jni/src/dictionary/structure/v4/ver4_patricia_trie_policy.cpp
@@ -141,7 +141,7 @@
     }
     const auto languageModelDictContent = mBuffers->getLanguageModelDictContent();
     for (size_t i = 1; i <= prevWordIds.size(); ++i) {
-        for (const auto entry : languageModelDictContent->getProbabilityEntries(
+        for (const auto& entry : languageModelDictContent->getProbabilityEntries(
                 prevWordIds.limit(i))) {
             const ProbabilityEntry &probabilityEntry = entry.getProbabilityEntry();
             if (!probabilityEntry.isValid()) {
@@ -516,7 +516,7 @@
     int ngramPrevWordsCodePoints[MAX_PREV_WORD_COUNT_FOR_N_GRAM][MAX_WORD_LENGTH];
     int ngramPrevWordsCodePointCount[MAX_PREV_WORD_COUNT_FOR_N_GRAM];
     bool ngramPrevWordIsBeginningOfSentense[MAX_PREV_WORD_COUNT_FOR_N_GRAM];
-    for (const auto entry : languageModelDictContent->exportAllNgramEntriesRelatedToWord(
+    for (const auto& entry : languageModelDictContent->exportAllNgramEntriesRelatedToWord(
             mHeaderPolicy, wordId)) {
         const int codePointCount = getCodePointsAndReturnCodePointCount(entry.getTargetWordId(),
                 MAX_WORD_LENGTH, ngramTargetCodePoints);
diff --git a/native/jni/src/dictionary/utils/binary_dictionary_bigrams_iterator.h b/native/jni/src/dictionary/utils/binary_dictionary_bigrams_iterator.h
index 8a61473..a303364 100644
--- a/native/jni/src/dictionary/utils/binary_dictionary_bigrams_iterator.h
+++ b/native/jni/src/dictionary/utils/binary_dictionary_bigrams_iterator.h
@@ -35,7 +35,7 @@
               mBigramPos(NOT_A_DICT_POS), mProbability(NOT_A_PROBABILITY),
               mHasNext(pos != NOT_A_DICT_POS) {}
 
-    BinaryDictionaryBigramsIterator(BinaryDictionaryBigramsIterator &&bigramsIterator)
+    BinaryDictionaryBigramsIterator(BinaryDictionaryBigramsIterator &&bigramsIterator) noexcept
             : mBigramsStructurePolicy(bigramsIterator.mBigramsStructurePolicy),
               mPos(bigramsIterator.mPos), mBigramPos(bigramsIterator.mBigramPos),
               mProbability(bigramsIterator.mProbability), mHasNext(bigramsIterator.mHasNext) {}
diff --git a/native/jni/src/dictionary/utils/binary_dictionary_shortcut_iterator.h b/native/jni/src/dictionary/utils/binary_dictionary_shortcut_iterator.h
index a4ddd58..e14805e 100644
--- a/native/jni/src/dictionary/utils/binary_dictionary_shortcut_iterator.h
+++ b/native/jni/src/dictionary/utils/binary_dictionary_shortcut_iterator.h
@@ -31,7 +31,7 @@
               mPos(shortcutStructurePolicy->getStartPos(shortcutPos)),
               mHasNextShortcutTarget(shortcutPos != NOT_A_DICT_POS) {}
 
-    BinaryDictionaryShortcutIterator(const BinaryDictionaryShortcutIterator &&shortcutIterator)
+    BinaryDictionaryShortcutIterator(const BinaryDictionaryShortcutIterator &&shortcutIterator) noexcept
             : mShortcutStructurePolicy(shortcutIterator.mShortcutStructurePolicy),
               mPos(shortcutIterator.mPos),
               mHasNextShortcutTarget(shortcutIterator.mHasNextShortcutTarget) {}
diff --git a/native/jni/tests/dictionary/structure/v4/content/language_model_dict_content_test.cpp b/native/jni/tests/dictionary/structure/v4/content/language_model_dict_content_test.cpp
index ca8626e..ab11975 100644
--- a/native/jni/tests/dictionary/structure/v4/content/language_model_dict_content_test.cpp
+++ b/native/jni/tests/dictionary/structure/v4/content/language_model_dict_content_test.cpp
@@ -80,7 +80,7 @@
         languageModelDictContent.setProbabilityEntry(wordId, &originalEntry);
     }
     std::unordered_set<int> wordIdSet(std::begin(wordIds), std::end(wordIds));
-    for (const auto entry : languageModelDictContent.getProbabilityEntries(WordIdArrayView())) {
+    for (const auto& entry : languageModelDictContent.getProbabilityEntries(WordIdArrayView())) {
         EXPECT_EQ(originalEntry.getFlags(), entry.getProbabilityEntry().getFlags());
         EXPECT_EQ(originalEntry.getProbability(), entry.getProbabilityEntry().getProbability());
         wordIdSet.erase(entry.getWordId());
diff --git a/tests/Android.bp b/tests/Android.bp
new file mode 100644
index 0000000..76681f6
--- /dev/null
+++ b/tests/Android.bp
@@ -0,0 +1,46 @@
+// Copyright (C) 2011 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.
+
+android_test {
+    name: "LatinIMETests",
+
+    certificate: "shared",
+
+    aaptflags: [
+        // Do not compress dictionary files to mmap dict data runtime
+        "-0 .dict",
+
+        // Do not compress test data file
+        "-0 .txt",
+    ],
+
+    static_libs: [
+        "androidx.test.rules",
+        "mockito-target-minus-junit4",
+    ],
+    libs: [
+        "android.test.mock.stubs",
+        "android.test.runner.stubs",
+        "android.test.base.stubs",
+    ],
+
+    // Include all test java files.
+    srcs: ["src/**/*.java"],
+
+    instrumentation_for: "LatinIME",
+
+    min_sdk_version: "14",
+    target_sdk_version: "21",
+    sdk_version: "current",
+}
diff --git a/tests/Android.mk b/tests/Android.mk
deleted file mode 100644
index 7c0bb4f..0000000
--- a/tests/Android.mk
+++ /dev/null
@@ -1,46 +0,0 @@
-# Copyright (C) 2011 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.
-
-LOCAL_PATH := $(call my-dir)
-include $(CLEAR_VARS)
-
-# We only want this apk build for tests.
-LOCAL_MODULE_TAGS := tests
-LOCAL_CERTIFICATE := shared
-
-# Do not compress dictionary files to mmap dict data runtime
-LOCAL_AAPT_FLAGS += -0 .dict
-# Do not compress test data file
-LOCAL_AAPT_FLAGS += -0 .txt
-
-LOCAL_STATIC_JAVA_LIBRARIES := \
-    android-support-test \
-    mockito-target-minus-junit4
-
-LOCAL_JAVA_LIBRARIES := \
-    android.test.mock.stubs \
-    android.test.runner.stubs \
-    android.test.base.stubs \
-
-
-# Include all test java files.
-LOCAL_SRC_FILES := $(call all-java-files-under, src)
-
-LOCAL_PACKAGE_NAME := LatinIMETests
-
-LOCAL_INSTRUMENTATION_FOR := LatinIME
-
-LOCAL_SDK_VERSION := current
-
-include $(BUILD_PACKAGE)
diff --git a/tests/AndroidManifest.xml b/tests/AndroidManifest.xml
index c7a9e13..e788e0b 100644
--- a/tests/AndroidManifest.xml
+++ b/tests/AndroidManifest.xml
@@ -15,9 +15,10 @@
 -->
 
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
-    package="com.android.inputmethod.latin.tests">
+    package="com.android.inputmethod.latin.tests"
+    android:versionCode="28">
 
-    <uses-sdk android:minSdkVersion="14" android:targetSdkVersion="21" />
+    <uses-sdk android:minSdkVersion="21" android:targetSdkVersion="28" />
 
     <uses-permission android:name="android.permission.READ_CONTACTS" />
 
@@ -27,7 +28,7 @@
         <!-- meta-data android:name="com.android.contacts.iconset" android:resource="@xml/iconset" /-->
     </application>
 
-    <instrumentation android:name="android.support.test.runner.AndroidJUnitRunner"
+    <instrumentation android:name="androidx.test.runner.AndroidJUnitRunner"
         android:targetPackage="com.android.inputmethod.latin"
         android:label="LatinIME tests">
     </instrumentation>
diff --git a/tests/AndroidTest.xml b/tests/AndroidTest.xml
new file mode 100644
index 0000000..41334d5
--- /dev/null
+++ b/tests/AndroidTest.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2018 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.
+-->
+<configuration description="Runs Tests for LatinIME.">
+    <!--
+        To run this test with atest, run the following commands:
+
+            tapas adb LatinIME LatinIMETests arm64 userdebug && \
+            DISABLE_PROGUARD=true make -j LatinIME && \
+            adb install -r $OUT/system/app/LatinIME/LatinIME.apk && \
+            atest LatinIMETests
+
+        currently tradefed does not look up files under $OUT/system/
+        hence we cannot rely on "test-file-name" to install LatinIME.apk
+    -->
+
+    <target_preparer class="com.android.tradefed.targetprep.TestAppInstallSetup">
+        <option name="cleanup-apks" value="true" />
+        <option name="test-file-name" value="LatinIMETests.apk" />
+    </target_preparer>
+
+    <option name="test-tag" value="LatinIMETests" />
+    <test class="com.android.tradefed.testtype.AndroidJUnitTest" >
+        <option name="package" value="com.android.inputmethod.latin.tests" />
+        <option name="runner" value="androidx.test.runner.AndroidJUnitRunner" />
+        <option name="hidden-api-checks" value="false"/>
+    </test>
+</configuration>
diff --git a/tests/src/com/android/inputmethod/compat/LocaleSpanCompatUtilsTests.java b/tests/src/com/android/inputmethod/compat/LocaleSpanCompatUtilsTests.java
index 67e7646..6203238 100644
--- a/tests/src/com/android/inputmethod/compat/LocaleSpanCompatUtilsTests.java
+++ b/tests/src/com/android/inputmethod/compat/LocaleSpanCompatUtilsTests.java
@@ -16,18 +16,28 @@
 
 package com.android.inputmethod.compat;
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
 import android.graphics.Typeface;
 import android.os.Build;
-import android.test.AndroidTestCase;
-import android.test.suitebuilder.annotation.SmallTest;
 import android.text.SpannableString;
 import android.text.Spanned;
 import android.text.style.StyleSpan;
 
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
 import java.util.Locale;
 
 @SmallTest
-public class LocaleSpanCompatUtilsTests extends AndroidTestCase {
+@RunWith(AndroidJUnit4.class)
+public class LocaleSpanCompatUtilsTests {
+    @Test
     public void testInstantiatable() {
         if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN_MR1) {
             // LocaleSpan isn't yet available.
@@ -61,6 +71,7 @@
         assertEquals(expectedCount, spans.length);
     }
 
+    @Test
     public void testUpdateLocaleSpan() {
         if (!LocaleSpanCompatUtils.isLocaleSpanAvailable()) {
             return;
diff --git a/tests/src/com/android/inputmethod/compat/SuggestionSpanUtilsTest.java b/tests/src/com/android/inputmethod/compat/SuggestionSpanUtilsTest.java
index 2d6d28f..a0544d6 100644
--- a/tests/src/com/android/inputmethod/compat/SuggestionSpanUtilsTest.java
+++ b/tests/src/com/android/inputmethod/compat/SuggestionSpanUtilsTest.java
@@ -16,17 +16,26 @@
 
 package com.android.inputmethod.compat;
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
 import android.annotation.TargetApi;
+import android.content.Context;
 import android.os.Build;
-import android.test.AndroidTestCase;
-import android.test.suitebuilder.annotation.SmallTest;
 import android.text.Spanned;
 import android.text.TextUtils;
 import android.text.style.SuggestionSpan;
 
+import androidx.test.InstrumentationRegistry;
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
+
 import com.android.inputmethod.latin.SuggestedWords;
 import com.android.inputmethod.latin.SuggestedWords.SuggestedWordInfo;
 
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Locale;
@@ -34,7 +43,12 @@
 import javax.annotation.Nullable;
 
 @SmallTest
-public class SuggestionSpanUtilsTest extends AndroidTestCase {
+@RunWith(AndroidJUnit4.class)
+public class SuggestionSpanUtilsTest {
+
+    private Context getContext() {
+        return InstrumentationRegistry.getTargetContext();
+    }
 
     /**
      * Helper method to create a dummy {@link SuggestedWordInfo}.
@@ -91,6 +105,7 @@
     }
 
     @TargetApi(Build.VERSION_CODES.ICE_CREAM_SANDWICH_MR1)
+    @Test
     public void testGetTextWithAutoCorrectionIndicatorUnderline() {
         final String ORIGINAL_TEXT = "Hey!";
         final Locale NONNULL_LOCALE = new Locale("en", "GB");
@@ -107,6 +122,7 @@
     }
 
     @TargetApi(Build.VERSION_CODES.ICE_CREAM_SANDWICH_MR1)
+    @Test
     public void testGetTextWithAutoCorrectionIndicatorUnderlineRootLocale() {
         final String ORIGINAL_TEXT = "Hey!";
         final CharSequence text = SuggestionSpanUtils.getTextWithAutoCorrectionIndicatorUnderline(
@@ -121,6 +137,7 @@
                 new String[]{}, Locale.ROOT, text);
     }
 
+    @Test
     public void testGetTextWithSuggestionSpan() {
         final SuggestedWordInfo prediction1 =
                 createWordInfo("Quality", SuggestedWordInfo.KIND_PREDICTION);
@@ -218,6 +235,7 @@
         }
     }
 
+    @Test
     public void testFindFirstLocaleFromSuggestionSpans() {
         final String[] suggestions = new String[] {"Quality", "Speed", "Price"};
         final SuggestionSpan nullLocaleSpan = new SuggestionSpan((Locale)null, suggestions, 0);
diff --git a/tests/src/com/android/inputmethod/compat/TextInfoCompatUtilsTests.java b/tests/src/com/android/inputmethod/compat/TextInfoCompatUtilsTests.java
index c399cce..d4dbfd4 100644
--- a/tests/src/com/android/inputmethod/compat/TextInfoCompatUtilsTests.java
+++ b/tests/src/com/android/inputmethod/compat/TextInfoCompatUtilsTests.java
@@ -16,10 +16,10 @@
 
 package com.android.inputmethod.compat;
 
+import static org.junit.Assert.assertTrue;
+
 import android.graphics.Typeface;
 import android.os.Parcel;
-import android.test.AndroidTestCase;
-import android.test.suitebuilder.annotation.SmallTest;
 import android.text.SpannableString;
 import android.text.Spanned;
 import android.text.TextUtils;
@@ -27,10 +27,17 @@
 import android.text.style.URLSpan;
 import android.view.textservice.TextInfo;
 
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
 import java.util.Arrays;
 
 @SmallTest
-public class TextInfoCompatUtilsTests extends AndroidTestCase {
+@RunWith(AndroidJUnit4.class)
+public class TextInfoCompatUtilsTests {
     final private static String TEST_TEXT = "0123456789";
     final private static int TEST_COOKIE = 0x1234;
     final private static int TEST_SEQUENCE_NUMBER = 0x4321;
@@ -45,6 +52,7 @@
     final private static int TEST_URL_SPAN_END = 7;
     final private static int TEST_URL_SPAN_FLAGS = Spanned.SPAN_EXCLUSIVE_EXCLUSIVE;
 
+    @Test
     public void testGetCharSequence() {
         final SpannableString text = new SpannableString(TEST_TEXT);
         text.setSpan(TEST_STYLE_SPAN, TEST_STYLE_SPAN_START, TEST_STYLE_SPAN_END,
diff --git a/tests/src/com/android/inputmethod/keyboard/KeyboardLayoutTest.java b/tests/src/com/android/inputmethod/keyboard/KeyboardLayoutTest.java
index 1e1f82f..ddace1a 100644
--- a/tests/src/com/android/inputmethod/keyboard/KeyboardLayoutTest.java
+++ b/tests/src/com/android/inputmethod/keyboard/KeyboardLayoutTest.java
@@ -18,15 +18,17 @@
 
 import static org.junit.Assert.assertEquals;
 
-import android.test.suitebuilder.annotation.SmallTest;
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
 
 import java.util.ArrayList;
 
-import org.junit.Test;
-
 @SmallTest
+@RunWith(AndroidJUnit4.class)
 public class KeyboardLayoutTest {
-
     @Test
     public void testNewKeyboardLayout() {
         KeyboardLayout keyboardLayout = KeyboardLayout
diff --git a/tests/src/com/android/inputmethod/keyboard/KeyboardThemeTests.java b/tests/src/com/android/inputmethod/keyboard/KeyboardThemeTests.java
index 33e88c1..2f8140e 100644
--- a/tests/src/com/android/inputmethod/keyboard/KeyboardThemeTests.java
+++ b/tests/src/com/android/inputmethod/keyboard/KeyboardThemeTests.java
@@ -21,17 +21,30 @@
 import static com.android.inputmethod.keyboard.KeyboardTheme.THEME_ID_LXX_DARK;
 import static com.android.inputmethod.keyboard.KeyboardTheme.THEME_ID_LXX_LIGHT;
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import android.content.Context;
 import android.content.SharedPreferences;
 import android.os.Build;
 import android.os.Build.VERSION_CODES;
 import android.preference.PreferenceManager;
-import android.test.AndroidTestCase;
-import android.test.suitebuilder.annotation.SmallTest;
+
+import androidx.test.InstrumentationRegistry;
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
 
 import java.util.Arrays;
 
 @SmallTest
-public class KeyboardThemeTests extends AndroidTestCase {
+@RunWith(AndroidJUnit4.class)
+public class KeyboardThemeTests {
     private SharedPreferences mPrefs;
 
     private static final int THEME_ID_NULL = -1;
@@ -39,9 +52,12 @@
     private static final int THEME_ID_ILLEGAL = -3;
     private static final String ILLEGAL_THEME_ID_STRING = "ThisCausesNumberFormatExecption";
 
-    @Override
-    protected void setUp() throws Exception {
-        super.setUp();
+    private Context getContext() {
+        return InstrumentationRegistry.getTargetContext();
+    }
+
+    @Before
+    public void setUp() throws Exception {
         mPrefs = PreferenceManager.getDefaultSharedPreferences(getContext());
     }
 
@@ -110,6 +126,7 @@
         assertKeyboardThemePreference(sdkVersion, THEME_ID_ILLEGAL, defaultThemeId);
     }
 
+    @Test
     public void testKeyboardThemePreferenceOnKlp() {
         assertKeyboardThemePreferenceOnKlp(VERSION_CODES.ICE_CREAM_SANDWICH);
         assertKeyboardThemePreferenceOnKlp(VERSION_CODES.ICE_CREAM_SANDWICH_MR1);
@@ -130,6 +147,7 @@
         assertKeyboardThemePreference(sdkVersion, THEME_ID_ILLEGAL, defaultThemeId);
     }
 
+    @Test
     public void testKeyboardThemePreferenceOnLxx() {
         assertKeyboardThemePreferenceOnLxx(Build.VERSION_CODES.LOLLIPOP);
     }
@@ -165,6 +183,7 @@
         assertDefaultKeyboardTheme(sdkVersion, THEME_ID_ILLEGAL, THEME_ID_KLP);
     }
 
+    @Test
     public void testDefaultKeyboardThemeOnKlp() {
         assertDefaultKeyboardThemeOnKlp(VERSION_CODES.ICE_CREAM_SANDWICH);
         assertDefaultKeyboardThemeOnKlp(VERSION_CODES.ICE_CREAM_SANDWICH_MR1);
@@ -183,6 +202,7 @@
         assertDefaultKeyboardTheme(sdkVersion, THEME_ID_ILLEGAL, THEME_ID_LXX_LIGHT);
     }
 
+    @Test
     public void testDefaultKeyboardThemeOnLxx() {
         assertDefaultKeyboardThemeOnLxx(Build.VERSION_CODES.LOLLIPOP);
     }
@@ -231,6 +251,7 @@
     }
 
     // Upgrading keyboard on I,J and K.
+    @Test
     public void testUpgradeKeyboardToLxxOnKlp() {
         assertUpgradeKeyboardToLxxOnKlp(VERSION_CODES.ICE_CREAM_SANDWICH);
         assertUpgradeKeyboardToLxxOnKlp(VERSION_CODES.ICE_CREAM_SANDWICH_MR1);
@@ -250,6 +271,7 @@
     }
 
     // Upgrading keyboard on L.
+    @Test
     public void testUpgradeKeyboardToLxxOnLxx() {
         assertUpgradeKeyboardToLxxOnLxx(Build.VERSION_CODES.LOLLIPOP);
     }
@@ -293,6 +315,7 @@
     }
 
     // Update platform from I,J, and K to I,J, and K
+    @Test
     public void testUpgradePlatformToKlpFromKlp() {
         assertUpgradePlatformToKlpFrom(VERSION_CODES.ICE_CREAM_SANDWICH);
         assertUpgradePlatformToKlpFrom(VERSION_CODES.ICE_CREAM_SANDWICH_MR1);
@@ -318,6 +341,7 @@
     }
 
     // Update platform from I,J, and K to L
+    @Test
     public void testUpgradePlatformToLxx() {
         assertUpgradePlatformToLxxFrom(VERSION_CODES.ICE_CREAM_SANDWICH);
         assertUpgradePlatformToLxxFrom(VERSION_CODES.ICE_CREAM_SANDWICH_MR1);
@@ -328,6 +352,7 @@
     }
 
     // Update platform from L to L.
+    @Test
     public void testUpgradePlatformToLxxFromLxx() {
         final int oldSdkVersion = Build.VERSION_CODES.LOLLIPOP;
         final int newSdkVersion = Build.VERSION_CODES.LOLLIPOP;
@@ -364,10 +389,12 @@
         }
     }
 
+    @Test
     public void testSortedKeyboardTheme() {
         assertSortedKeyboardThemeArray(KeyboardTheme.KEYBOARD_THEMES);
     }
 
+    @Test
     public void testSortedAvailableKeyboardTheme() {
         assertSortedKeyboardThemeArray(KeyboardTheme.getAvailableThemeArray(getContext()));
     }
@@ -384,6 +411,7 @@
         assertSortedKeyboardThemeArray(LIMITED_THEMES);
     }
 
+    @Test
     public void testMissingSelectedThemeIcs() {
         // Clean up preferences.
         setKeyboardThemePreference(KeyboardTheme.KLP_KEYBOARD_THEME_KEY, THEME_ID_NULL);
@@ -399,6 +427,7 @@
         assertEquals(THEME_ID_KLP, actualTheme.mThemeId);
     }
 
+    @Test
     public void testMissingSelectedThemeKlp() {
         // Clean up preferences.
         setKeyboardThemePreference(KeyboardTheme.KLP_KEYBOARD_THEME_KEY, THEME_ID_NULL);
@@ -414,6 +443,7 @@
         assertEquals(THEME_ID_KLP, actualTheme.mThemeId);
     }
 
+    @Test
     public void testMissingSelectedThemeLxx() {
         // Clean up preferences.
         setKeyboardThemePreference(KeyboardTheme.KLP_KEYBOARD_THEME_KEY, THEME_ID_NULL);
diff --git a/tests/src/com/android/inputmethod/keyboard/MoreKeysKeyboardBuilderAutoOrderTests.java b/tests/src/com/android/inputmethod/keyboard/MoreKeysKeyboardBuilderAutoOrderTests.java
index ebefe2d..90963d4 100644
--- a/tests/src/com/android/inputmethod/keyboard/MoreKeysKeyboardBuilderAutoOrderTests.java
+++ b/tests/src/com/android/inputmethod/keyboard/MoreKeysKeyboardBuilderAutoOrderTests.java
@@ -16,13 +16,21 @@
 
 package com.android.inputmethod.keyboard;
 
-import android.test.AndroidTestCase;
-import android.test.suitebuilder.annotation.MediumTest;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.fail;
+
+import androidx.test.filters.MediumTest;
+import androidx.test.runner.AndroidJUnit4;
 
 import com.android.inputmethod.keyboard.MoreKeysKeyboard.MoreKeysKeyboardParams;
 
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
 @MediumTest
-public class MoreKeysKeyboardBuilderAutoOrderTests extends AndroidTestCase {
+@RunWith(AndroidJUnit4.class)
+public class MoreKeysKeyboardBuilderAutoOrderTests {
     private static final int WIDTH = 10;
     private static final int HEIGHT = 10;
 
@@ -38,11 +46,6 @@
     private static final int XPOS_R1 = WIDTH * 8 + WIDTH / 2;
     private static final int XPOS_R0 = WIDTH * 9 + WIDTH / 2;
 
-    @Override
-    protected void setUp() throws Exception {
-        super.setUp();
-    }
-
     private static MoreKeysKeyboardParams createParams(final int numKeys, final int columnNum,
             final int coordXInParent) {
         final MoreKeysKeyboardParams params = new MoreKeysKeyboardParams();
@@ -52,6 +55,7 @@
         return params;
     }
 
+    @Test
     public void testLayoutError() {
         MoreKeysKeyboardParams params = null;
         try {
@@ -69,6 +73,7 @@
     // "<1>" is the default key.
 
     // <1>
+    @Test
     public void testLayout1KeyAuto5M0() {
         MoreKeysKeyboardParams params = createParams(1, 5, XPOS_M0);
         assertEquals("1 key auto 5 M0 columns", 1, params.mNumColumns);
@@ -81,6 +86,7 @@
     }
 
     // |<1>
+    @Test
     public void testLayout1KeyAuto5L0() {
         MoreKeysKeyboardParams params = createParams(1, 5, XPOS_L0);
         assertEquals("1 key auto 5 L0 columns", 1, params.mNumColumns);
@@ -93,6 +99,7 @@
     }
 
     // |___ <1>
+    @Test
     public void testLayout1KeyAuto5L1() {
         MoreKeysKeyboardParams params = createParams(1, 5, XPOS_L1);
         assertEquals("1 key auto 5 L1 columns", 1, params.mNumColumns);
@@ -105,6 +112,7 @@
     }
 
     // |___ ___ <1>
+    @Test
     public void testLayout1KeyAuto5L2() {
         MoreKeysKeyboardParams params = createParams(1, 5, XPOS_L2);
         assertEquals("1 key auto 5 L2 columns", 1, params.mNumColumns);
@@ -117,6 +125,7 @@
     }
 
     // <1>|
+    @Test
     public void testLayout1KeyAuto5R0() {
         MoreKeysKeyboardParams params = createParams(1, 5, XPOS_R0);
         assertEquals("1 key auto 5 R0 columns", 1, params.mNumColumns);
@@ -129,6 +138,7 @@
     }
 
     // <1> ___|
+    @Test
     public void testLayout1KeyAuto5R1() {
         MoreKeysKeyboardParams params = createParams(1, 5, XPOS_R1);
         assertEquals("1 key auto 5 R1 columns", 1, params.mNumColumns);
@@ -141,6 +151,7 @@
     }
 
     // <1> ___ ___|
+    @Test
     public void testLayout1KeyAuto5R2() {
         MoreKeysKeyboardParams params = createParams(1, 5, XPOS_R2);
         assertEquals("1 key auto 5 R2 columns", 1, params.mNumColumns);
@@ -153,6 +164,7 @@
     }
 
     // <1> [2]
+    @Test
     public void testLayout2KeyAuto5M0() {
         MoreKeysKeyboardParams params = createParams(2, 5, XPOS_M0);
         assertEquals("2 key auto 5 M0 columns", 2, params.mNumColumns);
@@ -166,6 +178,7 @@
     }
 
     // |<1> [2]
+    @Test
     public void testLayout2KeyAuto5L0() {
         MoreKeysKeyboardParams params = createParams(2, 5, XPOS_L0);
         assertEquals("2 key auto 5 L0 columns", 2, params.mNumColumns);
@@ -179,6 +192,7 @@
     }
 
     // |___ <1> [2]
+    @Test
     public void testLayout2KeyAuto5L1() {
         MoreKeysKeyboardParams params = createParams(2, 5, XPOS_L1);
         assertEquals("2 key auto 5 L1 columns", 2, params.mNumColumns);
@@ -192,6 +206,7 @@
     }
 
     // |___ ___ <1> [2]
+    @Test
     public void testLayout2KeyAuto5L2() {
         MoreKeysKeyboardParams params = createParams(2, 5, XPOS_L2);
         assertEquals("2 key auto 5 L2 columns", 2, params.mNumColumns);
@@ -205,6 +220,7 @@
     }
 
     // [2] <1>|
+    @Test
     public void testLayout2KeyAuto5R0() {
         MoreKeysKeyboardParams params = createParams(2, 5, XPOS_R0);
         assertEquals("2 key auto 5 R0 columns", 2, params.mNumColumns);
@@ -218,6 +234,7 @@
     }
 
     // [2] <1> ___|
+    @Test
     public void testLayout2KeyAuto5R1() {
         MoreKeysKeyboardParams params = createParams(2, 5, XPOS_R1);
         assertEquals("2 key auto 5 R1 columns", 2, params.mNumColumns);
@@ -231,6 +248,7 @@
     }
 
     // <1> [2] ___|
+    @Test
     public void testLayout2KeyAuto5R2() {
         MoreKeysKeyboardParams params = createParams(2, 5, XPOS_R2);
         assertEquals("2 key auto 5 R2 columns", 2, params.mNumColumns);
@@ -244,6 +262,7 @@
     }
 
     // [3] <1> [2]
+    @Test
     public void testLayout3KeyAuto5M0() {
         MoreKeysKeyboardParams params = createParams(3, 5, XPOS_M0);
         assertEquals("3 key auto 5 M0 columns", 3, params.mNumColumns);
@@ -258,6 +277,7 @@
     }
 
     // |<1> [2] [3]
+    @Test
     public void testLayout3KeyAuto5L0() {
         MoreKeysKeyboardParams params = createParams(3, 5, XPOS_L0);
         assertEquals("3 key auto 5 L0 columns", 3, params.mNumColumns);
@@ -272,6 +292,7 @@
     }
 
     // |___ <1> [2] [3]
+    @Test
     public void testLayout3KeyAuto5L1() {
         MoreKeysKeyboardParams params = createParams(3, 5, XPOS_L1);
         assertEquals("3 key auto 5 L1 columns", 3, params.mNumColumns);
@@ -286,6 +307,7 @@
     }
 
     // |___ [3] <1> [2]
+    @Test
     public void testLayout3KeyAuto5L2() {
         MoreKeysKeyboardParams params = createParams(3, 5, XPOS_L2);
         assertEquals("3 key auto 5 L2 columns", 3, params.mNumColumns);
@@ -300,6 +322,7 @@
     }
 
     // [3] [2] <1>|
+    @Test
     public void testLayout3KeyAuto5R0() {
         MoreKeysKeyboardParams params = createParams(3, 5, XPOS_R0);
         assertEquals("3 key auto 5 R0 columns", 3, params.mNumColumns);
@@ -314,6 +337,7 @@
     }
 
     // [3] [2] <1> ___|
+    @Test
     public void testLayout3KeyAuto5R1() {
         MoreKeysKeyboardParams params = createParams(3, 5, XPOS_R1);
         assertEquals("3 key auto 5 R1 columns", 3, params.mNumColumns);
@@ -328,6 +352,7 @@
     }
 
     // [3] <1> [2] ___|
+    @Test
     public void testLayout3KeyAuto5R2() {
         MoreKeysKeyboardParams params = createParams(3, 5, XPOS_R2);
         assertEquals("3 key auto 5 R2 columns", 3, params.mNumColumns);
@@ -343,6 +368,7 @@
 
     // [3]
     // <1> [2]
+    @Test
     public void testLayout3KeyAuto2M0() {
         MoreKeysKeyboardParams params = createParams(3, 2, XPOS_M0);
         assertEquals("3 key auto 2 M0 columns", 2, params.mNumColumns);
@@ -358,6 +384,7 @@
 
     // |[3]
     // |<1> [2]
+    @Test
     public void testLayout3KeyAuto2L0() {
         MoreKeysKeyboardParams params = createParams(3, 2, XPOS_L0);
         assertEquals("3 key auto 2 L0 columns", 2, params.mNumColumns);
@@ -373,6 +400,7 @@
 
     // |___ [3]
     // |___ <1> [2]
+    @Test
     public void testLayout3KeyAuto2L1() {
         MoreKeysKeyboardParams params = createParams(3, 2, XPOS_L1);
         assertEquals("3 key auto 2 L1 columns", 2, params.mNumColumns);
@@ -388,6 +416,7 @@
 
     // |        [3]
     // |___ ___ <1> [2]
+    @Test
     public void testLayout3KeyAuto2L2() {
         MoreKeysKeyboardParams params = createParams(3, 2, XPOS_L2);
         assertEquals("3 key auto 2 L2 columns", 2, params.mNumColumns);
@@ -403,6 +432,7 @@
 
     //     [3]|
     // [2] <1>|
+    @Test
     public void testLayout3KeyAuto2R0() {
         MoreKeysKeyboardParams params = createParams(3, 2, XPOS_R0);
         assertEquals("3 key auto 2 R0 columns", 2, params.mNumColumns);
@@ -418,6 +448,7 @@
 
     //     [3]    |
     // [2] <1> ___|
+    @Test
     public void testLayout3KeyAuto2R1() {
         MoreKeysKeyboardParams params = createParams(3, 2, XPOS_R1);
         assertEquals("3 key auto 2 R1 columns", 2, params.mNumColumns);
@@ -433,6 +464,7 @@
 
     // [3]        |
     // <1> [2] ___|
+    @Test
     public void testLayout3KeyAuto2R2() {
         MoreKeysKeyboardParams params = createParams(3, 2, XPOS_R2);
         assertEquals("3 key auto 2 R2 columns", 2, params.mNumColumns);
@@ -448,6 +480,7 @@
 
     //     [4]
     // [3] <1> [2]
+    @Test
     public void testLayout4KeyAuto3M0() {
         MoreKeysKeyboardParams params = createParams(4, 3, XPOS_M0);
         assertEquals("4 key auto 3 M0 columns", 3, params.mNumColumns);
@@ -464,6 +497,7 @@
 
     // |[4]
     // |<1> [2] [3]
+    @Test
     public void testLayout4KeyAuto3L0() {
         MoreKeysKeyboardParams params = createParams(4, 3, XPOS_L0);
         assertEquals("4 key auto 3 L0 columns", 3, params.mNumColumns);
@@ -480,6 +514,7 @@
 
     // |___ [4]
     // |___ <1> [2] [3]
+    @Test
     public void testLayout4KeyAuto3L1() {
         MoreKeysKeyboardParams params = createParams(4, 3, XPOS_L1);
         assertEquals("4 key auto 3 L1 columns", 3, params.mNumColumns);
@@ -496,6 +531,7 @@
 
     // |___ ___ [4]
     // |___ [3] <1> [2]
+    @Test
     public void testLayout4KeyAuto3L2() {
         MoreKeysKeyboardParams params = createParams(4, 3, XPOS_L2);
         assertEquals("4 key auto 3 L2 columns", 3, params.mNumColumns);
@@ -512,6 +548,7 @@
 
     //         [4]|
     // [3] [2] <1>|
+    @Test
     public void testLayout4KeyAuto3R0() {
         MoreKeysKeyboardParams params = createParams(4, 3, XPOS_R0);
         assertEquals("4 key auto 3 R0 columns", 3, params.mNumColumns);
@@ -528,6 +565,7 @@
 
     //         [4] ___|
     // [3] [2] <1> ___|
+    @Test
     public void testLayout4KeyAuto3R1() {
         MoreKeysKeyboardParams params = createParams(4, 3, XPOS_R1);
         assertEquals("4 key auto 3 R1 columns", 3, params.mNumColumns);
@@ -544,6 +582,7 @@
 
     //     [4]     ___|
     // [3] <1> [2] ___|
+    @Test
     public void testLayout4KeyAuto3R2() {
         MoreKeysKeyboardParams params = createParams(4, 3, XPOS_R2);
         assertEquals("4 key auto 3 R2 columns", 3, params.mNumColumns);
@@ -559,6 +598,7 @@
     }
 
     // [3] <1> [2] [4]
+    @Test
     public void testLayout4KeyAuto4M0() {
         MoreKeysKeyboardParams params = createParams(4, 4, XPOS_M0);
         assertEquals("4 key auto 4 M0 columns", 4, params.mNumColumns);
@@ -574,6 +614,7 @@
     }
 
     // |<1> [2] [3] [4]
+    @Test
     public void testLayout4KeyAuto4L0() {
         MoreKeysKeyboardParams params = createParams(4, 4, XPOS_L0);
         assertEquals("4 key auto 4 L0 columns", 4, params.mNumColumns);
@@ -589,6 +630,7 @@
     }
 
     // |___ <1> [2] [3] [4]
+    @Test
     public void testLayout4KeyAuto4L1() {
         MoreKeysKeyboardParams params = createParams(4, 4, XPOS_L1);
         assertEquals("4 key auto 4 L1 columns", 4, params.mNumColumns);
@@ -604,6 +646,7 @@
     }
 
     // |___ [3] <1> [2] [4]
+    @Test
     public void testLayout4KeyAuto4L2() {
         MoreKeysKeyboardParams params = createParams(4, 4, XPOS_L2);
         assertEquals("4 key auto 4 L2 columns", 4, params.mNumColumns);
@@ -619,6 +662,7 @@
     }
 
     // [4] [3] [2] <1>|
+    @Test
     public void testLayout4KeyAuto4R0() {
         MoreKeysKeyboardParams params = createParams(4, 4, XPOS_R0);
         assertEquals("4 key auto 4 R0 columns", 4, params.mNumColumns);
@@ -634,6 +678,7 @@
     }
 
     // [4] [3] [2] <1> ___|
+    @Test
     public void testLayout4KeyAuto4R1() {
         MoreKeysKeyboardParams params = createParams(4, 4, XPOS_R1);
         assertEquals("4 key auto 4 R1 columns", 4, params.mNumColumns);
@@ -649,6 +694,7 @@
     }
 
     // [4] [3] <1> [2] ___|
+    @Test
     public void testLayout4KeyAuto4R2() {
         MoreKeysKeyboardParams params = createParams(4, 4, XPOS_R2);
         assertEquals("4 key auto 4 R2 columns", 4, params.mNumColumns);
@@ -664,6 +710,7 @@
     }
 
     // [3] <1> [2] [4]
+    @Test
     public void testLayout4KeyAuto5M0() {
         MoreKeysKeyboardParams params = createParams(4, 5, XPOS_M0);
         assertEquals("4 key auto 5 M0 columns", 4, params.mNumColumns);
@@ -679,6 +726,7 @@
     }
 
     // |<1> [2] [3] [4]
+    @Test
     public void testLayout4KeyAuto5L0() {
         MoreKeysKeyboardParams params = createParams(4, 5, XPOS_L0);
         assertEquals("4 key auto 5 L0 columns", 4, params.mNumColumns);
@@ -694,6 +742,7 @@
     }
 
     // |___ <1> [2] [3] [4]
+    @Test
     public void testLayout4KeyAuto5L1() {
         MoreKeysKeyboardParams params = createParams(4, 5, XPOS_L1);
         assertEquals("4 key auto 5 L1 columns", 4, params.mNumColumns);
@@ -709,6 +758,7 @@
     }
 
     // |___ [3] <1> [2] [4]
+    @Test
     public void testLayout4KeyAuto5L2() {
         MoreKeysKeyboardParams params = createParams(4, 5, XPOS_L2);
         assertEquals("4 key auto 5 L2 columns", 4, params.mNumColumns);
@@ -724,6 +774,7 @@
     }
 
     // [4] [3] [2] <1>|
+    @Test
     public void testLayout4KeyAuto5R0() {
         MoreKeysKeyboardParams params = createParams(4, 5, XPOS_R0);
         assertEquals("4 key auto 5 R0 columns", 4, params.mNumColumns);
@@ -739,6 +790,7 @@
     }
 
     // [4] [3] [2] <1> ___|
+    @Test
     public void testLayout4KeyAuto5R1() {
         MoreKeysKeyboardParams params = createParams(4, 5, XPOS_R1);
         assertEquals("4 key auto 5 R1 columns", 4, params.mNumColumns);
@@ -754,6 +806,7 @@
     }
 
     // [4] [3] <1> [2] ___|
+    @Test
     public void testLayout4KeyAuto5R2() {
         MoreKeysKeyboardParams params = createParams(4, 5, XPOS_R2);
         assertEquals("4 key auto 5 R2 columns", 4, params.mNumColumns);
@@ -770,6 +823,7 @@
 
     //   [4] [5]
     // [3] <1> [2]
+    @Test
     public void testLayout5KeyAuto3M0() {
         MoreKeysKeyboardParams params = createParams(5, 3, XPOS_M0);
         assertEquals("5 key auto 3 M0 columns", 3, params.mNumColumns);
@@ -787,6 +841,7 @@
 
     // |[4] [5]
     // |<1> [2] [3]
+    @Test
     public void testLayout5KeyAuto3L0() {
         MoreKeysKeyboardParams params = createParams(5, 3, XPOS_L0);
         assertEquals("5 key auto 3 L0 columns", 3, params.mNumColumns);
@@ -804,6 +859,7 @@
 
     // |___ [4] [5]
     // |___ <1> [2] [3]
+    @Test
     public void testLayout5KeyAuto3L1() {
         MoreKeysKeyboardParams params = createParams(5, 3, XPOS_L1);
         assertEquals("5 key auto 3 L1 columns", 3, params.mNumColumns);
@@ -821,6 +877,7 @@
 
     // |___   [4] [5]
     // |___ [3] <1> [2]
+    @Test
     public void testLayout5KeyAuto3L2() {
         MoreKeysKeyboardParams params = createParams(5, 3, XPOS_L2);
         assertEquals("5 key auto 3 L2 columns", 3, params.mNumColumns);
@@ -838,6 +895,7 @@
 
     //     [5] [4]|
     // [3] [2] <1>|
+    @Test
     public void testLayout5KeyAuto3R0() {
         MoreKeysKeyboardParams params = createParams(5, 3, XPOS_R0);
         assertEquals("5 key auto 3 R0 columns", 3, params.mNumColumns);
@@ -855,6 +913,7 @@
 
     //     [5] [4] ___|
     // [3] [2] <1> ___|
+    @Test
     public void testLayout5KeyAuto3R1() {
         MoreKeysKeyboardParams params = createParams(5, 3, XPOS_R1);
         assertEquals("5 key auto 3 R1 columns", 3, params.mNumColumns);
@@ -872,6 +931,7 @@
 
     //   [4] [5]   ___|
     // [3] <1> [2] ___|
+    @Test
     public void testLayout5KeyAuto3R2() {
         MoreKeysKeyboardParams params = createParams(5, 3, XPOS_R2);
         assertEquals("5 key auto 3 R2 columns", 3, params.mNumColumns);
@@ -889,6 +949,7 @@
 
     //     [5]
     // [3] <1> [2] [4]
+    @Test
     public void testLayout5KeyAuto4M0() {
         MoreKeysKeyboardParams params = createParams(5, 4, XPOS_M0);
         assertEquals("5 key auto 4 M0 columns", 4, params.mNumColumns);
@@ -906,6 +967,7 @@
 
     // |[5]
     // |<1> [2] [3] [4]
+    @Test
     public void testLayout5KeyAuto4L0() {
         MoreKeysKeyboardParams params = createParams(5, 4, XPOS_L0);
         assertEquals("5 key auto 4 L0 columns", 4, params.mNumColumns);
@@ -923,6 +985,7 @@
 
     // |___ [5]
     // |___ <1> [2] [3] [4]
+    @Test
     public void testLayout5KeyAuto4L1() {
         MoreKeysKeyboardParams params = createParams(5, 4, XPOS_L1);
         assertEquals("5 key auto 4 L1 columns", 4, params.mNumColumns);
@@ -940,6 +1003,7 @@
 
     // |___     [5]
     // |___ [3] <1> [2] [4]
+    @Test
     public void testLayout5KeyAuto4L2() {
         MoreKeysKeyboardParams params = createParams(5, 4, XPOS_L2);
         assertEquals("5 key auto 4 L2 columns", 4, params.mNumColumns);
@@ -957,6 +1021,7 @@
 
     //             [5]|
     // [4] [3] [2] <1>|
+    @Test
     public void testLayout5KeyAuto4R0() {
         MoreKeysKeyboardParams params = createParams(5, 4, XPOS_R0);
         assertEquals("5 key auto 4 R0 columns", 4, params.mNumColumns);
@@ -974,6 +1039,7 @@
 
     //             [5] ___|
     // [4] [3] [2] <1> ___|
+    @Test
     public void testLayout5KeyAuto4R1() {
         MoreKeysKeyboardParams params = createParams(5, 4, XPOS_R1);
         assertEquals("5 key auto 4 R1 columns", 4, params.mNumColumns);
@@ -991,6 +1057,7 @@
 
     //         [5]     ___|
     // [4] [3] <1> [2] ___|
+    @Test
     public void testLayout5KeyAuto4R2() {
         MoreKeysKeyboardParams params = createParams(5, 4, XPOS_R2);
         assertEquals("5 key auto 4 R2 columns", 4, params.mNumColumns);
@@ -1007,6 +1074,7 @@
     }
 
     // [5] [3] <1> [2] [4]
+    @Test
     public void testLayout5KeyAuto5M0() {
         MoreKeysKeyboardParams params = createParams(5, 5, XPOS_M0);
         assertEquals("5 key auto 5 M0 columns", 5, params.mNumColumns);
@@ -1023,6 +1091,7 @@
     }
 
     // |<1> [2] [3] [4] [5]
+    @Test
     public void testLayout5KeyAuto5L0() {
         MoreKeysKeyboardParams params = createParams(5, 5, XPOS_L0);
         assertEquals("5 key auto 5 L0 columns", 5, params.mNumColumns);
@@ -1039,6 +1108,7 @@
     }
 
     // |___ <1> [2] [3] [4] [5]
+    @Test
     public void testLayout5KeyAuto5L1() {
         MoreKeysKeyboardParams params = createParams(5, 5, XPOS_L1);
         assertEquals("5 key auto 5 L1 columns", 5, params.mNumColumns);
@@ -1055,6 +1125,7 @@
     }
 
     // |___ [3] <1> [2] [4] [5]
+    @Test
     public void testLayout5KeyAuto5L2() {
         MoreKeysKeyboardParams params = createParams(5, 5, XPOS_L2);
         assertEquals("5 key auto 5 L2 columns", 5, params.mNumColumns);
@@ -1071,6 +1142,7 @@
     }
 
     // [5] [4] [3] [2] <1>|
+    @Test
     public void testLayout5KeyAuto5R0() {
         MoreKeysKeyboardParams params = createParams(5, 5, XPOS_R0);
         assertEquals("5 key auto 5 R0 columns", 5, params.mNumColumns);
@@ -1087,6 +1159,7 @@
     }
 
     // [5] [4] [3] [2] <1> ___|
+    @Test
     public void testLayout5KeyAuto5R1() {
         MoreKeysKeyboardParams params = createParams(5, 5, XPOS_R1);
         assertEquals("5 key auto 5 R1 columns", 5, params.mNumColumns);
@@ -1103,6 +1176,7 @@
     }
 
     // [5] [4] [3] <1> [2] ___|
+    @Test
     public void testLayout5KeyAuto5R2() {
         MoreKeysKeyboardParams params = createParams(5, 5, XPOS_R2);
         assertEquals("5 key auto 5 R2 columns", 5, params.mNumColumns);
@@ -1120,6 +1194,7 @@
 
     //     [5] [6]
     // [3] <1> [2] [4]
+    @Test
     public void testLayout6KeyAuto4M0() {
         MoreKeysKeyboardParams params = createParams(6, 4, XPOS_M0);
         assertEquals("6 key auto 4 M0 columns", 4, params.mNumColumns);
@@ -1138,6 +1213,7 @@
 
     // |[5] [6]
     // |<1> [2] [3] [4]
+    @Test
     public void testLayout6KeyAuto4L0() {
         MoreKeysKeyboardParams params = createParams(6, 4, XPOS_L0);
         assertEquals("6 key auto 4 L0 columns", 4, params.mNumColumns);
@@ -1156,6 +1232,7 @@
 
     // |___ [5] [6]
     // |___ <1> [2] [3] [4]
+    @Test
     public void testLayout6KeyAuto4L1() {
         MoreKeysKeyboardParams params = createParams(6, 4, XPOS_L1);
         assertEquals("6 key auto 4 L1 columns", 4, params.mNumColumns);
@@ -1174,6 +1251,7 @@
 
     // |___     [5] [6]
     // |___ [3] <1> [2] [4]
+    @Test
     public void testLayout6KeyAuto4L2() {
         MoreKeysKeyboardParams params = createParams(6, 4, XPOS_L2);
         assertEquals("6 key auto 4 L2 columns", 4, params.mNumColumns);
@@ -1192,6 +1270,7 @@
 
     //         [6] [5]|
     // [4] [3] [2] <1>|
+    @Test
     public void testLayout6KeyAuto4R0() {
         MoreKeysKeyboardParams params = createParams(6, 4, XPOS_R0);
         assertEquals("6 key auto 4 R0 columns", 4, params.mNumColumns);
@@ -1210,6 +1289,7 @@
 
     //         [6] [5] ___|
     // [4] [3] [2] <1> ___|
+    @Test
     public void testLayout6KeyAuto4R1() {
         MoreKeysKeyboardParams params = createParams(6, 4, XPOS_R1);
         assertEquals("6 key auto 4 R1 columns", 4, params.mNumColumns);
@@ -1228,6 +1308,7 @@
 
     //         [5] [6] ___|
     // [4] [3] <1> [2] ___|
+    @Test
     public void testLayout6KeyAuto4R2() {
         MoreKeysKeyboardParams params = createParams(6, 4, XPOS_R2);
         assertEquals("6 key auto 4 R2 columns", 4, params.mNumColumns);
@@ -1246,6 +1327,7 @@
 
     //         [6]
     // [5] [3] <1> [2] [4]
+    @Test
     public void testLayout6KeyAuto5M0() {
         MoreKeysKeyboardParams params = createParams(6, 5, XPOS_M0);
         assertEquals("6 key auto 5 M0 columns", 5, params.mNumColumns);
@@ -1264,6 +1346,7 @@
 
     // |[6]
     // |<1> [2] [3] [4] [5]
+    @Test
     public void testLayout6KeyAuto5L0() {
         MoreKeysKeyboardParams params = createParams(6, 5, XPOS_L0);
         assertEquals("6 key auto 5 L0 columns", 5, params.mNumColumns);
@@ -1282,6 +1365,7 @@
 
     // |___ [6]
     // |___ <1> [2] [3] [4] [5]
+    @Test
     public void testLayout6KeyAuto5L1() {
         MoreKeysKeyboardParams params = createParams(6, 5, XPOS_L1);
         assertEquals("6 key auto 5 L1 columns", 5, params.mNumColumns);
@@ -1300,6 +1384,7 @@
 
     // |___     [6]
     // |___ [3] <1> [2] [4] [5]
+    @Test
     public void testLayout6KeyAuto5L2() {
         MoreKeysKeyboardParams params = createParams(6, 5, XPOS_L2);
         assertEquals("6 key auto 5 L2 columns", 5, params.mNumColumns);
@@ -1318,6 +1403,7 @@
 
     //                 [6]|
     // [5] [4] [3] [2] <1>|
+    @Test
     public void testLayout6KeyAuto5R0() {
         MoreKeysKeyboardParams params = createParams(6, 5, XPOS_R0);
         assertEquals("6 key auto 5 R0 columns", 5, params.mNumColumns);
@@ -1336,6 +1422,7 @@
 
     //                 [6] ___|
     // [5] [4] [3] [2] <1> ___|
+    @Test
     public void testLayout6KeyAuto5R1() {
         MoreKeysKeyboardParams params = createParams(6, 5, XPOS_R1);
         assertEquals("6 key auto 5 R1 columns", 5, params.mNumColumns);
@@ -1354,6 +1441,7 @@
 
     //             [6]     ___|
     // [5] [4] [3] <1> [2] ___|
+    @Test
     public void testLayout6KeyAuto5R2() {
         MoreKeysKeyboardParams params = createParams(6, 5, XPOS_R2);
         assertEquals("6 key auto 5 R2 columns", 5, params.mNumColumns);
@@ -1371,6 +1459,7 @@
     }
 
     // |<1> [2] [3] [4] [5] [6] [7] ___ ___ ___|
+    @Test
     public void testLayout7KeyAuto7L0() {
         MoreKeysKeyboardParams params = createParams(7, 7, XPOS_L0);
         assertEquals("7 key auto 7 L0 columns", 7, params.mNumColumns);
@@ -1389,6 +1478,7 @@
     }
 
     // |___ <1> [2] [3] [4] [5] [6] [7] ___ ___|
+    @Test
     public void testLayout7KeyAuto7L1() {
         MoreKeysKeyboardParams params = createParams(7, 7, XPOS_L1);
         assertEquals("7 key auto 7 L1 columns", 7, params.mNumColumns);
@@ -1407,6 +1497,7 @@
     }
 
     // |___ [3] <1> [2] [4] [5] [6] [7] ___ ___|
+    @Test
     public void testLayout7KeyAuto7L2() {
         MoreKeysKeyboardParams params = createParams(7, 7, XPOS_L2);
         assertEquals("7 key auto 7 L2 columns", 7, params.mNumColumns);
@@ -1425,6 +1516,7 @@
     }
 
     // |___ [5] [3] <1> [2] [4] [6] [7] ___ ___|
+    @Test
     public void testLayout7KeyAuto7L3() {
         MoreKeysKeyboardParams params = createParams(7, 7, XPOS_L3);
         assertEquals("7 key auto 7 L3 columns", 7, params.mNumColumns);
@@ -1443,6 +1535,7 @@
     }
 
     // |___ [7] [5] [3] <1> [2] [4] [6] ___ ___|
+    @Test
     public void testLayout7KeyAuto7M0() {
         MoreKeysKeyboardParams params = createParams(7, 7, XPOS_M0);
         assertEquals("7 key auto 7 M0 columns", 7, params.mNumColumns);
@@ -1461,6 +1554,7 @@
     }
 
     // |___ ___ [7] [5] [3] <1> [2] [4] [6] ___|
+    @Test
     public void testLayout7KeyAuto7M1() {
         MoreKeysKeyboardParams params = createParams(7, 7, XPOS_M1);
         assertEquals("7 key auto 7 M1 columns", 7, params.mNumColumns);
@@ -1479,6 +1573,7 @@
     }
 
     // |___ ___ [7] [6] [5] [3] <1> [2] [4] ___|
+    @Test
     public void testLayout7KeyAuto7R3() {
         MoreKeysKeyboardParams params = createParams(7, 7, XPOS_R3);
         assertEquals("7 key auto 7 R3 columns", 7, params.mNumColumns);
@@ -1497,6 +1592,7 @@
     }
 
     // |___ ___ [7] [6] [5] [4] [3] <1> [2] ___|
+    @Test
     public void testLayout7KeyAuto7R2() {
         MoreKeysKeyboardParams params = createParams(7, 7, XPOS_R2);
         assertEquals("7 key auto 7 R2 columns", 7, params.mNumColumns);
@@ -1515,6 +1611,7 @@
     }
 
     // |___ ___ [7] [6] [5] [4] [3] [2] <1> ___|
+    @Test
     public void testLayout7KeyAuto7R1() {
         MoreKeysKeyboardParams params = createParams(7, 7, XPOS_R1);
         assertEquals("7 key auto 7 R1 columns", 7, params.mNumColumns);
@@ -1533,6 +1630,7 @@
     }
 
     // |___ ___ [7] [6] [5] [4] [3] [2] <1>|
+    @Test
     public void testLayout7KeyAuto7R0() {
         MoreKeysKeyboardParams params = createParams(7, 7, XPOS_R0);
         assertEquals("7 key auto 7 R0 columns", 7, params.mNumColumns);
@@ -1552,6 +1650,7 @@
 
     //       [6] [7]
     // [5] [3] <1> [2] [4]
+    @Test
     public void testLayout7KeyAuto5M0() {
         MoreKeysKeyboardParams params = createParams(7, 5, XPOS_M0);
         assertEquals("7 key auto 5 M0 columns", 5, params.mNumColumns);
@@ -1571,6 +1670,7 @@
 
     // |[6] [7]
     // |<1> [2] [3] [4] [5]
+    @Test
     public void testLayout7KeyAuto5L0() {
         MoreKeysKeyboardParams params = createParams(7, 5, XPOS_L0);
         assertEquals("7 key auto 5 L0 columns", 5, params.mNumColumns);
@@ -1590,6 +1690,7 @@
 
     // |___ [6] [7]
     // |___ <1> [2] [3] [4] [5]
+    @Test
     public void testLayout7KeyAuto5L1() {
         MoreKeysKeyboardParams params = createParams(7, 5, XPOS_L1);
         assertEquals("7 key auto 5 L1 columns", 5, params.mNumColumns);
@@ -1609,6 +1710,7 @@
 
     // |___   [6] [7]
     // |___ [3] <1> [2] [4] [5]
+    @Test
     public void testLayout7KeyAuto5L2() {
         MoreKeysKeyboardParams params = createParams(7, 5, XPOS_L2);
         assertEquals("7 key auto 5 L2 columns", 5, params.mNumColumns);
@@ -1628,6 +1730,7 @@
 
     //             [7] [6]|
     // [5] [4] [3] [2] <1>|
+    @Test
     public void testLayout7KeyAuto5R0() {
         MoreKeysKeyboardParams params = createParams(7, 5, XPOS_R0);
         assertEquals("7 key auto 5 R0 columns", 5, params.mNumColumns);
@@ -1647,6 +1750,7 @@
 
     //             [7] [6] ___|
     // [5] [4] [3] [2] <1> ___|
+    @Test
     public void testLayout7KeyAuto5R1() {
         MoreKeysKeyboardParams params = createParams(7, 5, XPOS_R1);
         assertEquals("7 key auto 5 R1 columns", 5, params.mNumColumns);
@@ -1666,6 +1770,7 @@
 
     //           [6] [7]   ___|
     // [5] [4] [3] <1> [2] ___|
+    @Test
     public void testLayout7KeyAuto5R2() {
         MoreKeysKeyboardParams params = createParams(7, 5, XPOS_R2);
         assertEquals("7 key auto 5 R2 columns", 5, params.mNumColumns);
@@ -1686,6 +1791,7 @@
     //     [7]
     // [6] [4] [5]
     // [3] <1> [2]
+    @Test
     public void testLayout7KeyAuto3M0() {
         MoreKeysKeyboardParams params = createParams(7, 3, XPOS_M0);
         assertEquals("7 key auto 3 M0 columns", 3, params.mNumColumns);
@@ -1706,6 +1812,7 @@
     // |[7]
     // |[4] [5] [6]
     // |<1> [2] [3]
+    @Test
     public void testLayout7KeyAuto3L0() {
         MoreKeysKeyboardParams params = createParams(7, 3, XPOS_L0);
         assertEquals("7 key auto 3 L0 columns", 3, params.mNumColumns);
@@ -1726,6 +1833,7 @@
     // |___ [7]
     // |___ [4] [5] [6]
     // |___ <1> [2] [3]
+    @Test
     public void testLayout7KeyAuto3L1() {
         MoreKeysKeyboardParams params = createParams(7, 3, XPOS_L1);
         assertEquals("7 key auto 3 L1 columns", 3, params.mNumColumns);
@@ -1746,6 +1854,7 @@
     // |___     [7]
     // |___ [6] [4] [5]
     // |___ [3] <1> [2]
+    @Test
     public void testLayout7KeyAuto3L2() {
         MoreKeysKeyboardParams params = createParams(7, 3, XPOS_L2);
         assertEquals("7 key auto 3 L2 columns", 3, params.mNumColumns);
@@ -1766,6 +1875,7 @@
     //         [7]|
     // [6] [5] [4]|
     // [3] [2] <1>|
+    @Test
     public void testLayout7KeyAuto3R0() {
         MoreKeysKeyboardParams params = createParams(7, 3, XPOS_R0);
         assertEquals("7 key auto 3 R0 columns", 3, params.mNumColumns);
@@ -1786,6 +1896,7 @@
     //         [7] ___|
     // [6] [5] [4] ___|
     // [3] [2] <1> ___|
+    @Test
     public void testLayout7KeyAuto3R1() {
         MoreKeysKeyboardParams params = createParams(7, 3, XPOS_R1);
         assertEquals("7 key auto 3 R1 columns", 3, params.mNumColumns);
@@ -1806,6 +1917,7 @@
     //     [7]     ___|
     // [6] [4] [5] ___|
     // [3] <1> [2] ___|
+    @Test
     public void testLayout7KeyAuto3R2() {
         MoreKeysKeyboardParams params = createParams(7, 3, XPOS_R2);
         assertEquals("7 key auto 3 R2 columns", 3, params.mNumColumns);
@@ -1825,6 +1937,7 @@
 
     //     [8] [6] [7]
     // [5] [3] <1> [2] [4]
+    @Test
     public void testLayout8KeyAuto5M0() {
         MoreKeysKeyboardParams params = createParams(8, 5, XPOS_M0);
         assertEquals("8 key auto 5 M0 columns", 5, params.mNumColumns);
@@ -1845,6 +1958,7 @@
 
     // |[6] [7] [8]
     // |<1> [2] [3] [4] [5]
+    @Test
     public void testLayout8KeyAuto5L0() {
         MoreKeysKeyboardParams params = createParams(8, 5, XPOS_L0);
         assertEquals("8 key auto 5 L0 columns", 5, params.mNumColumns);
@@ -1865,6 +1979,7 @@
 
     // |___ [6] [7] [8]
     // |___ <1> [2] [3] [4] [5]
+    @Test
     public void testLayout8KeyAuto5L1() {
         MoreKeysKeyboardParams params = createParams(8, 5, XPOS_L1);
         assertEquals("8 key auto 5 L1 columns", 5, params.mNumColumns);
@@ -1885,6 +2000,7 @@
 
     // |___ [8] [6] [7]
     // |___ [3] <1> [2] [4] [5]
+    @Test
     public void testLayout8KeyAuto5L2() {
         MoreKeysKeyboardParams params = createParams(8, 5, XPOS_L2);
         assertEquals("8 key auto 5 L2 columns", 5, params.mNumColumns);
@@ -1905,6 +2021,7 @@
 
     //         [8] [7] [6]|
     // [5] [4] [3] [2] <1>|
+    @Test
     public void testLayout8KeyAuto5R0() {
         MoreKeysKeyboardParams params = createParams(8, 5, XPOS_R0);
         assertEquals("8 key auto 5 R0 columns", 5, params.mNumColumns);
@@ -1925,6 +2042,7 @@
 
     //         [8] [7] [6] ___|
     // [5] [4] [3] [2] <1> ___|
+    @Test
     public void testLayout8KeyAuto5R1() {
         MoreKeysKeyboardParams params = createParams(8, 5, XPOS_R1);
         assertEquals("8 key auto 5 R1 columns", 5, params.mNumColumns);
@@ -1945,6 +2063,7 @@
 
     //         [8] [6] [7] ___|
     // [5] [4] [3] <1> [2] ___|
+    @Test
     public void testLayout8KeyAuto5R2() {
         MoreKeysKeyboardParams params = createParams(8, 5, XPOS_R2);
         assertEquals("8 key auto 5 R2 columns", 5, params.mNumColumns);
@@ -1965,6 +2084,7 @@
 
     //   [8] [6] [7] [9]
     // [5] [3] <1> [2] [4]
+    @Test
     public void testLayout9KeyAuto5M0() {
         MoreKeysKeyboardParams params = createParams(9, 5, XPOS_M0);
         assertEquals("9 key auto 5 M0 columns", 5, params.mNumColumns);
@@ -1986,6 +2106,7 @@
 
     // |[6] [7] [8] [9]
     // |<1> [2] [3] [4] [5]
+    @Test
     public void testLayout9KeyAuto5L0() {
         MoreKeysKeyboardParams params = createParams(9, 5, XPOS_L0);
         assertEquals("9 key auto 5 L0 columns", 5, params.mNumColumns);
@@ -2007,6 +2128,7 @@
 
     // |___ [6] [7] [8] [9]
     // |___ <1> [2] [3] [4] [5]
+    @Test
     public void testLayout9KeyAuto5L1() {
         MoreKeysKeyboardParams params = createParams(9, 5, XPOS_L1);
         assertEquals("9 key auto 5 L1 columns", 5, params.mNumColumns);
@@ -2028,6 +2150,7 @@
 
     // |___   [6] [7] [8] [9]
     // |___ [3] <1> [2] [4] [5]
+    @Test
     public void testLayout9KeyAuto5L2() {
         MoreKeysKeyboardParams params = createParams(9, 5, XPOS_L2);
         assertEquals("9 key auto 5 L2 columns", 5, params.mNumColumns);
@@ -2049,6 +2172,7 @@
 
     //     [9] [8] [7] [6]|
     // [5] [4] [3] [2] <1>|
+    @Test
     public void testLayout9KeyAuto5R0() {
         MoreKeysKeyboardParams params = createParams(9, 5, XPOS_R0);
         assertEquals("9 key auto 5 R0 columns", 5, params.mNumColumns);
@@ -2070,6 +2194,7 @@
 
     //     [9] [8] [7] [6] ___|
     // [5] [4] [3] [2] <1> ___|
+    @Test
     public void testLayout9KeyAuto5R1() {
         MoreKeysKeyboardParams params = createParams(9, 5, XPOS_R1);
         assertEquals("9 key auto 5 R1 columns", 5, params.mNumColumns);
@@ -2091,6 +2216,7 @@
 
     //   [9] [8] [6] [7]   ___|
     // [5] [4] [3] <1> [2] ___|
+    @Test
     public void testLayout9KeyAuto5R2() {
         MoreKeysKeyboardParams params = createParams(9, 5, XPOS_R2);
         assertEquals("9 key auto 5 R2 columns", 5, params.mNumColumns);
@@ -2112,6 +2238,7 @@
 
     // [A] [8] [6] [7] [9]
     // [5] [3] <1> [2] [4]
+    @Test
     public void testLayout10KeyAuto5M0() {
         MoreKeysKeyboardParams params = createParams(10, 5, XPOS_M0);
         assertEquals("10 key auto 5 M0 columns", 5, params.mNumColumns);
@@ -2134,6 +2261,7 @@
 
     // |[6] [7] [8] [9] [A]
     // |<1> [2] [3] [4] [5]
+    @Test
     public void testLayout10KeyAuto5L0() {
         MoreKeysKeyboardParams params = createParams(10, 5, XPOS_L0);
         assertEquals("10 key auto 5 L0 columns", 5, params.mNumColumns);
@@ -2156,6 +2284,7 @@
 
     // |___ [6] [7] [8] [9] [A]
     // |___ <1> [2] [3] [4] [5]
+    @Test
     public void testLayout10KeyAuto5L1() {
         MoreKeysKeyboardParams params = createParams(10, 5, XPOS_L1);
         assertEquals("10 key auto 5 L1 columns", 5, params.mNumColumns);
@@ -2178,6 +2307,7 @@
 
     // |___ [8] [6] [7] [9] [A]
     // |___ [3] <1> [2] [4] [5]
+    @Test
     public void testLayout10KeyAuto5L2() {
         MoreKeysKeyboardParams params = createParams(10, 5, XPOS_L2);
         assertEquals("10 key auto 5 L2 columns", 5, params.mNumColumns);
@@ -2200,6 +2330,7 @@
 
     // [A] [9] [8] [7] [6]|
     // [5] [4] [3] [2] <1>|
+    @Test
     public void testLayout10KeyAuto5R0() {
         MoreKeysKeyboardParams params = createParams(10, 5, XPOS_R0);
         assertEquals("10 key auto 5 R0 columns", 5, params.mNumColumns);
@@ -2222,6 +2353,7 @@
 
     // [A] [9] [8] [7] [6] ___|
     // [5] [4] [3] [2] <1> ___|
+    @Test
     public void testLayout10KeyAuto5R1() {
         MoreKeysKeyboardParams params = createParams(10, 5, XPOS_R1);
         assertEquals("10 key auto 5 R1 columns", 5, params.mNumColumns);
@@ -2244,6 +2376,7 @@
 
     // [A] [9] [8] [6] [7] ___|
     // [5] [4] [3] <1> [2] ___|
+    @Test
     public void testLayout10KeyAuto5R2() {
         MoreKeysKeyboardParams params = createParams(10, 5, XPOS_R2);
         assertEquals("10 key auto 5 R2 columns", 5, params.mNumColumns);
@@ -2267,6 +2400,7 @@
     //         [B]
     // [A] [8] [6] [7] [9]
     // [5] [3] <1> [2] [4]
+    @Test
     public void testLayout11KeyAuto5M0() {
         MoreKeysKeyboardParams params = createParams(11, 5, XPOS_M0);
         assertEquals("11 key auto 5 M0 columns", 5, params.mNumColumns);
@@ -2291,6 +2425,7 @@
     //       [B] [C]
     // [A] [8] [6] [7] [9]
     // [5] [3] <1> [2] [4]
+    @Test
     public void testLayout12KeyAuto5M0() {
         MoreKeysKeyboardParams params = createParams(12, 5, XPOS_M0);
         assertEquals("12 key auto 5 M0 columns", 5, params.mNumColumns);
@@ -2316,6 +2451,7 @@
     //     [D] [B] [C]
     // [A] [8] [6] [7] [9]
     // [5] [3] <1> [2] [4]
+    @Test
     public void testLayout13KeyAuto5M0() {
         MoreKeysKeyboardParams params = createParams(13, 5, XPOS_M0);
         assertEquals("13 key auto 5 M0 columns", 5, params.mNumColumns);
@@ -2342,6 +2478,7 @@
     //   [D] [B] [C] [E]
     // [A] [8] [6] [7] [9]
     // [5] [3] <1> [2] [4]
+    @Test
     public void testLayout14KeyAuto5M0() {
         MoreKeysKeyboardParams params = createParams(14, 5, XPOS_M0);
         assertEquals("13 key auto 5 M0 columns", 5, params.mNumColumns);
@@ -2369,6 +2506,7 @@
     //                     [J] [I] [H] ___|
     // [G] [F] [E] [D] [C] [B] [A] [9] ___|
     // [8] [7] [6] [5] [4] [3] [2] <1> ___|
+    @Test
     public void testLayout19KeyAuto8R1() {
         MoreKeysKeyboardParams params = createParams(19, 8, XPOS_R1);
         assertEquals("19 key auto 8 R1 columns", 8, params.mNumColumns);
@@ -2401,6 +2539,7 @@
     //                   [J] [H] [I]   ___|
     // [G] [F] [E] [D] [C] [B] [9] [A] ___|
     // [8] [7] [6] [5] [4] [3] <1> [2] ___|
+    @Test
     public void testLayout19KeyAuto8R2() {
         MoreKeysKeyboardParams params = createParams(19, 8, XPOS_R2);
         assertEquals("19 key auto 8 R2 columns", 8, params.mNumColumns);
@@ -2433,6 +2572,7 @@
     //               [J] [H] [I]       ___|
     // [G] [F] [E] [D] [B] [9] [A] [C] ___|
     // [8] [7] [6] [5] [3] <1> [2] [4] ___|
+    @Test
     public void testLayout19KeyAuto8R3() {
         MoreKeysKeyboardParams params = createParams(19, 8, XPOS_R3);
         assertEquals("19 key auto 8 R3 columns", 8, params.mNumColumns);
diff --git a/tests/src/com/android/inputmethod/keyboard/MoreKeysKeyboardBuilderFixedOrderTests.java b/tests/src/com/android/inputmethod/keyboard/MoreKeysKeyboardBuilderFixedOrderTests.java
index 7e51d95..3c5c298 100644
--- a/tests/src/com/android/inputmethod/keyboard/MoreKeysKeyboardBuilderFixedOrderTests.java
+++ b/tests/src/com/android/inputmethod/keyboard/MoreKeysKeyboardBuilderFixedOrderTests.java
@@ -16,13 +16,21 @@
 
 package com.android.inputmethod.keyboard;
 
-import android.test.AndroidTestCase;
-import android.test.suitebuilder.annotation.MediumTest;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.fail;
+
+import androidx.test.filters.MediumTest;
+import androidx.test.runner.AndroidJUnit4;
 
 import com.android.inputmethod.keyboard.MoreKeysKeyboard.MoreKeysKeyboardParams;
 
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
 @MediumTest
-public class MoreKeysKeyboardBuilderFixedOrderTests extends AndroidTestCase {
+@RunWith(AndroidJUnit4.class)
+public class MoreKeysKeyboardBuilderFixedOrderTests {
     private static final int WIDTH = 10;
     private static final int HEIGHT = 10;
 
@@ -38,11 +46,6 @@
     private static final int XPOS_R1 = WIDTH * 8 + WIDTH / 2;
     private static final int XPOS_R0 = WIDTH * 9 + WIDTH / 2;
 
-    @Override
-    protected void setUp() throws Exception {
-        super.setUp();
-    }
-
     private static MoreKeysKeyboardParams createParams(final int numKeys, final int columnNum,
             final int coordXInParent) {
         final MoreKeysKeyboardParams params = new MoreKeysKeyboardParams();
@@ -52,6 +55,7 @@
         return params;
     }
 
+    @Test
     public void testLayoutError() {
         MoreKeysKeyboardParams params = null;
         try {
@@ -69,6 +73,7 @@
     // "<m>" is the default key.
 
     // <1>
+    @Test
     public void testLayout1KeyFix5M0() {
         MoreKeysKeyboardParams params = createParams(1, 5, XPOS_M0);
         assertEquals("1 key fix 5 M0 columns", 1, params.mNumColumns);
@@ -81,6 +86,7 @@
     }
 
     // |<1>
+    @Test
     public void testLayout1KeyFix5L0() {
         MoreKeysKeyboardParams params = createParams(1, 5, XPOS_L0);
         assertEquals("1 key fix 5 L0 columns", 1, params.mNumColumns);
@@ -93,6 +99,7 @@
     }
 
     // |___ <1>
+    @Test
     public void testLayout1KeyFix5L1() {
         MoreKeysKeyboardParams params = createParams(1, 5, XPOS_L1);
         assertEquals("1 key fix 5 L1 columns", 1, params.mNumColumns);
@@ -105,6 +112,7 @@
     }
 
     // |___ ___ <1>
+    @Test
     public void testLayout1KeyFix5L2() {
         MoreKeysKeyboardParams params = createParams(1, 5, XPOS_L2);
         assertEquals("1 key fix 5 L2 columns", 1, params.mNumColumns);
@@ -117,6 +125,7 @@
     }
 
     // <1>|
+    @Test
     public void testLayout1KeyFix5R0() {
         MoreKeysKeyboardParams params = createParams(1, 5, XPOS_R0);
         assertEquals("1 key fix 5 R0 columns", 1, params.mNumColumns);
@@ -129,6 +138,7 @@
     }
 
     // <1> ___|
+    @Test
     public void testLayout1KeyFix5R1() {
         MoreKeysKeyboardParams params = createParams(1, 5, XPOS_R1);
         assertEquals("1 key fix 5 R1 columns", 1, params.mNumColumns);
@@ -141,6 +151,7 @@
     }
 
     // <1> ___ ___|
+    @Test
     public void testLayout1KeyFix5R2() {
         MoreKeysKeyboardParams params = createParams(1, 5, XPOS_R2);
         assertEquals("1 key fix 5 R2 columns", 1, params.mNumColumns);
@@ -153,6 +164,7 @@
     }
 
     // <1> [2]
+    @Test
     public void testLayout2KeyFix5M0() {
         MoreKeysKeyboardParams params = createParams(2, 5, XPOS_M0);
         assertEquals("2 key fix 5 M0 columns", 2, params.mNumColumns);
@@ -166,6 +178,7 @@
     }
 
     // |<1> [2]
+    @Test
     public void testLayout2KeyFix5L0() {
         MoreKeysKeyboardParams params = createParams(2, 5, XPOS_L0);
         assertEquals("2 key fix 5 L0 columns", 2, params.mNumColumns);
@@ -179,6 +192,7 @@
     }
 
     // |___ <1> [2]
+    @Test
     public void testLayout2KeyFix5L1() {
         MoreKeysKeyboardParams params = createParams(2, 5, XPOS_L1);
         assertEquals("2 key fix 5 L1 columns", 2, params.mNumColumns);
@@ -192,6 +206,7 @@
     }
 
     // |___ ___ <1> [2]
+    @Test
     public void testLayout2KeyFix5L2() {
         MoreKeysKeyboardParams params = createParams(2, 5, XPOS_L2);
         assertEquals("2 key fix 5 L2 columns", 2, params.mNumColumns);
@@ -205,6 +220,7 @@
     }
 
     // [1] <2>|
+    @Test
     public void testLayout2KeyFix5R0() {
         MoreKeysKeyboardParams params = createParams(2, 5, XPOS_R0);
         assertEquals("2 key fix 5 R0 columns", 2, params.mNumColumns);
@@ -218,6 +234,7 @@
     }
 
     // [1] <2> ___|
+    @Test
     public void testLayout2KeyFix5R1() {
         MoreKeysKeyboardParams params = createParams(2, 5, XPOS_R1);
         assertEquals("2 key fix 5 R1 columns", 2, params.mNumColumns);
@@ -231,6 +248,7 @@
     }
 
     // <1> [2] ___|
+    @Test
     public void testLayout2KeyFix5R2() {
         MoreKeysKeyboardParams params = createParams(2, 5, XPOS_R2);
         assertEquals("2 key fix 5 R2 columns", 2, params.mNumColumns);
@@ -245,6 +263,7 @@
 
     // [3]
     // <1> [2]
+    @Test
     public void testLayout3KeyFix2M0() {
         MoreKeysKeyboardParams params = createParams(3, 2, XPOS_M0);
         assertEquals("3 key fix 2 M0 columns", 2, params.mNumColumns);
@@ -260,6 +279,7 @@
 
     // |[3]
     // |<1> [2]
+    @Test
     public void testLayout3KeyFix2L0() {
         MoreKeysKeyboardParams params = createParams(3, 2, XPOS_L0);
         assertEquals("3 key fix 2 L0 columns", 2, params.mNumColumns);
@@ -275,6 +295,7 @@
 
     // |___ [3]
     // |___ <1> [2]
+    @Test
     public void testLayout3KeyFix2L1() {
         MoreKeysKeyboardParams params = createParams(3, 2, XPOS_L1);
         assertEquals("3 key fix 2 L1 columns", 2, params.mNumColumns);
@@ -290,6 +311,7 @@
 
     // |        [3]
     // |___ ___ <1> [2]
+    @Test
     public void testLayout3KeyFix2L2() {
         MoreKeysKeyboardParams params = createParams(3, 2, XPOS_L2);
         assertEquals("3 key fix 2 L2 columns", 2, params.mNumColumns);
@@ -305,6 +327,7 @@
 
     //     [3]|
     // [1] <2>|
+    @Test
     public void testLayout3KeyFix2R0() {
         MoreKeysKeyboardParams params = createParams(3, 2, XPOS_R0);
         assertEquals("3 key fix 2 R0 columns", 2, params.mNumColumns);
@@ -320,6 +343,7 @@
 
     //     [3] ___|
     // [1] <2> ___|
+    @Test
     public void testLayout3KeyFix2R1() {
         MoreKeysKeyboardParams params = createParams(3, 2, XPOS_R1);
         assertEquals("3 key fix 2 R1 columns", 2, params.mNumColumns);
@@ -335,6 +359,7 @@
 
     // [3]     ___|
     // <1> [2] ___|
+    @Test
     public void testLayout3KeyFix2R2() {
         MoreKeysKeyboardParams params = createParams(3, 2, XPOS_R2);
         assertEquals("3 key fix 2 R2 columns", 2, params.mNumColumns);
@@ -350,6 +375,7 @@
 
     // [3] [4]
     // <1> [2]
+    @Test
     public void testLayout4KeyFix2M0() {
         MoreKeysKeyboardParams params = createParams(4, 2, XPOS_M0);
         assertEquals("3 key fix 2 M0 columns", 2, params.mNumColumns);
@@ -366,6 +392,7 @@
 
     // |[3] [4]
     // |<1> [2]
+    @Test
     public void testLayout4KeyFix2L0() {
         MoreKeysKeyboardParams params = createParams(4, 2, XPOS_L0);
         assertEquals("3 key fix 2 L0 columns", 2, params.mNumColumns);
@@ -382,6 +409,7 @@
 
     // |___ [3] [4]
     // |___ <1> [2]
+    @Test
     public void testLayout4KeyFix2L1() {
         MoreKeysKeyboardParams params = createParams(4, 2, XPOS_L1);
         assertEquals("3 key fix 2 L1 columns", 2, params.mNumColumns);
@@ -398,6 +426,7 @@
 
     // |        [3] [4]
     // |___ ___ <1> [2]
+    @Test
     public void testLayout4KeyFix2L2() {
         MoreKeysKeyboardParams params = createParams(4, 2, XPOS_L2);
         assertEquals("3 key fix 2 L2 columns", 2, params.mNumColumns);
@@ -414,6 +443,7 @@
 
     // [3] [4]|
     // [1] <2>|
+    @Test
     public void testLayout4KeyFix2R0() {
         MoreKeysKeyboardParams params = createParams(4, 2, XPOS_R0);
         assertEquals("3 key fix 2 R0 columns", 2, params.mNumColumns);
@@ -430,6 +460,7 @@
 
     // [3] [4] ___|
     // [1] <2> ___|
+    @Test
     public void testLayout4KeyFix2R1() {
         MoreKeysKeyboardParams params = createParams(4, 2, XPOS_R1);
         assertEquals("3 key fix 2 R1 columns", 2, params.mNumColumns);
@@ -446,6 +477,7 @@
 
     // [3] [4] ___|
     // <1> [2] ___|
+    @Test
     public void testLayout4KeyFix2R2() {
         MoreKeysKeyboardParams params = createParams(4, 2, XPOS_R2);
         assertEquals("3 key fix 2 R2 columns", 2, params.mNumColumns);
@@ -461,6 +493,7 @@
     }
 
     // [1] <2> [3]
+    @Test
     public void testLayout3KeyFix5M0() {
         MoreKeysKeyboardParams params = createParams(3, 5, XPOS_M0);
         assertEquals("3 key fix 5 columns", 3, params.mNumColumns);
@@ -475,6 +508,7 @@
     }
 
     // |<1> [2] [3]
+    @Test
     public void testLayout3KeyFix5L0() {
         MoreKeysKeyboardParams params = createParams(3, 5, XPOS_L0);
         assertEquals("3 key fix 5 L0 columns", 3, params.mNumColumns);
@@ -489,6 +523,7 @@
     }
 
     // |___ <1> [2] [3]
+    @Test
     public void testLayout3KeyFix5L1() {
         MoreKeysKeyboardParams params = createParams(3, 5, XPOS_L1);
         assertEquals("3 key fix 5 L1 columns", 3, params.mNumColumns);
@@ -503,6 +538,7 @@
     }
 
     // |___ [1] <2> [3]
+    @Test
     public void testLayout3KeyFix5L2() {
         MoreKeysKeyboardParams params = createParams(3, 5, XPOS_L2);
         assertEquals("3 key fix 5 L2 columns", 3, params.mNumColumns);
@@ -517,6 +553,7 @@
     }
 
     // [1] [2] <3>|
+    @Test
     public void testLayout3KeyFix5R0() {
         MoreKeysKeyboardParams params = createParams(3, 5, XPOS_R0);
         assertEquals("3 key fix 5 R0 columns", 3, params.mNumColumns);
@@ -531,6 +568,7 @@
     }
 
     // [1] [2] <3> ___|
+    @Test
     public void testLayout3KeyFix5R1() {
         MoreKeysKeyboardParams params = createParams(3, 5, XPOS_R1);
         assertEquals("3 key fix 5 R1 columns", 3, params.mNumColumns);
@@ -545,6 +583,7 @@
     }
 
     // [1] <2> [3] ___|
+    @Test
     public void testLayout3KeyFix5R2() {
         MoreKeysKeyboardParams params = createParams(3, 5, XPOS_R2);
         assertEquals("3 key fix 5 R2 columns", 3, params.mNumColumns);
@@ -560,6 +599,7 @@
 
     //     [4]
     // [1] <2> [3]
+    @Test
     public void testLayout4KeyFix3M0() {
         MoreKeysKeyboardParams params = createParams(4, 3, XPOS_M0);
         assertEquals("4 key fix 3 M0 columns", 3, params.mNumColumns);
@@ -576,6 +616,7 @@
 
     // |[4]
     // |<1> [2] [3]
+    @Test
     public void testLayout4KeyFix3L0() {
         MoreKeysKeyboardParams params = createParams(4, 3, XPOS_L0);
         assertEquals("4 key fix 3 L0 columns", 3, params.mNumColumns);
@@ -592,6 +633,7 @@
 
     // |___ [4]
     // |___ <1> [2] [3]
+    @Test
     public void testLayout4KeyFix3L1() {
         MoreKeysKeyboardParams params = createParams(4, 3, XPOS_L1);
         assertEquals("4 key fix 3 L1 columns", 3, params.mNumColumns);
@@ -608,6 +650,7 @@
 
     // |___ ___     [4]
     // |___ ___ [1] <2> [3]
+    @Test
     public void testLayout4KeyFix3L2() {
         MoreKeysKeyboardParams params = createParams(4, 3, XPOS_L2);
         assertEquals("4 key fix 3 L2 columns", 3, params.mNumColumns);
@@ -624,6 +667,7 @@
 
     //         [4]|
     // [1] [2] <3>|
+    @Test
     public void testLayout4KeyFix3R0() {
         MoreKeysKeyboardParams params = createParams(4, 3, XPOS_R0);
         assertEquals("4 key fix 3 R0 columns", 3, params.mNumColumns);
@@ -640,6 +684,7 @@
 
     //         [4] ___|
     // [1] [2] <3> ___|
+    @Test
     public void testLayout4KeyFix3R1() {
         MoreKeysKeyboardParams params = createParams(4, 3, XPOS_R1);
         assertEquals("4 key fix 3 R1 columns", 3, params.mNumColumns);
@@ -656,6 +701,7 @@
 
     //     [4]     ___|
     // [1] <2> [3] ___|
+    @Test
     public void testLayout4KeyFix3R2() {
         MoreKeysKeyboardParams params = createParams(4, 3, XPOS_R2);
         assertEquals("4 key fix 3 R2 columns", 3, params.mNumColumns);
@@ -672,6 +718,7 @@
 
     //   [4] [5]
     // [1] <2> [3]
+    @Test
     public void testLayout5KeyFix3M0() {
         MoreKeysKeyboardParams params = createParams(5, 3, XPOS_M0);
         assertEquals("5 key fix 3 M0 columns", 3, params.mNumColumns);
@@ -689,6 +736,7 @@
 
     // |[4] [5]
     // |<1> [2] [3]
+    @Test
     public void testLayout5KeyFix3L0() {
         MoreKeysKeyboardParams params = createParams(5, 3, XPOS_L0);
         assertEquals("5 key fix 3 L0 columns", 3, params.mNumColumns);
@@ -706,6 +754,7 @@
 
     // |___ [4] [5]
     // |___ <1> [2] [3]
+    @Test
     public void testLayout5KeyFix3L1() {
         MoreKeysKeyboardParams params = createParams(5, 3, XPOS_L1);
         assertEquals("5 key fix 3 L1 columns", 3, params.mNumColumns);
@@ -723,6 +772,7 @@
 
     // |___   [4] [5]
     // |___ [1] <2> [3]
+    @Test
     public void testLayout5KeyFix3L2() {
         MoreKeysKeyboardParams params = createParams(5, 3, XPOS_L2);
         assertEquals("5 key fix 3 L2 columns", 3, params.mNumColumns);
@@ -740,6 +790,7 @@
 
     //     [4] [5]|
     // [1] [2] <3>|
+    @Test
     public void testLayout5KeyFix3R0() {
         MoreKeysKeyboardParams params = createParams(5, 3, XPOS_R0);
         assertEquals("5 key fix 3 R0 columns", 3, params.mNumColumns);
@@ -757,6 +808,7 @@
 
     //     [4] [5] ___|
     // [1] [2] <3> ___|
+    @Test
     public void testLayout5KeyFix3R1() {
         MoreKeysKeyboardParams params = createParams(5, 3, XPOS_R1);
         assertEquals("5 key fix 3 R1 columns", 3, params.mNumColumns);
@@ -774,6 +826,7 @@
 
     //   [4] [5]   ___|
     // [1] <2> [3] ___|
+    @Test
     public void testLayout5KeyFix3R2() {
         MoreKeysKeyboardParams params = createParams(5, 3, XPOS_R2);
         assertEquals("5 key fix 3 R2 columns", 3, params.mNumColumns);
@@ -791,6 +844,7 @@
 
     // [4] [5] [6]
     // [1] <2> [3]
+    @Test
     public void testLayout6KeyFix3M0() {
         MoreKeysKeyboardParams params = createParams(6, 3, XPOS_M0);
         assertEquals("6 key fix 3 M0 columns", 3, params.mNumColumns);
@@ -809,6 +863,7 @@
 
     // |[4] [5] [6]
     // |<1> [2] [3]
+    @Test
     public void testLayout6KeyFix3L0() {
         MoreKeysKeyboardParams params = createParams(6, 3, XPOS_L0);
         assertEquals("6 key fix 3 L0 columns", 3, params.mNumColumns);
@@ -827,6 +882,7 @@
 
     // |___ [4] [5] [6]
     // |___ <1> [2] [3]
+    @Test
     public void testLayout6KeyFix3L1() {
         MoreKeysKeyboardParams params = createParams(6, 3, XPOS_L1);
         assertEquals("6 key fix 3 L1 columns", 3, params.mNumColumns);
@@ -845,6 +901,7 @@
 
     // |___ [4] [5] [6]
     // |___ [1] <2> [3]
+    @Test
     public void testLayout6KeyFix3L2() {
         MoreKeysKeyboardParams params = createParams(6, 3, XPOS_L2);
         assertEquals("6 key fix 3 L2 columns", 3, params.mNumColumns);
@@ -863,6 +920,7 @@
 
     // [4] [5] [6]|
     // [1] [2] <3>|
+    @Test
     public void testLayout6KeyFix3R0() {
         MoreKeysKeyboardParams params = createParams(6, 3, XPOS_R0);
         assertEquals("6 key fix 3 R0 columns", 3, params.mNumColumns);
@@ -881,6 +939,7 @@
 
     // [4] [5] [6] ___|
     // [1] [2] <3> ___|
+    @Test
     public void testLayout6KeyFix3R1() {
         MoreKeysKeyboardParams params = createParams(6, 3, XPOS_R1);
         assertEquals("6 key fix 3 R1 columns", 3, params.mNumColumns);
@@ -899,6 +958,7 @@
 
     // [4] [5] [6] ___|
     // [1] <2> [3] ___|
+    @Test
     public void testLayout6KeyFix3R2() {
         MoreKeysKeyboardParams params = createParams(6, 3, XPOS_R2);
         assertEquals("6 key fix 3 R2 columns", 3, params.mNumColumns);
@@ -916,6 +976,7 @@
     }
 
     // <1> [2] [3] [4]
+    @Test
     public void testLayout4KeyFix5M0() {
         MoreKeysKeyboardParams params = createParams(4, 5, XPOS_M0);
         assertEquals("4 key fix 5 columns", 4, params.mNumColumns);
@@ -931,6 +992,7 @@
     }
 
     // |<1> [2] [3] [4]
+    @Test
     public void testLayout4KeyFix5L0() {
         MoreKeysKeyboardParams params = createParams(4, 5, XPOS_L0);
         assertEquals("4 key fix 5 L0 columns", 4, params.mNumColumns);
@@ -946,6 +1008,7 @@
     }
 
     // |___ <1> [2] [3] [4]
+    @Test
     public void testLayout4KeyFix5L1() {
         MoreKeysKeyboardParams params = createParams(4, 5, XPOS_L1);
         assertEquals("4 key fix 5 L1 columns", 4, params.mNumColumns);
@@ -961,6 +1024,7 @@
     }
 
     // |___ [1] <2> [3] [4]
+    @Test
     public void testLayout4KeyFix5L2() {
         MoreKeysKeyboardParams params = createParams(4, 5, XPOS_L2);
         assertEquals("4 key fix 5 L2 columns", 4, params.mNumColumns);
@@ -976,6 +1040,7 @@
     }
 
     // [1] [2] [3] <4>|
+    @Test
     public void testLayout4KeyFix5R0() {
         MoreKeysKeyboardParams params = createParams(4, 5, XPOS_R0);
         assertEquals("4 key fix 5 R0 columns", 4, params.mNumColumns);
@@ -991,6 +1056,7 @@
     }
 
     // [1] [2] [3] <4> ___|
+    @Test
     public void testLayout4KeyFix5R1() {
         MoreKeysKeyboardParams params = createParams(4, 5, XPOS_R1);
         assertEquals("4 key fix 5 R1 columns", 4, params.mNumColumns);
@@ -1006,6 +1072,7 @@
     }
 
     // [1] [2] <3> [4] ___|
+    @Test
     public void testLayout4KeyFix5R2() {
         MoreKeysKeyboardParams params = createParams(4, 5, XPOS_R2);
         assertEquals("4 key fix 5 R2 columns", 4, params.mNumColumns);
@@ -1022,6 +1089,7 @@
 
     //     [5]
     // [1] <2> [3] [4]
+    @Test
     public void testLayout5KeyFix4M0() {
         MoreKeysKeyboardParams params = createParams(5, 4, XPOS_M0);
         assertEquals("5 key fix 4 M0 columns", 4, params.mNumColumns);
@@ -1039,6 +1107,7 @@
 
     // |[5]
     // |<1> [2] [3] [4]
+    @Test
     public void testLayout5KeyFix4L0() {
         MoreKeysKeyboardParams params = createParams(5, 4, XPOS_L0);
         assertEquals("5 key fix 4 L0 columns", 4, params.mNumColumns);
@@ -1056,6 +1125,7 @@
 
     // |___ [5]
     // |___ <1> [2] [3] [4]
+    @Test
     public void testLayout5KeyFix4L1() {
         MoreKeysKeyboardParams params = createParams(5, 4, XPOS_L1);
         assertEquals("5 key fix 4 L1 columns", 4, params.mNumColumns);
@@ -1073,6 +1143,7 @@
 
     // |___     [5]
     // |___ [1] <2> [3] [4]
+    @Test
     public void testLayout5KeyFix4L2() {
         MoreKeysKeyboardParams params = createParams(5, 4, XPOS_L2);
         assertEquals("5 key fix 4 L2 columns", 4, params.mNumColumns);
@@ -1090,6 +1161,7 @@
 
     //             [5]|
     // [1] [2] [3] <4>|
+    @Test
     public void testLayout5KeyFix4R0() {
         MoreKeysKeyboardParams params = createParams(5, 4, XPOS_R0);
         assertEquals("5 key fix 4 R0 columns", 4, params.mNumColumns);
@@ -1107,6 +1179,7 @@
 
     //             [5] ___|
     // [1] [2] [3] <4> ___|
+    @Test
     public void testLayout5KeyFix4R1() {
         MoreKeysKeyboardParams params = createParams(5, 4, XPOS_R1);
         assertEquals("5 key fix 4 R1 columns", 4, params.mNumColumns);
@@ -1124,6 +1197,7 @@
 
     //         [5]     ___|
     // [1] [2] <3> [4] ___|
+    @Test
     public void testLayout5KeyFix4R2() {
         MoreKeysKeyboardParams params = createParams(5, 4, XPOS_R2);
         assertEquals("5 key fix 4 R2 columns", 4, params.mNumColumns);
@@ -1141,6 +1215,7 @@
 
     //   [5] [6]
     // [1] <2> [3] [4]
+    @Test
     public void testLayout6KeyFix4M0() {
         MoreKeysKeyboardParams params = createParams(6, 4, XPOS_M0);
         assertEquals("6 key fix 4 M0 columns", 4, params.mNumColumns);
@@ -1159,6 +1234,7 @@
 
     // |[5] [6]
     // |<1> [2] [3] [4]
+    @Test
     public void testLayout6KeyFix4L0() {
         MoreKeysKeyboardParams params = createParams(6, 4, XPOS_L0);
         assertEquals("6 key fix 4 L0 columns", 4, params.mNumColumns);
@@ -1177,6 +1253,7 @@
 
     // |___ [5] [6]
     // |___ <1> [2] [3] [4]
+    @Test
     public void testLayout6KeyFix4L1() {
         MoreKeysKeyboardParams params = createParams(6, 4, XPOS_L1);
         assertEquals("6 key fix 4 L1 columns", 4, params.mNumColumns);
@@ -1195,6 +1272,7 @@
 
     // |___   [5] [6]
     // |___ [1] <2> [3] [4]
+    @Test
     public void testLayout6KeyFix4L2() {
         MoreKeysKeyboardParams params = createParams(6, 4, XPOS_L2);
         assertEquals("6 key fix 4 L2 columns", 4, params.mNumColumns);
@@ -1213,6 +1291,7 @@
 
     //         [5] [6]|
     // [1] [2] [3] <4>|
+    @Test
     public void testLayout6KeyFix4R0() {
         MoreKeysKeyboardParams params = createParams(6, 4, XPOS_R0);
         assertEquals("6 key fix 4 R0 columns", 4, params.mNumColumns);
@@ -1231,6 +1310,7 @@
 
     //         [5] [6] ___|
     // [1] [2] [3] <4> ___|
+    @Test
     public void testLayout6KeyFix4R1() {
         MoreKeysKeyboardParams params = createParams(6, 4, XPOS_R1);
         assertEquals("6 key fix 4 R1 columns", 4, params.mNumColumns);
@@ -1249,6 +1329,7 @@
 
     //       [5] [6]   ___|
     // [1] [2] <3> [4] ___|
+    @Test
     public void testLayout6KeyFix4R2() {
         MoreKeysKeyboardParams params = createParams(6, 4, XPOS_R2);
         assertEquals("6 key fix 4 R2 columns", 4, params.mNumColumns);
@@ -1267,6 +1348,7 @@
 
     // [5] [6] [7]
     // [1] <2> [3] [4]
+    @Test
     public void testLayout7KeyFix4M0() {
         MoreKeysKeyboardParams params = createParams(7, 4, XPOS_M0);
         assertEquals("7 key fix 4 M0 columns", 4, params.mNumColumns);
@@ -1286,6 +1368,7 @@
 
     // |[5] [6] [7]
     // |<1> [2] [3] [4]
+    @Test
     public void testLayout7KeyFix4L0() {
         MoreKeysKeyboardParams params = createParams(7, 4, XPOS_L0);
         assertEquals("7 key fix 4 L0 columns", 4, params.mNumColumns);
@@ -1305,6 +1388,7 @@
 
     // |___ [5] [6] [7]
     // |___ <1> [2] [3] [4]
+    @Test
     public void testLayout7KeyFix4L1() {
         MoreKeysKeyboardParams params = createParams(7, 4, XPOS_L1);
         assertEquals("7 key fix 4 L1 columns", 4, params.mNumColumns);
@@ -1324,6 +1408,7 @@
 
     // |___ [5] [6] [7]
     // |___ [1] <2> [3] [4]
+    @Test
     public void testLayout7KeyFix4L2() {
         MoreKeysKeyboardParams params = createParams(7, 4, XPOS_L2);
         assertEquals("7 key fix 4 L2 columns", 4, params.mNumColumns);
@@ -1343,6 +1428,7 @@
 
     //     [5] [6] [7]|
     // [1] [2] [3] <4>|
+    @Test
     public void testLayout7KeyFix4R0() {
         MoreKeysKeyboardParams params = createParams(7, 4, XPOS_R0);
         assertEquals("7 key fix 4 R0 columns", 4, params.mNumColumns);
@@ -1362,6 +1448,7 @@
 
     //     [5] [6] [7] ___|
     // [1] [2] [3] <4> ___|
+    @Test
     public void testLayout7KeyFix4R1() {
         MoreKeysKeyboardParams params = createParams(7, 4, XPOS_R1);
         assertEquals("7 key fix 4 R1 columns", 4, params.mNumColumns);
@@ -1381,6 +1468,7 @@
 
     //     [5] [6] [7] ___|
     // [1] [2] <3> [4] ___|
+    @Test
     public void testLayout7KeyFix4R2() {
         MoreKeysKeyboardParams params = createParams(7, 4, XPOS_R2);
         assertEquals("7 key fix 4 R2 columns", 4, params.mNumColumns);
@@ -1400,6 +1488,7 @@
 
     // [5] [6] [7] [8]
     // [1] <2> [3] [4]
+    @Test
     public void testLayout8KeyFix4M0() {
         MoreKeysKeyboardParams params = createParams(8, 4, XPOS_M0);
         assertEquals("8 key fix 4 M0 columns", 4, params.mNumColumns);
@@ -1420,6 +1509,7 @@
 
     // |[5] [6] [7] [8]
     // |<1> [2] [3] [4]
+    @Test
     public void testLayout8KeyFix4L0() {
         MoreKeysKeyboardParams params = createParams(8, 4, XPOS_L0);
         assertEquals("8 key fix 4 L0 columns", 4, params.mNumColumns);
@@ -1440,6 +1530,7 @@
 
     // |___ [5] [6] [7] [8]
     // |___ <1> [2] [3] [4]
+    @Test
     public void testLayout8KeyFix4L1() {
         MoreKeysKeyboardParams params = createParams(8, 4, XPOS_L1);
         assertEquals("8 key fix 4 L1 columns", 4, params.mNumColumns);
@@ -1460,6 +1551,7 @@
 
     // |___ [5] [6] [7] [8]
     // |___ [1] <2> [3] [4]
+    @Test
     public void testLayout8KeyFix4L2() {
         MoreKeysKeyboardParams params = createParams(8, 4, XPOS_L2);
         assertEquals("8 key fix 4 L2 columns", 4, params.mNumColumns);
@@ -1480,6 +1572,7 @@
 
     // [5] [6] [7] [8]|
     // [1] [2] [3] <4>|
+    @Test
     public void testLayout8KeyFix4R0() {
         MoreKeysKeyboardParams params = createParams(8, 4, XPOS_R0);
         assertEquals("8 key fix 4 R0 columns", 4, params.mNumColumns);
@@ -1500,6 +1593,7 @@
 
     // [5] [6] [7] [8] ___|
     // [1] [2] [3] <4> ___|
+    @Test
     public void testLayout8KeyFix4R1() {
         MoreKeysKeyboardParams params = createParams(8, 4, XPOS_R1);
         assertEquals("8 key fix 4 R1 columns", 4, params.mNumColumns);
@@ -1520,6 +1614,7 @@
 
     // [5] [6] [7] [8] ___|
     // [1] [2] <3> [4] ___|
+    @Test
     public void testLayout8KeyFix4R2() {
         MoreKeysKeyboardParams params = createParams(8, 4, XPOS_R2);
         assertEquals("8 key fix 4 R2 columns", 4, params.mNumColumns);
@@ -1539,6 +1634,7 @@
     }
 
      // [1] [2] <3> [4] [5]
+    @Test
     public void testLayout5KeyFix5M0() {
         MoreKeysKeyboardParams params = createParams(5, 5, XPOS_M0);
         assertEquals("5 key fix 5 columns", 5, params.mNumColumns);
@@ -1555,6 +1651,7 @@
     }
 
     // |<1> [2] [3] [4] [5]
+    @Test
     public void testLayout5KeyFix5L0() {
         MoreKeysKeyboardParams params = createParams(5, 5, XPOS_L0);
         assertEquals("5 key fix 5 L0 columns", 5, params.mNumColumns);
@@ -1571,6 +1668,7 @@
     }
 
     // |___ <1> [2] [3] [4] [5]
+    @Test
     public void testLayout5KeyFix5L1() {
         MoreKeysKeyboardParams params = createParams(5, 5, XPOS_L1);
         assertEquals("5 key fix 5 L1 columns", 5, params.mNumColumns);
@@ -1587,6 +1685,7 @@
     }
 
     // |___ [1] <2> [3] [4] [5]
+    @Test
     public void testLayout5KeyFix5L2() {
         MoreKeysKeyboardParams params = createParams(5, 5, XPOS_L2);
         assertEquals("5 key fix 5 L2 columns", 5, params.mNumColumns);
@@ -1603,6 +1702,7 @@
     }
 
     // [1] [2] [3] [4] <5>|
+    @Test
     public void testLayout5KeyFix5R0() {
         MoreKeysKeyboardParams params = createParams(5, 5, XPOS_R0);
         assertEquals("5 key fix 5 R0 columns", 5, params.mNumColumns);
@@ -1619,6 +1719,7 @@
     }
 
     // [1] [2] [3] [4] <5> ___|
+    @Test
     public void testLayout5KeyFix5R1() {
         MoreKeysKeyboardParams params = createParams(5, 5, XPOS_R1);
         assertEquals("5 key fix 5 R1 columns", 5, params.mNumColumns);
@@ -1635,6 +1736,7 @@
     }
 
     // [1] [2] [3] <4> [5] ___|
+    @Test
     public void testLayout5KeyFix5R2() {
         MoreKeysKeyboardParams params = createParams(5, 5, XPOS_R2);
         assertEquals("5 key fix 5 R2 columns", 5, params.mNumColumns);
@@ -1652,6 +1754,7 @@
 
     //         [6]
     // [1] [2] <3> [4] [5]
+    @Test
     public void testLayout6KeyFix5M0() {
         MoreKeysKeyboardParams params = createParams(6, 5, XPOS_M0);
         assertEquals("6 key fix 5 columns", 5, params.mNumColumns);
@@ -1670,6 +1773,7 @@
 
     // |[6]
     // |<1> [2] [3] [4] [5]
+    @Test
     public void testLayout6KeyFix5L0() {
         MoreKeysKeyboardParams params = createParams(6, 5, XPOS_L0);
         assertEquals("6 key fix 5 L0 columns", 5, params.mNumColumns);
@@ -1688,6 +1792,7 @@
 
     // |___ [6]
     // |___ <1> [2] [3] [4] [5]
+    @Test
     public void testLayout6KeyFix5L1() {
         MoreKeysKeyboardParams params = createParams(6, 5, XPOS_L1);
         assertEquals("6 key fix 5 L1 columns", 5, params.mNumColumns);
@@ -1706,6 +1811,7 @@
 
     // |___     [6]
     // |___ [1] <2> [3] [4] [5]
+    @Test
     public void testLayout6KeyFix5L2() {
         MoreKeysKeyboardParams params = createParams(6, 5, XPOS_L2);
         assertEquals("6 key fix 5 L2 columns", 5, params.mNumColumns);
@@ -1724,6 +1830,7 @@
 
     //                 [6]|
     // [1] [2] [3] [4] <5>|
+    @Test
     public void testLayout6KeyFix5R0() {
         MoreKeysKeyboardParams params = createParams(6, 5, XPOS_R0);
         assertEquals("6 key fix 5 R0 columns", 5, params.mNumColumns);
@@ -1742,6 +1849,7 @@
 
     //                 [6] ___|
     // [1] [2] [3] [4] <5> ___|
+    @Test
     public void testLayout6KeyFix5R1() {
         MoreKeysKeyboardParams params = createParams(6, 5, XPOS_R1);
         assertEquals("6 key fix 5 R1 columns", 5, params.mNumColumns);
@@ -1760,6 +1868,7 @@
 
     //             [6]     ___|
     // [1] [2] [3] <4> [5] ___|
+    @Test
     public void testLayout6KeyFix5R2() {
         MoreKeysKeyboardParams params = createParams(6, 5, XPOS_R2);
         assertEquals("6 key fix 5 R2 columns", 5, params.mNumColumns);
@@ -1778,6 +1887,7 @@
 
     //       [6] [7]
     // [1] [2] <3> [4] [5]
+    @Test
     public void testLayout7KeyFix5M0() {
         MoreKeysKeyboardParams params = createParams(7, 5, XPOS_M0);
         assertEquals("7 key fix 5 columns", 5, params.mNumColumns);
@@ -1797,6 +1907,7 @@
 
     // |[6] [7]
     // |<1> [2] [3] [4] [5]
+    @Test
     public void testLayout7KeyFix5L0() {
         MoreKeysKeyboardParams params = createParams(7, 5, XPOS_L0);
         assertEquals("7 key fix 5 L0 columns", 5, params.mNumColumns);
@@ -1816,6 +1927,7 @@
 
     // |___ [6] [7]
     // |___ <1> [2] [3] [4] [5]
+    @Test
     public void testLayout7KeyFix5L1() {
         MoreKeysKeyboardParams params = createParams(7, 5, XPOS_L1);
         assertEquals("7 key fix 5 L1 columns", 5, params.mNumColumns);
@@ -1835,6 +1947,7 @@
 
     // |___   [6] [7]
     // |___ [1] <2> [3] [4] [5]
+    @Test
     public void testLayout7KeyFix5L2() {
         MoreKeysKeyboardParams params = createParams(7, 5, XPOS_L2);
         assertEquals("7 key fix 5 L2 columns", 5, params.mNumColumns);
@@ -1854,6 +1967,7 @@
 
     //             [6] [7]|
     // [1] [2] [3] [4] <5>|
+    @Test
     public void testLayout7KeyFix5R0() {
         MoreKeysKeyboardParams params = createParams(7, 5, XPOS_R0);
         assertEquals("7 key fix 5 R0 columns", 5, params.mNumColumns);
@@ -1873,6 +1987,7 @@
 
     //             [6] [7] ___|
     // [1] [2] [3] [4] <5> ___|
+    @Test
     public void testLayout7KeyFix5R1() {
         MoreKeysKeyboardParams params = createParams(7, 5, XPOS_R1);
         assertEquals("7 key fix 5 R1 columns", 5, params.mNumColumns);
@@ -1892,6 +2007,7 @@
 
     //           [6] [7]   ___|
     // [1] [2] [3] <4> [5] ___|
+    @Test
     public void testLayout7KeyFix5R2() {
         MoreKeysKeyboardParams params = createParams(7, 5, XPOS_R2);
         assertEquals("7 key fix 5 R2 columns",5, params.mNumColumns);
@@ -1911,6 +2027,7 @@
 
     //     [6] [7] [8]
     // [1] [2] <3> [4] [5]
+    @Test
     public void testLayout8KeyFix5M0() {
         MoreKeysKeyboardParams params = createParams(8, 5, XPOS_M0);
         assertEquals("8 key fix 5 M0 columns", 5, params.mNumColumns);
@@ -1931,6 +2048,7 @@
 
     // |[6] [7] [8]
     // |<1> [2] [3] [4] [5]
+    @Test
     public void testLayout8KeyFix5L0() {
         MoreKeysKeyboardParams params = createParams(8, 5, XPOS_L0);
         assertEquals("8 key fix 5 L0 columns", 5, params.mNumColumns);
@@ -1951,6 +2069,7 @@
 
     // |___ [6] [7] [8]
     // |___ <1> [2] [3] [4] [5]
+    @Test
     public void testLayout8KeyFix5L1() {
         MoreKeysKeyboardParams params = createParams(8, 5, XPOS_L1);
         assertEquals("8 key fix 5 L1 columns", 5, params.mNumColumns);
@@ -1971,6 +2090,7 @@
 
     // |___ [6] [7] [8]
     // |___ [1] <2> [3] [4] [5]
+    @Test
     public void testLayout8KeyFix5L2() {
         MoreKeysKeyboardParams params = createParams(8, 5, XPOS_L2);
         assertEquals("8 key fix 5 L2 columns", 5, params.mNumColumns);
@@ -1991,6 +2111,7 @@
 
     //         [6] [7] [8]|
     // [1] [2] [3] [4] <5>|
+    @Test
     public void testLayout8KeyFix5R0() {
         MoreKeysKeyboardParams params = createParams(8, 5, XPOS_R0);
         assertEquals("8 key fix 5 R0 columns", 5, params.mNumColumns);
@@ -2011,6 +2132,7 @@
 
     //         [6] [7] [8] ___|
     // [1] [2] [3] [4] <5> ___|
+    @Test
     public void testLayout8KeyFix5R1() {
         MoreKeysKeyboardParams params = createParams(8, 5, XPOS_R1);
         assertEquals("8 key fix 5 R1 columns", 5, params.mNumColumns);
@@ -2031,6 +2153,7 @@
 
     //         [6] [7] [8] ___|
     // [1] [2] [3] <4> [5] ___|
+    @Test
     public void testLayout8KeyFix5R2() {
         MoreKeysKeyboardParams params = createParams(8, 5, XPOS_R2);
         assertEquals("8 key fix 5 R2 columns", 5, params.mNumColumns);
@@ -2051,6 +2174,7 @@
 
     //   [6] [7] [8] [9]
     // [1] [2] <3> [4] [5]
+    @Test
     public void testLayout9KeyFix5M0() {
         MoreKeysKeyboardParams params = createParams(9, 5, XPOS_M0);
         assertEquals("9 key fix 5 M0 columns", 5, params.mNumColumns);
@@ -2072,6 +2196,7 @@
 
     // |[6] [7] [8] [9]
     // |<1> [2] [3] [4] [5]
+    @Test
     public void testLayout9KeyFix5L0() {
         MoreKeysKeyboardParams params = createParams(9, 5, XPOS_L0);
         assertEquals("9 key fix 5 L0 columns", 5, params.mNumColumns);
@@ -2093,6 +2218,7 @@
 
     // |___ [6] [7] [8] [9]
     // |___ <1> [2] [3] [4] [5]
+    @Test
     public void testLayout9KeyFix5L1() {
         MoreKeysKeyboardParams params = createParams(9, 5, XPOS_L1);
         assertEquals("9 key fix 5 L1 columns", 5, params.mNumColumns);
@@ -2114,6 +2240,7 @@
 
     // |___   [6] [7] [8] [9]
     // |___ [1] <2> [3] [4] [5]
+    @Test
     public void testLayout9KeyFix5L2() {
         MoreKeysKeyboardParams params = createParams(9, 5, XPOS_L2);
         assertEquals("9 key fix 5 L2 columns", 5, params.mNumColumns);
@@ -2135,6 +2262,7 @@
 
     //     [6] [7] [8] [9]|
     // [1] [2] [3] [4] <5>|
+    @Test
     public void testLayout9KeyFix5R0() {
         MoreKeysKeyboardParams params = createParams(9, 5, XPOS_R0);
         assertEquals("9 key fix 5 R0 columns", 5, params.mNumColumns);
@@ -2156,6 +2284,7 @@
 
     //     [6] [7] [8] [9] ___|
     // [1] [2] [3] [4] <5> ___|
+    @Test
     public void testLayout9KeyFix5R1() {
         MoreKeysKeyboardParams params = createParams(9, 5, XPOS_R1);
         assertEquals("9 key fix 5 R1 columns", 5, params.mNumColumns);
@@ -2177,6 +2306,7 @@
 
     //   [6] [7] [8] [9]  ___|
     // [1] [2] [3] <4> [5] ___|
+    @Test
     public void testLayout9KeyFix5R2() {
         MoreKeysKeyboardParams params = createParams(9, 5, XPOS_R2);
         assertEquals("9 key fix 5 R2 columns", 5, params.mNumColumns);
@@ -2198,6 +2328,7 @@
 
     // [6] [7] [8] [9] [A]
     // [1] [2] <3> [4] [5]
+    @Test
     public void testLayout10KeyFix5M0() {
         MoreKeysKeyboardParams params = createParams(10, 5, XPOS_M0);
         assertEquals("10 key fix 5 M0 columns", 5, params.mNumColumns);
@@ -2220,6 +2351,7 @@
 
     // |[6] [7] [8] [9] [A]
     // |<1> [2] [3] [4] [5]
+    @Test
     public void testLayout10KeyFix5L0() {
         MoreKeysKeyboardParams params = createParams(10, 5, XPOS_L0);
         assertEquals("10 key fix 5 L0 columns", 5, params.mNumColumns);
@@ -2242,6 +2374,7 @@
 
     // |___ [6] [7] [8] [9] [A]
     // |___ <1> [2] [3] [4] [5]
+    @Test
     public void testLayout10KeyFix5L1() {
         MoreKeysKeyboardParams params = createParams(10, 5, XPOS_L1);
         assertEquals("10 key fix 5 L1 columns", 5, params.mNumColumns);
@@ -2264,6 +2397,7 @@
 
     // |___ [6] [7] [8] [9] [A]
     // |___ [1] <2> [3] [4] [5]
+    @Test
     public void testLayout10KeyFix5L2() {
         MoreKeysKeyboardParams params = createParams(10, 5, XPOS_L2);
         assertEquals("10 key fix 5 L2 columns", 5, params.mNumColumns);
@@ -2286,6 +2420,7 @@
 
     // [6] [7] [8] [9] [A]|
     // [1] [2] [3] [4] <5>|
+    @Test
     public void testLayout10KeyFix5R0() {
         MoreKeysKeyboardParams params = createParams(10, 5, XPOS_R0);
         assertEquals("10 key fix 5 R0 columns", 5, params.mNumColumns);
@@ -2308,6 +2443,7 @@
 
     // [6] [7] [8] [9] [A] ___|
     // [1] [2] [3] [4] <5> ___|
+    @Test
     public void testLayout10KeyFix5R1() {
         MoreKeysKeyboardParams params = createParams(10, 5, XPOS_R1);
         assertEquals("10 key fix 5 R1 columns", 5, params.mNumColumns);
@@ -2330,6 +2466,7 @@
 
     // [6] [7] [8] [9] [A] ___|
     // [1] [2] [3] <4> [5] ___|
+    @Test
     public void testLayout10KeyFix5R2() {
         MoreKeysKeyboardParams params = createParams(10, 5, XPOS_R2);
         assertEquals("10 key fix 5 R2 columns", 5, params.mNumColumns);
@@ -2353,6 +2490,7 @@
     //         [B]
     // [6] [7] [8] [9] [A]
     // [1] [2] <3> [4] [5]
+    @Test
     public void testLayout11KeyFix5M0() {
         MoreKeysKeyboardParams params = createParams(11, 5, XPOS_M0);
         assertEquals("11 key fix 5 M0 columns", 5, params.mNumColumns);
@@ -2377,6 +2515,7 @@
     //       [B] [C]
     // [6] [7] [8] [9] [A]
     // [1] [2] <3> [4] [5]
+    @Test
     public void testLayout12KeyFix5M0() {
         MoreKeysKeyboardParams params = createParams(12, 5, XPOS_M0);
         assertEquals("12 key fix 5 M0 columns", 5, params.mNumColumns);
@@ -2402,6 +2541,7 @@
     //     [B] [C] [D]
     // [6] [7] [8] [9] [A]
     // [1] [2] <3> [4] [5]
+    @Test
     public void testLayout13KeyFix5M0() {
         MoreKeysKeyboardParams params = createParams(13, 5, XPOS_M0);
         assertEquals("13 key fix 5 M0 columns", 5, params.mNumColumns);
@@ -2428,6 +2568,7 @@
     //   [B] [C] [D] [E]
     // [6] [7] [8] [9] [A]
     // [1] [2] <3> [4] [5]
+    @Test
     public void testLayout14KeyFix5M0() {
         MoreKeysKeyboardParams params = createParams(14, 5, XPOS_M0);
         assertEquals("14 key fix 5 M0 columns", 5, params.mNumColumns);
@@ -2453,6 +2594,7 @@
     }
 
     // |<1> [2] [3] [4] [5] [6] [7]
+    @Test
     public void testLayout7KeyFix7L0() {
         MoreKeysKeyboardParams params = createParams(7, 7, XPOS_L0);
         assertEquals("7 key fix 7 L0 columns", 7, params.mNumColumns);
@@ -2471,6 +2613,7 @@
     }
 
     // |___ <1> [2] [3] [4] [5] [6] [7]
+    @Test
     public void testLayout7KeyFix7L1() {
         MoreKeysKeyboardParams params = createParams(7, 7, XPOS_L1);
         assertEquals("7 key fix 7 L1 columns", 7, params.mNumColumns);
@@ -2489,6 +2632,7 @@
     }
 
     // |___ [1] <2> [3] [4] [5] [6] [7]
+    @Test
     public void testLayout7KeyFix7L2() {
         MoreKeysKeyboardParams params = createParams(7, 7, XPOS_L2);
         assertEquals("7 key fix 7 L2 columns", 7, params.mNumColumns);
@@ -2507,6 +2651,7 @@
     }
 
     // |___ [1] [2] <3> [4] [5] [6] [7]
+    @Test
     public void testLayout7KeyFix7L3() {
         MoreKeysKeyboardParams params = createParams(7, 7, XPOS_L3);
         assertEquals("7 key fix 7 L3 columns", 7, params.mNumColumns);
@@ -2525,6 +2670,7 @@
     }
 
     // |___ [1] [2] [3] <4> [5] [6] [7] ___ ___|
+    @Test
     public void testLayout7KeyFix7M0() {
         MoreKeysKeyboardParams params = createParams(7, 7, XPOS_M0);
         assertEquals("7 key fix 7 M0 columns", 7, params.mNumColumns);
@@ -2543,6 +2689,7 @@
     }
 
     // |___ ___ [1] [2] [3] <4> [5] [6] [7] ___|
+    @Test
     public void testLayout7KeyFix7M1() {
         MoreKeysKeyboardParams params = createParams(7, 7, XPOS_M1);
         assertEquals("7 key fix 7 M1 columns", 7, params.mNumColumns);
@@ -2561,6 +2708,7 @@
     }
 
     // [1] [2] [3] [4] <5> [6] [7] ___|
+    @Test
     public void testLayout7KeyFix7R3() {
         MoreKeysKeyboardParams params = createParams(7, 7, XPOS_R3);
         assertEquals("7 key fix 7 R3 columns", 7, params.mNumColumns);
@@ -2579,6 +2727,7 @@
     }
 
     // [1] [2] [3] [4] [5] <6> [7] ___|
+    @Test
     public void testLayout7KeyFix7R2() {
         MoreKeysKeyboardParams params = createParams(7, 7, XPOS_R2);
         assertEquals("7 key fix 7 R2 columns", 7, params.mNumColumns);
@@ -2597,6 +2746,7 @@
     }
 
     // [1] [2] [3] [4] [5] [6] <7> ___|
+    @Test
     public void testLayout7KeyFix7R1() {
         MoreKeysKeyboardParams params = createParams(7, 7, XPOS_R1);
         assertEquals("7 key fix 7 R1 columns", 7, params.mNumColumns);
@@ -2615,6 +2765,7 @@
     }
 
     // [1] [2] [3] [4] [5] [6] <7>|
+    @Test
     public void testLayout7KeyFix7R0() {
         MoreKeysKeyboardParams params = createParams(7, 7, XPOS_R0);
         assertEquals("7 key fix 7 R0 columns", 7, params.mNumColumns);
diff --git a/tests/src/com/android/inputmethod/keyboard/MoreKeysKeyboardBuilderMaxOrderTests.java b/tests/src/com/android/inputmethod/keyboard/MoreKeysKeyboardBuilderMaxOrderTests.java
index 806790e..1d28c22 100644
--- a/tests/src/com/android/inputmethod/keyboard/MoreKeysKeyboardBuilderMaxOrderTests.java
+++ b/tests/src/com/android/inputmethod/keyboard/MoreKeysKeyboardBuilderMaxOrderTests.java
@@ -16,13 +16,21 @@
 
 package com.android.inputmethod.keyboard;
 
-import android.test.AndroidTestCase;
-import android.test.suitebuilder.annotation.MediumTest;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.fail;
+
+import androidx.test.filters.MediumTest;
+import androidx.test.runner.AndroidJUnit4;
 
 import com.android.inputmethod.keyboard.MoreKeysKeyboard.MoreKeysKeyboardParams;
 
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
 @MediumTest
-public class MoreKeysKeyboardBuilderMaxOrderTests extends AndroidTestCase {
+@RunWith(AndroidJUnit4.class)
+public class MoreKeysKeyboardBuilderMaxOrderTests {
     private static final int WIDTH = 10;
     private static final int HEIGHT = 10;
 
@@ -38,11 +46,6 @@
     private static final int XPOS_R1 = WIDTH * 8 + WIDTH / 2;
     private static final int XPOS_R0 = WIDTH * 9 + WIDTH / 2;
 
-    @Override
-    protected void setUp() throws Exception {
-        super.setUp();
-    }
-
     private static MoreKeysKeyboardParams createParams(final int numKeys, final int maxColumns,
             final int coordXInParent) {
         final MoreKeysKeyboardParams params = new MoreKeysKeyboardParams();
@@ -52,6 +55,7 @@
         return params;
     }
 
+    @Test
     public void testLayoutError() {
         MoreKeysKeyboardParams params = null;
         try {
@@ -69,6 +73,7 @@
     // "<1>" is the default key.
 
     // <1>
+    @Test
     public void testLayout1KeyMax5M0() {
         MoreKeysKeyboardParams params = createParams(1, 5, XPOS_M0);
         assertEquals("1 key max 5 M0 columns", 1, params.mNumColumns);
@@ -81,6 +86,7 @@
     }
 
     // |<1>
+    @Test
     public void testLayout1KeyMax5L0() {
         MoreKeysKeyboardParams params = createParams(1, 5, XPOS_L0);
         assertEquals("1 key max 5 L0 columns", 1, params.mNumColumns);
@@ -93,6 +99,7 @@
     }
 
     // |___ <1>
+    @Test
     public void testLayout1KeyMax5L1() {
         MoreKeysKeyboardParams params = createParams(1, 5, XPOS_L1);
         assertEquals("1 key max 5 L1 columns", 1, params.mNumColumns);
@@ -105,6 +112,7 @@
     }
 
     // |___ ___ <1>
+    @Test
     public void testLayout1KeyMax5L2() {
         MoreKeysKeyboardParams params = createParams(1, 5, XPOS_L2);
         assertEquals("1 key max 5 L2 columns", 1, params.mNumColumns);
@@ -117,6 +125,7 @@
     }
 
     // <1>|
+    @Test
     public void testLayout1KeyMax5R0() {
         MoreKeysKeyboardParams params = createParams(1, 5, XPOS_R0);
         assertEquals("1 key max 5 R0 columns", 1, params.mNumColumns);
@@ -129,6 +138,7 @@
     }
 
     // <1> ___|
+    @Test
     public void testLayout1KeyMax5R1() {
         MoreKeysKeyboardParams params = createParams(1, 5, XPOS_R1);
         assertEquals("1 key max 5 R1 columns", 1, params.mNumColumns);
@@ -141,6 +151,7 @@
     }
 
     // <1> ___ ___|
+    @Test
     public void testLayout1KeyMax5R2() {
         MoreKeysKeyboardParams params = createParams(1, 5, XPOS_R2);
         assertEquals("1 key max 5 R2 columns", 1, params.mNumColumns);
@@ -153,6 +164,7 @@
     }
 
     // <1> [2]
+    @Test
     public void testLayout2KeyMax5M0() {
         MoreKeysKeyboardParams params = createParams(2, 5, XPOS_M0);
         assertEquals("2 key max 5 M0 columns", 2, params.mNumColumns);
@@ -166,6 +178,7 @@
     }
 
     // |<1> [2]
+    @Test
     public void testLayout2KeyMax5L0() {
         MoreKeysKeyboardParams params = createParams(2, 5, XPOS_L0);
         assertEquals("2 key max 5 L0 columns", 2, params.mNumColumns);
@@ -179,6 +192,7 @@
     }
 
     // |___ <1> [2]
+    @Test
     public void testLayout2KeyMax5L1() {
         MoreKeysKeyboardParams params = createParams(2, 5, XPOS_L1);
         assertEquals("2 key max 5 L1 columns", 2, params.mNumColumns);
@@ -192,6 +206,7 @@
     }
 
     // |___ ___ <1> [2]
+    @Test
     public void testLayout2KeyMax5L2() {
         MoreKeysKeyboardParams params = createParams(2, 5, XPOS_L2);
         assertEquals("2 key max 5 L2 columns", 2, params.mNumColumns);
@@ -205,6 +220,7 @@
     }
 
     // [2] <1>|
+    @Test
     public void testLayout2KeyMax5R0() {
         MoreKeysKeyboardParams params = createParams(2, 5, XPOS_R0);
         assertEquals("2 key max 5 R0 columns", 2, params.mNumColumns);
@@ -218,6 +234,7 @@
     }
 
     // [2] <1> ___|
+    @Test
     public void testLayout2KeyMax5R1() {
         MoreKeysKeyboardParams params = createParams(2, 5, XPOS_R1);
         assertEquals("2 key max 5 R1 columns", 2, params.mNumColumns);
@@ -231,6 +248,7 @@
     }
 
     // <1> [2] ___|
+    @Test
     public void testLayout2KeyMax5R2() {
         MoreKeysKeyboardParams params = createParams(2, 5, XPOS_R2);
         assertEquals("2 key max 5 R2 columns", 2, params.mNumColumns);
@@ -244,6 +262,7 @@
     }
 
     // [3] <1> [2]
+    @Test
     public void testLayout3KeyMax5M0() {
         MoreKeysKeyboardParams params = createParams(3, 5, XPOS_M0);
         assertEquals("3 key max 5 M0 columns", 3, params.mNumColumns);
@@ -258,6 +277,7 @@
     }
 
     // |<1> [2] [3]
+    @Test
     public void testLayout3KeyMax5L0() {
         MoreKeysKeyboardParams params = createParams(3, 5, XPOS_L0);
         assertEquals("3 key max 5 L0 columns", 3, params.mNumColumns);
@@ -272,6 +292,7 @@
     }
 
     // |___ <1> [2] [3]
+    @Test
     public void testLayout3KeyMax5L1() {
         MoreKeysKeyboardParams params = createParams(3, 5, XPOS_L1);
         assertEquals("3 key max 5 L1 columns", 3, params.mNumColumns);
@@ -286,6 +307,7 @@
     }
 
     // |___ [3] <1> [2]
+    @Test
     public void testLayout3KeyMax5L2() {
         MoreKeysKeyboardParams params = createParams(3, 5, XPOS_L2);
         assertEquals("3 key max 5 L2 columns", 3, params.mNumColumns);
@@ -300,6 +322,7 @@
     }
 
     // [3] [2] <1>|
+    @Test
     public void testLayout3KeyMax5R0() {
         MoreKeysKeyboardParams params = createParams(3, 5, XPOS_R0);
         assertEquals("3 key max 5 R0 columns", 3, params.mNumColumns);
@@ -314,6 +337,7 @@
     }
 
     // [3] [2] <1> ___|
+    @Test
     public void testLayout3KeyMax5R1() {
         MoreKeysKeyboardParams params = createParams(3, 5, XPOS_R1);
         assertEquals("3 key max 5 R1 columns", 3, params.mNumColumns);
@@ -328,6 +352,7 @@
     }
 
     // [3] <1> [2] ___|
+    @Test
     public void testLayout3KeyMax5R2() {
         MoreKeysKeyboardParams params = createParams(3, 5, XPOS_R2);
         assertEquals("3 key max 5 R2 columns", 3, params.mNumColumns);
@@ -343,6 +368,7 @@
 
     // [3]
     // <1> [2]
+    @Test
     public void testLayout3KeyMax2M0() {
         MoreKeysKeyboardParams params = createParams(3, 2, XPOS_M0);
         assertEquals("3 key max 2 M0 columns", 2, params.mNumColumns);
@@ -358,6 +384,7 @@
 
     // |[3]
     // |<1> [2]
+    @Test
     public void testLayout3KeyMax2L0() {
         MoreKeysKeyboardParams params = createParams(3, 2, XPOS_L0);
         assertEquals("3 key max 2 L0 columns", 2, params.mNumColumns);
@@ -373,6 +400,7 @@
 
     // |___ [3]
     // |___ <1> [2]
+    @Test
     public void testLayout3KeyMax2L1() {
         MoreKeysKeyboardParams params = createParams(3, 2, XPOS_L1);
         assertEquals("3 key max 2 L1 columns", 2, params.mNumColumns);
@@ -388,6 +416,7 @@
 
     // |        [3]
     // |___ ___ <1> [2]
+    @Test
     public void testLayout3KeyMax2L2() {
         MoreKeysKeyboardParams params = createParams(3, 2, XPOS_L2);
         assertEquals("3 key max 2 L2 columns", 2, params.mNumColumns);
@@ -403,6 +432,7 @@
 
     //     [3]|
     // [2] <1>|
+    @Test
     public void testLayout3KeyMax2R0() {
         MoreKeysKeyboardParams params = createParams(3, 2, XPOS_R0);
         assertEquals("3 key max 2 R0 columns", 2, params.mNumColumns);
@@ -418,6 +448,7 @@
 
     //     [3]    |
     // [2] <1> ___|
+    @Test
     public void testLayout3KeyMax2R1() {
         MoreKeysKeyboardParams params = createParams(3, 2, XPOS_R1);
         assertEquals("3 key max 2 R1 columns", 2, params.mNumColumns);
@@ -433,6 +464,7 @@
 
     // [3]        |
     // <1> [2] ___|
+    @Test
     public void testLayout3KeyMax2R2() {
         MoreKeysKeyboardParams params = createParams(3, 2, XPOS_R2);
         assertEquals("3 key max 2 R2 columns", 2, params.mNumColumns);
@@ -448,6 +480,7 @@
 
     // [3] [4]
     // <1> [2]
+    @Test
     public void testLayout4KeyMax3M0() {
         MoreKeysKeyboardParams params = createParams(4, 3, XPOS_M0);
         assertEquals("4 key max 3 M0 columns", 2, params.mNumColumns);
@@ -464,6 +497,7 @@
 
     // |[3] [4]
     // |<1> [2]
+    @Test
     public void testLayout4KeyMax3L0() {
         MoreKeysKeyboardParams params = createParams(4, 3, XPOS_L0);
         assertEquals("4 key max 3 L0 columns", 2, params.mNumColumns);
@@ -480,6 +514,7 @@
 
     // |___ [3] [4]
     // |___ <1> [2]
+    @Test
     public void testLayout4KeyMax3L1() {
         MoreKeysKeyboardParams params = createParams(4, 3, XPOS_L1);
         assertEquals("4 key max 3 L1 columns", 2, params.mNumColumns);
@@ -496,6 +531,7 @@
 
     // |___ ___ [3] [4]
     // |___ ___ <1> [2]
+    @Test
     public void testLayout4KeyMax3L2() {
         MoreKeysKeyboardParams params = createParams(4, 3, XPOS_L2);
         assertEquals("4 key max 3 L2 columns", 2, params.mNumColumns);
@@ -512,6 +548,7 @@
 
     // [4] [3]|
     // [2] <1>|
+    @Test
     public void testLayout4KeyMax3R0() {
         MoreKeysKeyboardParams params = createParams(4, 3, XPOS_R0);
         assertEquals("4 key max 3 R0 columns", 2, params.mNumColumns);
@@ -528,6 +565,7 @@
 
     // [4] [3] ___|
     // [2] <1> ___|
+    @Test
     public void testLayout4KeyMax3R1() {
         MoreKeysKeyboardParams params = createParams(4, 3, XPOS_R1);
         assertEquals("4 key max 3 R1 columns", 2, params.mNumColumns);
@@ -544,6 +582,7 @@
 
     // [3] [4] ___|
     // <1> [2] ___|
+    @Test
     public void testLayout4KeyMax3R2() {
         MoreKeysKeyboardParams params = createParams(4, 3, XPOS_R2);
         assertEquals("4 key max 3 R2 columns", 2, params.mNumColumns);
@@ -559,6 +598,7 @@
     }
 
     // [3] <1> [2] [4]
+    @Test
     public void testLayout4KeyMax4M0() {
         MoreKeysKeyboardParams params = createParams(4, 4, XPOS_M0);
         assertEquals("4 key max 4 M0 columns", 4, params.mNumColumns);
@@ -574,6 +614,7 @@
     }
 
     // |<1> [2] [3] [4]
+    @Test
     public void testLayout4KeyMax4L0() {
         MoreKeysKeyboardParams params = createParams(4, 4, XPOS_L0);
         assertEquals("4 key max 4 L0 columns", 4, params.mNumColumns);
@@ -589,6 +630,7 @@
     }
 
     // |___ <1> [2] [3] [4]
+    @Test
     public void testLayout4KeyMax4L1() {
         MoreKeysKeyboardParams params = createParams(4, 4, XPOS_L1);
         assertEquals("4 key max 4 L1 columns", 4, params.mNumColumns);
@@ -604,6 +646,7 @@
     }
 
     // |___ [3] <1> [2] [4]
+    @Test
     public void testLayout4KeyMax4L2() {
         MoreKeysKeyboardParams params = createParams(4, 4, XPOS_L2);
         assertEquals("4 key max 4 L2 columns", 4, params.mNumColumns);
@@ -619,6 +662,7 @@
     }
 
     // [4] [3] [2] <1>|
+    @Test
     public void testLayout4KeyMax4R0() {
         MoreKeysKeyboardParams params = createParams(4, 4, XPOS_R0);
         assertEquals("4 key max 4 R0 columns", 4, params.mNumColumns);
@@ -634,6 +678,7 @@
     }
 
     // [4] [3] [2] <1> ___|
+    @Test
     public void testLayout4KeyMax4R1() {
         MoreKeysKeyboardParams params = createParams(4, 4, XPOS_R1);
         assertEquals("4 key max 4 R1 columns", 4, params.mNumColumns);
@@ -649,6 +694,7 @@
     }
 
     // [4] [3] <1> [2] ___|
+    @Test
     public void testLayout4KeyMax4R2() {
         MoreKeysKeyboardParams params = createParams(4, 4, XPOS_R2);
         assertEquals("4 key max 4 R2 columns", 4, params.mNumColumns);
@@ -664,6 +710,7 @@
     }
 
     // [3] <1> [2] [4]
+    @Test
     public void testLayout4KeyMax5M0() {
         MoreKeysKeyboardParams params = createParams(4, 5, XPOS_M0);
         assertEquals("4 key max 5 M0 columns", 4, params.mNumColumns);
@@ -679,6 +726,7 @@
     }
 
     // |<1> [2] [3] [4]
+    @Test
     public void testLayout4KeyMax5L0() {
         MoreKeysKeyboardParams params = createParams(4, 5, XPOS_L0);
         assertEquals("4 key max 5 L0 columns", 4, params.mNumColumns);
@@ -694,6 +742,7 @@
     }
 
     // |___ <1> [2] [3] [4]
+    @Test
     public void testLayout4KeyMax5L1() {
         MoreKeysKeyboardParams params = createParams(4, 5, XPOS_L1);
         assertEquals("4 key max 5 L1 columns", 4, params.mNumColumns);
@@ -709,6 +758,7 @@
     }
 
     // |___ [3] <1> [2] [4]
+    @Test
     public void testLayout4KeyMax5L2() {
         MoreKeysKeyboardParams params = createParams(4, 5, XPOS_L2);
         assertEquals("4 key max 5 L2 columns", 4, params.mNumColumns);
@@ -724,6 +774,7 @@
     }
 
     // [4] [3] [2] <1>|
+    @Test
     public void testLayout4KeyMax5R0() {
         MoreKeysKeyboardParams params = createParams(4, 5, XPOS_R0);
         assertEquals("4 key max 5 R0 columns", 4, params.mNumColumns);
@@ -739,6 +790,7 @@
     }
 
     // [4] [3] [2] <1> ___|
+    @Test
     public void testLayout4KeyMax5R1() {
         MoreKeysKeyboardParams params = createParams(4, 5, XPOS_R1);
         assertEquals("4 key max 5 R1 columns", 4, params.mNumColumns);
@@ -754,6 +806,7 @@
     }
 
     // [4] [3] <1> [2] ___|
+    @Test
     public void testLayout4KeyMax5R2() {
         MoreKeysKeyboardParams params = createParams(4, 5, XPOS_R2);
         assertEquals("4 key max 5 R2 columns", 4, params.mNumColumns);
@@ -770,6 +823,7 @@
 
     //   [4] [5]
     // [3] <1> [2]
+    @Test
     public void testLayout5KeyMax3M0() {
         MoreKeysKeyboardParams params = createParams(5, 3, XPOS_M0);
         assertEquals("5 key max 3 M0 columns", 3, params.mNumColumns);
@@ -787,6 +841,7 @@
 
     // |[4] [5]
     // |<1> [2] [3]
+    @Test
     public void testLayout5KeyMax3L0() {
         MoreKeysKeyboardParams params = createParams(5, 3, XPOS_L0);
         assertEquals("5 key max 3 L0 columns", 3, params.mNumColumns);
@@ -804,6 +859,7 @@
 
     // |___ [4] [5]
     // |___ <1> [2] [3]
+    @Test
     public void testLayout5KeyMax3L1() {
         MoreKeysKeyboardParams params = createParams(5, 3, XPOS_L1);
         assertEquals("5 key max 3 L1 columns", 3, params.mNumColumns);
@@ -821,6 +877,7 @@
 
     // |___   [4] [5]
     // |___ [3] <1> [2]
+    @Test
     public void testLayout5KeyMax3L2() {
         MoreKeysKeyboardParams params = createParams(5, 3, XPOS_L2);
         assertEquals("5 key max 3 L2 columns", 3, params.mNumColumns);
@@ -838,6 +895,7 @@
 
     //     [5] [4]|
     // [3] [2] <1>|
+    @Test
     public void testLayout5KeyMax3R0() {
         MoreKeysKeyboardParams params = createParams(5, 3, XPOS_R0);
         assertEquals("5 key max 3 R0 columns", 3, params.mNumColumns);
@@ -855,6 +913,7 @@
 
     //     [5] [4] ___|
     // [3] [2] <1> ___|
+    @Test
     public void testLayout5KeyMax3R1() {
         MoreKeysKeyboardParams params = createParams(5, 3, XPOS_R1);
         assertEquals("5 key max 3 R1 columns", 3, params.mNumColumns);
@@ -872,6 +931,7 @@
 
     //   [4] [5]   ___|
     // [3] <1> [2] ___|
+    @Test
     public void testLayout5KeyMax3R2() {
         MoreKeysKeyboardParams params = createParams(5, 3, XPOS_R2);
         assertEquals("5 key max 3 R2 columns", 3, params.mNumColumns);
@@ -889,6 +949,7 @@
 
     //   [4] [5]
     // [3] <1> [2]
+    @Test
     public void testLayout5KeyMax4M0() {
         MoreKeysKeyboardParams params = createParams(5, 4, XPOS_M0);
         assertEquals("5 key max 4 M0 columns", 3, params.mNumColumns);
@@ -906,6 +967,7 @@
 
     // |[4] [5]
     // |<1> [2] [3]
+    @Test
     public void testLayout5KeyMax4L0() {
         MoreKeysKeyboardParams params = createParams(5, 4, XPOS_L0);
         assertEquals("5 key max 4 L0 columns", 3, params.mNumColumns);
@@ -923,6 +985,7 @@
 
     // |___ [4] [5]
     // |___ <1> [2] [3]
+    @Test
     public void testLayout5KeyMax4L1() {
         MoreKeysKeyboardParams params = createParams(5, 4, XPOS_L1);
         assertEquals("5 key max 4 L1 columns", 3, params.mNumColumns);
@@ -940,6 +1003,7 @@
 
     // |___   [4] [5]
     // |___ [3] <1> [2]
+    @Test
     public void testLayout5KeyMax4L2() {
         MoreKeysKeyboardParams params = createParams(5, 4, XPOS_L2);
         assertEquals("5 key max 4 L2 columns", 3, params.mNumColumns);
@@ -957,6 +1021,7 @@
 
     //     [5] [4]|
     // [3] [2] <1>|
+    @Test
     public void testLayout5KeyMax4R0() {
         MoreKeysKeyboardParams params = createParams(5, 4, XPOS_R0);
         assertEquals("5 key max 4 R0 columns", 3, params.mNumColumns);
@@ -974,6 +1039,7 @@
 
     //     [5] [4] ___|
     // [3] [2] <1> ___|
+    @Test
     public void testLayout5KeyMax4R1() {
         MoreKeysKeyboardParams params = createParams(5, 4, XPOS_R1);
         assertEquals("5 key max 4 R1 columns", 3, params.mNumColumns);
@@ -991,6 +1057,7 @@
 
     //   [4] [5]   ___|
     // [3] <1> [2] ___|
+    @Test
     public void testLayout5KeyMax4R2() {
         MoreKeysKeyboardParams params = createParams(5, 4, XPOS_R2);
         assertEquals("5 key max 4 R2 columns", 3, params.mNumColumns);
@@ -1007,6 +1074,7 @@
     }
 
     // [5] [3] <1> [2] [4]
+    @Test
     public void testLayout5KeyMax5M0() {
         MoreKeysKeyboardParams params = createParams(5, 5, XPOS_M0);
         assertEquals("5 key max 5 M0 columns", 5, params.mNumColumns);
@@ -1023,6 +1091,7 @@
     }
 
     // |<1> [2] [3] [4] [5]
+    @Test
     public void testLayout5KeyMax5L0() {
         MoreKeysKeyboardParams params = createParams(5, 5, XPOS_L0);
         assertEquals("5 key max 5 L0 columns", 5, params.mNumColumns);
@@ -1039,6 +1108,7 @@
     }
 
     // |___ <1> [2] [3] [4] [5]
+    @Test
     public void testLayout5KeyMax5L1() {
         MoreKeysKeyboardParams params = createParams(5, 5, XPOS_L1);
         assertEquals("5 key max 5 L1 columns", 5, params.mNumColumns);
@@ -1055,6 +1125,7 @@
     }
 
     // |___ [3] <1> [2] [4] [5]
+    @Test
     public void testLayout5KeyMax5L2() {
         MoreKeysKeyboardParams params = createParams(5, 5, XPOS_L2);
         assertEquals("5 key max 5 L2 columns", 5, params.mNumColumns);
@@ -1071,6 +1142,7 @@
     }
 
     // [5] [4] [3] [2] <1>|
+    @Test
     public void testLayout5KeyMax5R0() {
         MoreKeysKeyboardParams params = createParams(5, 5, XPOS_R0);
         assertEquals("5 key max 5 R0 columns", 5, params.mNumColumns);
@@ -1087,6 +1159,7 @@
     }
 
     // [5] [4] [3] [2] <1> ___|
+    @Test
     public void testLayout5KeyMax5R1() {
         MoreKeysKeyboardParams params = createParams(5, 5, XPOS_R1);
         assertEquals("5 key max 5 R1 columns", 5, params.mNumColumns);
@@ -1103,6 +1176,7 @@
     }
 
     // [5] [4] [3] <1> [2] ___|
+    @Test
     public void testLayout5KeyMax5R2() {
         MoreKeysKeyboardParams params = createParams(5, 5, XPOS_R2);
         assertEquals("5 key max 5 R2 columns", 5, params.mNumColumns);
@@ -1120,6 +1194,7 @@
 
     // [6] [4] [5]
     // [3] <1> [2]
+    @Test
     public void testLayout6KeyMax4M0() {
         MoreKeysKeyboardParams params = createParams(6, 4, XPOS_M0);
         assertEquals("6 key max 4 M0 columns", 3, params.mNumColumns);
@@ -1138,6 +1213,7 @@
 
     // |[4] [5] [6]
     // |<1> [2] [3]
+    @Test
     public void testLayout6KeyMax4L0() {
         MoreKeysKeyboardParams params = createParams(6, 4, XPOS_L0);
         assertEquals("6 key max 4 L0 columns", 3, params.mNumColumns);
@@ -1156,6 +1232,7 @@
 
     // |___ [4] [5] [6]
     // |___ <1> [2] [3]
+    @Test
     public void testLayout6KeyMax4L1() {
         MoreKeysKeyboardParams params = createParams(6, 4, XPOS_L1);
         assertEquals("6 key max 4 L1 columns", 3, params.mNumColumns);
@@ -1174,6 +1251,7 @@
 
     // |___ [6] [4] [5]
     // |___ [3] <1> [2]
+    @Test
     public void testLayout6KeyMax4L2() {
         MoreKeysKeyboardParams params = createParams(6, 4, XPOS_L2);
         assertEquals("6 key max 4 L2 columns", 3, params.mNumColumns);
@@ -1192,6 +1270,7 @@
 
     // [6] [5] [4]|
     // [3] [2] <1>|
+    @Test
     public void testLayout6KeyMax4R0() {
         MoreKeysKeyboardParams params = createParams(6, 4, XPOS_R0);
         assertEquals("6 key max 4 R0 columns", 3, params.mNumColumns);
@@ -1210,6 +1289,7 @@
 
     // [6] [5] [4] ___|
     // [3] [2] <1> ___|
+    @Test
     public void testLayout6KeyMax4R1() {
         MoreKeysKeyboardParams params = createParams(6, 4, XPOS_R1);
         assertEquals("6 key max 4 R1 columns", 3, params.mNumColumns);
@@ -1228,6 +1308,7 @@
 
     // [6] [4] [5] ___|
     // [3] <1> [2] ___|
+    @Test
     public void testLayout6KeyMax4R2() {
         MoreKeysKeyboardParams params = createParams(6, 4, XPOS_R2);
         assertEquals("6 key max 4 R2 columns", 3, params.mNumColumns);
@@ -1246,6 +1327,7 @@
 
     // [6] [4] [5]
     // [3] <1> [2]
+    @Test
     public void testLayout6KeyMax5M0() {
         MoreKeysKeyboardParams params = createParams(6, 5, XPOS_M0);
         assertEquals("6 key max 5 M0 columns", 3, params.mNumColumns);
@@ -1264,6 +1346,7 @@
 
     // |[4] [5] [6]
     // |<1> [2] [3]
+    @Test
     public void testLayout6KeyMax5L0() {
         MoreKeysKeyboardParams params = createParams(6, 5, XPOS_L0);
         assertEquals("6 key max 5 L0 columns", 3, params.mNumColumns);
@@ -1282,6 +1365,7 @@
 
     // |___ [4] [5] [6]
     // |___ <1> [2] [3]
+    @Test
     public void testLayout6KeyMax5L1() {
         MoreKeysKeyboardParams params = createParams(6, 5, XPOS_L1);
         assertEquals("6 key max 5 L1 columns", 3, params.mNumColumns);
@@ -1300,6 +1384,7 @@
 
     // |___ [6] [4] [5]
     // |___ [3] <1> [2]
+    @Test
     public void testLayout6KeyMax5L2() {
         MoreKeysKeyboardParams params = createParams(6, 5, XPOS_L2);
         assertEquals("6 key max 5 L2 columns", 3, params.mNumColumns);
@@ -1318,6 +1403,7 @@
 
     // [6] [5] [4]|
     // [3] [2] <1>|
+    @Test
     public void testLayout6KeyMax5R0() {
         MoreKeysKeyboardParams params = createParams(6, 5, XPOS_R0);
         assertEquals("6 key max 5 R0 columns", 3, params.mNumColumns);
@@ -1336,6 +1422,7 @@
 
     // [6] [5] [4] ___|
     // [3] [2] <1> ___|
+    @Test
     public void testLayout6KeyMax5R1() {
         MoreKeysKeyboardParams params = createParams(6, 5, XPOS_R1);
         assertEquals("6 key max 5 R1 columns", 3, params.mNumColumns);
@@ -1354,6 +1441,7 @@
 
     // [6] [4] [5] ___|
     // [3] <1> [2] ___|
+    @Test
     public void testLayout6KeyMax5R2() {
         MoreKeysKeyboardParams params = createParams(6, 5, XPOS_R2);
         assertEquals("6 key max 5 R2 columns", 3, params.mNumColumns);
@@ -1371,6 +1459,7 @@
     }
 
     // |<1> [2] [3] [4] [5] [6] [7] ___ ___ ___|
+    @Test
     public void testLayout7KeyMax7L0() {
         MoreKeysKeyboardParams params = createParams(7, 7, XPOS_L0);
         assertEquals("7 key max 7 L0 columns", 7, params.mNumColumns);
@@ -1389,6 +1478,7 @@
     }
 
     // |___ <1> [2] [3] [4] [5] [6] [7] ___ ___|
+    @Test
     public void testLayout7KeyMax7L1() {
         MoreKeysKeyboardParams params = createParams(7, 7, XPOS_L1);
         assertEquals("7 key max 7 L1 columns", 7, params.mNumColumns);
@@ -1407,6 +1497,7 @@
     }
 
     // |___ [3] <1> [2] [4] [5] [6] [7] ___ ___|
+    @Test
     public void testLayout7KeyMax7L2() {
         MoreKeysKeyboardParams params = createParams(7, 7, XPOS_L2);
         assertEquals("7 key max 7 L2 columns", 7, params.mNumColumns);
@@ -1425,6 +1516,7 @@
     }
 
     // |___ [5] [3] <1> [2] [4] [6] [7] ___ ___|
+    @Test
     public void testLayout7KeyMax7L3() {
         MoreKeysKeyboardParams params = createParams(7, 7, XPOS_L3);
         assertEquals("7 key max 7 L3 columns", 7, params.mNumColumns);
@@ -1443,6 +1535,7 @@
     }
 
     // |___ [7] [5] [3] <1> [2] [4] [6] ___ ___|
+    @Test
     public void testLayout7KeyMax7M0() {
         MoreKeysKeyboardParams params = createParams(7, 7, XPOS_M0);
         assertEquals("7 key max 7 M0 columns", 7, params.mNumColumns);
@@ -1461,6 +1554,7 @@
     }
 
     // |___ ___ [7] [5] [3] <1> [2] [4] [6] ___|
+    @Test
     public void testLayout7KeyMax7M1() {
         MoreKeysKeyboardParams params = createParams(7, 7, XPOS_M1);
         assertEquals("7 key max 7 M1 columns", 7, params.mNumColumns);
@@ -1479,6 +1573,7 @@
     }
 
     // |___ ___ [7] [6] [5] [3] <1> [2] [4] ___|
+    @Test
     public void testLayout7KeyMax7R3() {
         MoreKeysKeyboardParams params = createParams(7, 7, XPOS_R3);
         assertEquals("7 key max 7 R3 columns", 7, params.mNumColumns);
@@ -1497,6 +1592,7 @@
     }
 
     // |___ ___ [7] [6] [5] [4] [3] <1> [2] ___|
+    @Test
     public void testLayout7KeyMax7R2() {
         MoreKeysKeyboardParams params = createParams(7, 7, XPOS_R2);
         assertEquals("7 key max 7 R2 columns", 7, params.mNumColumns);
@@ -1515,6 +1611,7 @@
     }
 
     // |___ ___ [7] [6] [5] [4] [3] [2] <1> ___|
+    @Test
     public void testLayout7KeyMax7R1() {
         MoreKeysKeyboardParams params = createParams(7, 7, XPOS_R1);
         assertEquals("7 key max 7 R1 columns", 7, params.mNumColumns);
@@ -1533,6 +1630,7 @@
     }
 
     // |___ ___ [7] [6] [5] [4] [3] [2] <1>|
+    @Test
     public void testLayout7KeyMax7R0() {
         MoreKeysKeyboardParams params = createParams(7, 7, XPOS_R0);
         assertEquals("7 key max 7 R0 columns", 7, params.mNumColumns);
@@ -1552,6 +1650,7 @@
 
     //   [5] [6] [7]
     // [3] <1> [2] [4]
+    @Test
     public void testLayout7KeyMax5M0() {
         MoreKeysKeyboardParams params = createParams(7, 5, XPOS_M0);
         assertEquals("7 key max 5 M0 columns", 4, params.mNumColumns);
@@ -1571,6 +1670,7 @@
 
     // |[5] [6] [7]
     // |<1> [2] [3] [4]
+    @Test
     public void testLayout7KeyMax5L0() {
         MoreKeysKeyboardParams params = createParams(7, 5, XPOS_L0);
         assertEquals("7 key max 5 L0 columns", 4, params.mNumColumns);
@@ -1590,6 +1690,7 @@
 
     // |___ [5] [6] [7]
     // |___ <1> [2] [3] [4]
+    @Test
     public void testLayout7KeyMax5L1() {
         MoreKeysKeyboardParams params = createParams(7, 5, XPOS_L1);
         assertEquals("7 key max 5 L1 columns", 4, params.mNumColumns);
@@ -1609,6 +1710,7 @@
 
     // |___   [5] [6] [7]
     // |___ [3] <1> [2] [4]
+    @Test
     public void testLayout7KeyMax5L2() {
         MoreKeysKeyboardParams params = createParams(7, 5, XPOS_L2);
         assertEquals("7 key max 5 L2 columns", 4, params.mNumColumns);
@@ -1628,6 +1730,7 @@
 
     //     [7] [6] [5]|
     // [4] [3] [2] <1>|
+    @Test
     public void testLayout7KeyMax5R0() {
         MoreKeysKeyboardParams params = createParams(7, 5, XPOS_R0);
         assertEquals("7 key max 5 R0 columns", 4, params.mNumColumns);
@@ -1647,6 +1750,7 @@
 
     //     [7] [6] [5] ___|
     // [4] [3] [2] <1> ___|
+    @Test
     public void testLayout7KeyMax5R1() {
         MoreKeysKeyboardParams params = createParams(7, 5, XPOS_R1);
         assertEquals("7 key max 5 R1 columns", 4, params.mNumColumns);
@@ -1666,6 +1770,7 @@
 
     //   [7] [5] [6]   ___|
     // [4] [3] <1> [2] ___|
+    @Test
     public void testLayout7KeyMax5R2() {
         MoreKeysKeyboardParams params = createParams(7, 5, XPOS_R2);
         assertEquals("7 key max 5 R2 columns", 4, params.mNumColumns);
@@ -1686,6 +1791,7 @@
     //     [7]
     // [6] [4] [5]
     // [3] <1> [2]
+    @Test
     public void testLayout7KeyMax3M0() {
         MoreKeysKeyboardParams params = createParams(7, 3, XPOS_M0);
         assertEquals("7 key max 3 M0 columns", 3, params.mNumColumns);
@@ -1706,6 +1812,7 @@
     // |[7]
     // |[4] [5] [6]
     // |<1> [2] [3]
+    @Test
     public void testLayout7KeyMax3L0() {
         MoreKeysKeyboardParams params = createParams(7, 3, XPOS_L0);
         assertEquals("7 key max 3 L0 columns", 3, params.mNumColumns);
@@ -1726,6 +1833,7 @@
     // |___ [7]
     // |___ [4] [5] [6]
     // |___ <1> [2] [3]
+    @Test
     public void testLayout7KeyMax3L1() {
         MoreKeysKeyboardParams params = createParams(7, 3, XPOS_L1);
         assertEquals("7 key max 3 L1 columns", 3, params.mNumColumns);
@@ -1746,6 +1854,7 @@
     // |___     [7]
     // |___ [6] [4] [5]
     // |___ [3] <1> [2]
+    @Test
     public void testLayout7KeyMax3L2() {
         MoreKeysKeyboardParams params = createParams(7, 3, XPOS_L2);
         assertEquals("7 key max 3 L2 columns", 3, params.mNumColumns);
@@ -1766,6 +1875,7 @@
     //         [7]|
     // [6] [5] [4]|
     // [3] [2] <1>|
+    @Test
     public void testLayout7KeyMax3R0() {
         MoreKeysKeyboardParams params = createParams(7, 3, XPOS_R0);
         assertEquals("7 key max 3 R0 columns", 3, params.mNumColumns);
@@ -1786,6 +1896,7 @@
     //         [7] ___|
     // [6] [5] [4] ___|
     // [3] [2] <1> ___|
+    @Test
     public void testLayout7KeyMax3R1() {
         MoreKeysKeyboardParams params = createParams(7, 3, XPOS_R1);
         assertEquals("7 key max 3 R1 columns", 3, params.mNumColumns);
@@ -1806,6 +1917,7 @@
     //     [7]     ___|
     // [6] [4] [5] ___|
     // [3] <1> [2] ___|
+    @Test
     public void testLayout7KeyMax3R2() {
         MoreKeysKeyboardParams params = createParams(7, 3, XPOS_R2);
         assertEquals("7 key max 3 R2 columns", 3, params.mNumColumns);
@@ -1825,6 +1937,7 @@
 
     // [7] [5] [6] [8]
     // [3] <1> [2] [4]
+    @Test
     public void testLayout8KeyMax5M0() {
         MoreKeysKeyboardParams params = createParams(8, 5, XPOS_M0);
         assertEquals("8 key max 5 M0 columns", 4, params.mNumColumns);
@@ -1845,6 +1958,7 @@
 
     // |[5] [6] [7] [8]
     // |<1> [2] [3] [4]
+    @Test
     public void testLayout8KeyMax5L0() {
         MoreKeysKeyboardParams params = createParams(8, 5, XPOS_L0);
         assertEquals("8 key max 5 L0 columns", 4, params.mNumColumns);
@@ -1865,6 +1979,7 @@
 
     // |___ [5] [6] [7] [8]
     // |___ <1> [2] [3] [4]
+    @Test
     public void testLayout8KeyMax5L1() {
         MoreKeysKeyboardParams params = createParams(8, 5, XPOS_L1);
         assertEquals("8 key max 5 L1 columns", 4, params.mNumColumns);
@@ -1885,6 +2000,7 @@
 
     // |___ [7] [5] [6] [8]
     // |___ [3] <1> [2] [4]
+    @Test
     public void testLayout8KeyMax5L2() {
         MoreKeysKeyboardParams params = createParams(8, 5, XPOS_L2);
         assertEquals("8 key max 5 L2 columns", 4, params.mNumColumns);
@@ -1905,6 +2021,7 @@
 
     // [8] [7] [6] [5]|
     // [4] [3] [2] <1>|
+    @Test
     public void testLayout8KeyMax5R0() {
         MoreKeysKeyboardParams params = createParams(8, 5, XPOS_R0);
         assertEquals("8 key max 5 R0 columns", 4, params.mNumColumns);
@@ -1925,6 +2042,7 @@
 
     // [8] [7] [6] [5] ___|
     // [4] [3] [2] <1> ___|
+    @Test
     public void testLayout8KeyMax5R1() {
         MoreKeysKeyboardParams params = createParams(8, 5, XPOS_R1);
         assertEquals("8 key max 5 R1 columns", 4, params.mNumColumns);
@@ -1945,6 +2063,7 @@
 
     // [8] [7] [5] [6] ___|
     // [4] [3] <1> [2] ___|
+    @Test
     public void testLayout8KeyMax5R2() {
         MoreKeysKeyboardParams params = createParams(8, 5, XPOS_R2);
         assertEquals("8 key max 5 R2 columns", 4, params.mNumColumns);
@@ -1965,6 +2084,7 @@
 
     //   [8] [6] [7] [9]
     // [5] [3] <1> [2] [4]
+    @Test
     public void testLayout9KeyMax5M0() {
         MoreKeysKeyboardParams params = createParams(9, 5, XPOS_M0);
         assertEquals("9 key max 5 M0 columns", 5, params.mNumColumns);
@@ -1986,6 +2106,7 @@
 
     // |[6] [7] [8] [9]
     // |<1> [2] [3] [4] [5]
+    @Test
     public void testLayout9KeyMax5L0() {
         MoreKeysKeyboardParams params = createParams(9, 5, XPOS_L0);
         assertEquals("9 key max 5 L0 columns", 5, params.mNumColumns);
@@ -2007,6 +2128,7 @@
 
     // |___ [6] [7] [8] [9]
     // |___ <1> [2] [3] [4] [5]
+    @Test
     public void testLayout9KeyMax5L1() {
         MoreKeysKeyboardParams params = createParams(9, 5, XPOS_L1);
         assertEquals("9 key max 5 L1 columns", 5, params.mNumColumns);
@@ -2028,6 +2150,7 @@
 
     // |___   [6] [7] [8] [9]
     // |___ [3] <1> [2] [4] [5]
+    @Test
     public void testLayout9KeyMax5L2() {
         MoreKeysKeyboardParams params = createParams(9, 5, XPOS_L2);
         assertEquals("9 key max 5 L2 columns", 5, params.mNumColumns);
@@ -2049,6 +2172,7 @@
 
     //     [9] [8] [7] [6]|
     // [5] [4] [3] [2] <1>|
+    @Test
     public void testLayout9KeyMax5R0() {
         MoreKeysKeyboardParams params = createParams(9, 5, XPOS_R0);
         assertEquals("9 key max 5 R0 columns", 5, params.mNumColumns);
@@ -2070,6 +2194,7 @@
 
     //     [9] [8] [7] [6] ___|
     // [5] [4] [3] [2] <1> ___|
+    @Test
     public void testLayout9KeyMax5R1() {
         MoreKeysKeyboardParams params = createParams(9, 5, XPOS_R1);
         assertEquals("9 key max 5 R1 columns", 5, params.mNumColumns);
@@ -2091,6 +2216,7 @@
 
     //   [9] [8] [6] [7]   ___|
     // [5] [4] [3] <1> [2] ___|
+    @Test
     public void testLayout9KeyMax5R2() {
         MoreKeysKeyboardParams params = createParams(9, 5, XPOS_R2);
         assertEquals("9 key max 5 R2 columns", 5, params.mNumColumns);
@@ -2112,6 +2238,7 @@
 
     // [A] [8] [6] [7] [9]
     // [5] [3] <1> [2] [4]
+    @Test
     public void testLayout10KeyMax5M0() {
         MoreKeysKeyboardParams params = createParams(10, 5, XPOS_M0);
         assertEquals("10 key max 5 M0 columns", 5, params.mNumColumns);
@@ -2134,6 +2261,7 @@
 
     // |[6] [7] [8] [9] [A]
     // |<1> [2] [3] [4] [5]
+    @Test
     public void testLayout10KeyMax5L0() {
         MoreKeysKeyboardParams params = createParams(10, 5, XPOS_L0);
         assertEquals("10 key max 5 L0 columns", 5, params.mNumColumns);
@@ -2156,6 +2284,7 @@
 
     // |___ [6] [7] [8] [9] [A]
     // |___ <1> [2] [3] [4] [5]
+    @Test
     public void testLayout10KeyMax5L1() {
         MoreKeysKeyboardParams params = createParams(10, 5, XPOS_L1);
         assertEquals("10 key max 5 L1 columns", 5, params.mNumColumns);
@@ -2178,6 +2307,7 @@
 
     // |___ [8] [6] [7] [9] [A]
     // |___ [3] <1> [2] [4] [5]
+    @Test
     public void testLayout10KeyMax5L2() {
         MoreKeysKeyboardParams params = createParams(10, 5, XPOS_L2);
         assertEquals("10 key max 5 L2 columns", 5, params.mNumColumns);
@@ -2200,6 +2330,7 @@
 
     // [A] [9] [8] [7] [6]|
     // [5] [4] [3] [2] <1>|
+    @Test
     public void testLayout10KeyMax5R0() {
         MoreKeysKeyboardParams params = createParams(10, 5, XPOS_R0);
         assertEquals("10 key max 5 R0 columns", 5, params.mNumColumns);
@@ -2222,6 +2353,7 @@
 
     // [A] [9] [8] [7] [6] ___|
     // [5] [4] [3] [2] <1> ___|
+    @Test
     public void testLayout10KeyMax5R1() {
         MoreKeysKeyboardParams params = createParams(10, 5, XPOS_R1);
         assertEquals("10 key max 5 R1 columns", 5, params.mNumColumns);
@@ -2244,6 +2376,7 @@
 
     // [A] [9] [8] [6] [7] ___|
     // [5] [4] [3] <1> [2] ___|
+    @Test
     public void testLayout10KeyMax5R2() {
         MoreKeysKeyboardParams params = createParams(10, 5, XPOS_R2);
         assertEquals("10 key max 5 R2 columns", 5, params.mNumColumns);
@@ -2267,6 +2400,7 @@
     //   [9] [A] [B]
     // [7] [5] [6] [8]
     // [3] <1> [2] [4]
+    @Test
     public void testLayout11KeyMax5M0() {
         MoreKeysKeyboardParams params = createParams(11, 5, XPOS_M0);
         assertEquals("11 key max 5 M0 columns", 4, params.mNumColumns);
@@ -2291,6 +2425,7 @@
     // [B] [9] [A] [C]
     // [7] [5] [6] [8]
     // [3] <1> [2] [4]
+    @Test
     public void testLayout12KeyMax5M0() {
         MoreKeysKeyboardParams params = createParams(12, 5, XPOS_M0);
         assertEquals("12 key max 5 M0 columns", 4, params.mNumColumns);
@@ -2316,6 +2451,7 @@
     //     [D] [B] [C]
     // [A] [8] [6] [7] [9]
     // [5] [3] <1> [2] [4]
+    @Test
     public void testLayout13KeyMax5M0() {
         MoreKeysKeyboardParams params = createParams(13, 5, XPOS_M0);
         assertEquals("13 key max 5 M0 columns", 5, params.mNumColumns);
@@ -2342,6 +2478,7 @@
     //   [D] [B] [C] [E]
     // [A] [8] [6] [7] [9]
     // [5] [3] <1> [2] [4]
+    @Test
     public void testLayout14KeyMax5M0() {
         MoreKeysKeyboardParams params = createParams(14, 5, XPOS_M0);
         assertEquals("13 key max 5 M0 columns", 5, params.mNumColumns);
diff --git a/tests/src/com/android/inputmethod/keyboard/internal/HermiteInterpolatorTests.java b/tests/src/com/android/inputmethod/keyboard/internal/HermiteInterpolatorTests.java
index 3ff5aa4..a1ee199 100644
--- a/tests/src/com/android/inputmethod/keyboard/internal/HermiteInterpolatorTests.java
+++ b/tests/src/com/android/inputmethod/keyboard/internal/HermiteInterpolatorTests.java
@@ -16,25 +16,20 @@
 
 package com.android.inputmethod.keyboard.internal;
 
-import android.test.AndroidTestCase;
-import android.test.suitebuilder.annotation.SmallTest;
+import static org.junit.Assert.assertEquals;
+
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
 
 @SmallTest
-public class HermiteInterpolatorTests extends AndroidTestCase {
+@RunWith(AndroidJUnit4.class)
+public class HermiteInterpolatorTests {
     private final HermiteInterpolator mInterpolator = new HermiteInterpolator();
 
-    @Override
-    protected void setUp() throws Exception {
-        super.setUp();
-    }
-
-    private static final float EPSLION = 0.0000005f;
-
-    private static void assertFloatEquals(final String message, float expected, float actual) {
-        if (Math.abs(expected - actual) >= EPSLION) {
-            fail(String.format("%s expected:<%s> but was:<%s>", message, expected, actual));
-        }
-    }
+    private static final float EPSILON = 0.0000005f;
 
     // t=0 p0=(0,1)
     // t=1 p1=(1,0)
@@ -57,6 +52,7 @@
     private static final int p2 = 2;
     private static final int p3 = 3;
 
+    @Test
     public void testP0P1() {
         // [(p0 p1) p2 p3]
         mInterpolator.reset(mXCoords, mYCoords, p0, p3 + 1);
@@ -66,33 +62,34 @@
         assertEquals("p1x", mXCoords[p1], mInterpolator.mP2X);
         assertEquals("p1y", mYCoords[p1], mInterpolator.mP2Y);
         // XY-slope at p0=3.0 (-0.75/-0.25)
-        assertFloatEquals("slope x p0", -0.25f, mInterpolator.mSlope1X);
-        assertFloatEquals("slope y p0", -0.75f, mInterpolator.mSlope1Y);
+        assertEquals("slope x p0", -0.25f, mInterpolator.mSlope1X, EPSILON);
+        assertEquals("slope y p0", -0.75f, mInterpolator.mSlope1Y, EPSILON);
         // XY-slope at p1=1/3.0 (0.50/1.50)
-        assertFloatEquals("slope x p1",  1.50f, mInterpolator.mSlope2X);
-        assertFloatEquals("slope y p1",  0.50f, mInterpolator.mSlope2Y);
+        assertEquals("slope x p1",  1.50f, mInterpolator.mSlope2X, EPSILON);
+        assertEquals("slope y p1",  0.50f, mInterpolator.mSlope2Y, EPSILON);
         // t=0.0 (p0)
         mInterpolator.interpolate(0.0f);
-        assertFloatEquals("t=0.0 x", 0.0f, mInterpolator.mInterpolatedX);
-        assertFloatEquals("t=0.0 y", 1.0f, mInterpolator.mInterpolatedY);
+        assertEquals("t=0.0 x", 0.0f, mInterpolator.mInterpolatedX, EPSILON);
+        assertEquals("t=0.0 y", 1.0f, mInterpolator.mInterpolatedY, EPSILON);
         // t=0.2
         mInterpolator.interpolate(0.2f);
-        assertFloatEquals("t=0.2 x", 0.02400f, mInterpolator.mInterpolatedX);
-        assertFloatEquals("t=0.2 y", 0.78400f, mInterpolator.mInterpolatedY);
+        assertEquals("t=0.2 x", 0.02400f, mInterpolator.mInterpolatedX, EPSILON);
+        assertEquals("t=0.2 y", 0.78400f, mInterpolator.mInterpolatedY, EPSILON);
         // t=0.5
         mInterpolator.interpolate(0.5f);
-        assertFloatEquals("t=0.5 x", 0.28125f, mInterpolator.mInterpolatedX);
-        assertFloatEquals("t=0.5 y", 0.34375f, mInterpolator.mInterpolatedY);
+        assertEquals("t=0.5 x", 0.28125f, mInterpolator.mInterpolatedX, EPSILON);
+        assertEquals("t=0.5 y", 0.34375f, mInterpolator.mInterpolatedY, EPSILON);
         // t=0.8
         mInterpolator.interpolate(0.8f);
-        assertFloatEquals("t=0.8 x", 0.69600f, mInterpolator.mInterpolatedX);
-        assertFloatEquals("t=0.8 y", 0.01600f, mInterpolator.mInterpolatedY);
+        assertEquals("t=0.8 x", 0.69600f, mInterpolator.mInterpolatedX, EPSILON);
+        assertEquals("t=0.8 y", 0.01600f, mInterpolator.mInterpolatedY, EPSILON);
         // t=1.0 (p1)
         mInterpolator.interpolate(1.0f);
-        assertFloatEquals("t=1.0 x", 1.0f, mInterpolator.mInterpolatedX);
-        assertFloatEquals("t=1.0 y", 0.0f, mInterpolator.mInterpolatedY);
+        assertEquals("t=1.0 x", 1.0f, mInterpolator.mInterpolatedX, EPSILON);
+        assertEquals("t=1.0 y", 0.0f, mInterpolator.mInterpolatedY, EPSILON);
     }
 
+    @Test
     public void testP1P2() {
         // [p0 (p1 p2) p3]
         mInterpolator.reset(mXCoords, mYCoords, p0, p3 + 1);
@@ -102,33 +99,34 @@
         assertEquals("p2x", mXCoords[p2], mInterpolator.mP2X);
         assertEquals("p2y", mYCoords[p2], mInterpolator.mP2Y);
         // XY-slope at p1=1/3.0 (0.50/1.50)
-        assertFloatEquals("slope x p1",  1.50f, mInterpolator.mSlope1X);
-        assertFloatEquals("slope y p1",  0.50f, mInterpolator.mSlope1Y);
+        assertEquals("slope x p1",  1.50f, mInterpolator.mSlope1X, EPSILON);
+        assertEquals("slope y p1",  0.50f, mInterpolator.mSlope1Y, EPSILON);
         // XY-slope at p2=3.0 (1.50/0.50)
-        assertFloatEquals("slope x p2",  0.50f, mInterpolator.mSlope2X);
-        assertFloatEquals("slope y p2",  1.50f, mInterpolator.mSlope2Y);
+        assertEquals("slope x p2",  0.50f, mInterpolator.mSlope2X, EPSILON);
+        assertEquals("slope y p2",  1.50f, mInterpolator.mSlope2Y, EPSILON);
         // t=0.0 (p1)
         mInterpolator.interpolate(0.0f);
-        assertFloatEquals("t=0.0 x", 1.0f, mInterpolator.mInterpolatedX);
-        assertFloatEquals("t=0.0 y", 0.0f, mInterpolator.mInterpolatedY);
+        assertEquals("t=0.0 x", 1.0f, mInterpolator.mInterpolatedX, EPSILON);
+        assertEquals("t=0.0 y", 0.0f, mInterpolator.mInterpolatedY, EPSILON);
         // t=0.2
         mInterpolator.interpolate(0.2f);
-        assertFloatEquals("t=0.2 x", 1.384f, mInterpolator.mInterpolatedX);
-        assertFloatEquals("t=0.2 y", 0.224f, mInterpolator.mInterpolatedY);
+        assertEquals("t=0.2 x", 1.384f, mInterpolator.mInterpolatedX, EPSILON);
+        assertEquals("t=0.2 y", 0.224f, mInterpolator.mInterpolatedY, EPSILON);
         // t=0.5
         mInterpolator.interpolate(0.5f);
-        assertFloatEquals("t=0.5 x", 2.125f, mInterpolator.mInterpolatedX);
-        assertFloatEquals("t=0.5 y", 0.875f, mInterpolator.mInterpolatedY);
+        assertEquals("t=0.5 x", 2.125f, mInterpolator.mInterpolatedX, EPSILON);
+        assertEquals("t=0.5 y", 0.875f, mInterpolator.mInterpolatedY, EPSILON);
         // t=0.8
         mInterpolator.interpolate(0.8f);
-        assertFloatEquals("t=0.8 x", 2.776f, mInterpolator.mInterpolatedX);
-        assertFloatEquals("t=0.8 y", 1.616f, mInterpolator.mInterpolatedY);
+        assertEquals("t=0.8 x", 2.776f, mInterpolator.mInterpolatedX, EPSILON);
+        assertEquals("t=0.8 y", 1.616f, mInterpolator.mInterpolatedY, EPSILON);
         // t=1.0 (p2)
         mInterpolator.interpolate(1.0f);
-        assertFloatEquals("t=1.0 x", 3.0f, mInterpolator.mInterpolatedX);
-        assertFloatEquals("t=1.0 y", 2.0f, mInterpolator.mInterpolatedY);
+        assertEquals("t=1.0 x", 3.0f, mInterpolator.mInterpolatedX, EPSILON);
+        assertEquals("t=1.0 y", 2.0f, mInterpolator.mInterpolatedY, EPSILON);
     }
 
+    @Test
     public void testP2P3() {
         // [p0 p1 (p2 p3)]
         mInterpolator.reset(mXCoords, mYCoords, p0, p3 + 1);
@@ -138,33 +136,34 @@
         assertEquals("p3x", mXCoords[p3], mInterpolator.mP2X);
         assertEquals("p3y", mYCoords[p3], mInterpolator.mP2Y);
         // XY-slope at p2=3.0 (1.50/0.50)
-        assertFloatEquals("slope x p2",  0.50f, mInterpolator.mSlope1X);
-        assertFloatEquals("slope y p2",  1.50f, mInterpolator.mSlope1Y);
+        assertEquals("slope x p2",  0.50f, mInterpolator.mSlope1X, EPSILON);
+        assertEquals("slope y p2",  1.50f, mInterpolator.mSlope1Y, EPSILON);
         // XY-slope at p3=1/3.0 (-0.25/-0.75)
-        assertFloatEquals("slope x p3", -0.75f, mInterpolator.mSlope2X);
-        assertFloatEquals("slope y p3", -0.25f, mInterpolator.mSlope2Y);
+        assertEquals("slope x p3", -0.75f, mInterpolator.mSlope2X, EPSILON);
+        assertEquals("slope y p3", -0.25f, mInterpolator.mSlope2Y, EPSILON);
         // t=0.0 (p2)
         mInterpolator.interpolate(0.0f);
-        assertFloatEquals("t=0.0 x", 3.0f, mInterpolator.mInterpolatedX);
-        assertFloatEquals("t=0.0 y", 2.0f, mInterpolator.mInterpolatedY);
+        assertEquals("t=0.0 x", 3.0f, mInterpolator.mInterpolatedX, EPSILON);
+        assertEquals("t=0.0 y", 2.0f, mInterpolator.mInterpolatedY, EPSILON);
         // t=0.2
         mInterpolator.interpolate(0.2f);
-        assertFloatEquals("t=0.2 x", 2.98400f, mInterpolator.mInterpolatedX);
-        assertFloatEquals("t=0.2 y", 2.30400f, mInterpolator.mInterpolatedY);
+        assertEquals("t=0.2 x", 2.98400f, mInterpolator.mInterpolatedX, EPSILON);
+        assertEquals("t=0.2 y", 2.30400f, mInterpolator.mInterpolatedY, EPSILON);
         // t=0.5
         mInterpolator.interpolate(0.5f);
-        assertFloatEquals("t=0.5 x", 2.65625f, mInterpolator.mInterpolatedX);
-        assertFloatEquals("t=0.5 y", 2.71875f, mInterpolator.mInterpolatedY);
+        assertEquals("t=0.5 x", 2.65625f, mInterpolator.mInterpolatedX, EPSILON);
+        assertEquals("t=0.5 y", 2.71875f, mInterpolator.mInterpolatedY, EPSILON);
         // t=0.8
         mInterpolator.interpolate(0.8f);
-        assertFloatEquals("t=0.8 x", 2.21600f, mInterpolator.mInterpolatedX);
-        assertFloatEquals("t=0.8 y", 2.97600f, mInterpolator.mInterpolatedY);
+        assertEquals("t=0.8 x", 2.21600f, mInterpolator.mInterpolatedX, EPSILON);
+        assertEquals("t=0.8 y", 2.97600f, mInterpolator.mInterpolatedY, EPSILON);
         // t=1.0 (p3)
         mInterpolator.interpolate(1.0f);
-        assertFloatEquals("t=1.0 x", 2.0f, mInterpolator.mInterpolatedX);
-        assertFloatEquals("t=1.0 y", 3.0f, mInterpolator.mInterpolatedY);
+        assertEquals("t=1.0 x", 2.0f, mInterpolator.mInterpolatedX, EPSILON);
+        assertEquals("t=1.0 y", 3.0f, mInterpolator.mInterpolatedY, EPSILON);
     }
 
+    @Test
     public void testJustP1P2() {
         // [(p1 p2)]
         mInterpolator.reset(mXCoords, mYCoords, p1, p2 + 1);
@@ -174,30 +173,30 @@
         assertEquals("p2x", mXCoords[p2], mInterpolator.mP2X);
         assertEquals("p2y", mYCoords[p2], mInterpolator.mP2Y);
         // XY-slope at p1=1.0 (2.0/2.0)
-        assertFloatEquals("slope x p1", 2.00f, mInterpolator.mSlope1X);
-        assertFloatEquals("slope y p1", 2.00f, mInterpolator.mSlope1Y);
+        assertEquals("slope x p1", 2.00f, mInterpolator.mSlope1X, EPSILON);
+        assertEquals("slope y p1", 2.00f, mInterpolator.mSlope1Y, EPSILON);
         // XY-slope at p2=1.0 (2.0/2.0)
-        assertFloatEquals("slope x p2", 2.00f, mInterpolator.mSlope2X);
-        assertFloatEquals("slope y p2", 2.00f, mInterpolator.mSlope2Y);
+        assertEquals("slope x p2", 2.00f, mInterpolator.mSlope2X, EPSILON);
+        assertEquals("slope y p2", 2.00f, mInterpolator.mSlope2Y, EPSILON);
         // t=0.0 (p1)
         mInterpolator.interpolate(0.0f);
-        assertFloatEquals("t=0.0 x", 1.0f, mInterpolator.mInterpolatedX);
-        assertFloatEquals("t=0.0 y", 0.0f, mInterpolator.mInterpolatedY);
+        assertEquals("t=0.0 x", 1.0f, mInterpolator.mInterpolatedX, EPSILON);
+        assertEquals("t=0.0 y", 0.0f, mInterpolator.mInterpolatedY, EPSILON);
         // t=0.2
         mInterpolator.interpolate(0.2f);
-        assertFloatEquals("t=0.2 x", 1.4f, mInterpolator.mInterpolatedX);
-        assertFloatEquals("t=0.2 y", 0.4f, mInterpolator.mInterpolatedY);
+        assertEquals("t=0.2 x", 1.4f, mInterpolator.mInterpolatedX, EPSILON);
+        assertEquals("t=0.2 y", 0.4f, mInterpolator.mInterpolatedY, EPSILON);
         // t=0.5
         mInterpolator.interpolate(0.5f);
-        assertFloatEquals("t=0.5 x", 2.0f, mInterpolator.mInterpolatedX);
-        assertFloatEquals("t=0.5 y", 1.0f, mInterpolator.mInterpolatedY);
+        assertEquals("t=0.5 x", 2.0f, mInterpolator.mInterpolatedX, EPSILON);
+        assertEquals("t=0.5 y", 1.0f, mInterpolator.mInterpolatedY, EPSILON);
         // t=0.8
         mInterpolator.interpolate(0.8f);
-        assertFloatEquals("t=0.8 x", 2.6f, mInterpolator.mInterpolatedX);
-        assertFloatEquals("t=0.8 y", 1.6f, mInterpolator.mInterpolatedY);
+        assertEquals("t=0.8 x", 2.6f, mInterpolator.mInterpolatedX, EPSILON);
+        assertEquals("t=0.8 y", 1.6f, mInterpolator.mInterpolatedY, EPSILON);
         // t=1.0 (p2)
         mInterpolator.interpolate(1.0f);
-        assertFloatEquals("t=1.0 x", 3.0f, mInterpolator.mInterpolatedX);
-        assertFloatEquals("t=1.0 y", 2.0f, mInterpolator.mInterpolatedY);
+        assertEquals("t=1.0 x", 3.0f, mInterpolator.mInterpolatedX, EPSILON);
+        assertEquals("t=1.0 y", 2.0f, mInterpolator.mInterpolatedY, EPSILON);
     }
 }
diff --git a/tests/src/com/android/inputmethod/keyboard/internal/KeyboardTextsSetTests.java b/tests/src/com/android/inputmethod/keyboard/internal/KeyboardTextsSetTests.java
index 7221101..f312cad 100644
--- a/tests/src/com/android/inputmethod/keyboard/internal/KeyboardTextsSetTests.java
+++ b/tests/src/com/android/inputmethod/keyboard/internal/KeyboardTextsSetTests.java
@@ -16,28 +16,41 @@
 
 package com.android.inputmethod.keyboard.internal;
 
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+
 import android.content.Context;
-import android.test.AndroidTestCase;
-import android.test.suitebuilder.annotation.SmallTest;
 import android.view.inputmethod.InputMethodInfo;
 import android.view.inputmethod.InputMethodSubtype;
 
+import androidx.test.InstrumentationRegistry;
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
+
 import com.android.inputmethod.latin.RichInputMethodManager;
 import com.android.inputmethod.latin.utils.SubtypeLocaleUtils;
 
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
 import java.util.Locale;
 
 @SmallTest
-public final class KeyboardTextsSetTests extends AndroidTestCase {
+@RunWith(AndroidJUnit4.class)
+public final class KeyboardTextsSetTests {
     // All input method subtypes of LatinIME.
     private List<InputMethodSubtype> mAllSubtypesList;
 
-    @Override
-    protected void setUp() throws Exception {
-        super.setUp();
+    private Context getContext() {
+        return InstrumentationRegistry.getTargetContext();
+    }
+
+    @Before
+    public void setUp() throws Exception {
         RichInputMethodManager.init(getContext());
         final RichInputMethodManager richImm = RichInputMethodManager.getInstance();
 
@@ -54,6 +67,7 @@
     // Test that the text {@link KeyboardTextsSet#SWITCH_TO_ALPHA_KEY_LABEL} exists for all
     // subtypes. The text is needed to implement Emoji Keyboard, see
     // {@link KeyboardSwitcher#setEmojiKeyboard()}.
+    @Test
     public void testSwitchToAlphaKeyLabel() {
         final Context context = getContext();
         final KeyboardTextsSet textsSet = new KeyboardTextsSet();
@@ -80,6 +94,7 @@
     };
 
     // Test that the text from resources are correctly loaded for all subtypes.
+    @Test
     public void testTextFromResources() {
         final Context context = getContext();
         final KeyboardTextsSet textsSet = new KeyboardTextsSet();
diff --git a/tests/src/com/android/inputmethod/keyboard/internal/MatrixUtilsTests.java b/tests/src/com/android/inputmethod/keyboard/internal/MatrixUtilsTests.java
index e2a11ab..10c552f 100644
--- a/tests/src/com/android/inputmethod/keyboard/internal/MatrixUtilsTests.java
+++ b/tests/src/com/android/inputmethod/keyboard/internal/MatrixUtilsTests.java
@@ -16,25 +16,25 @@
 
 package com.android.inputmethod.keyboard.internal;
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
+
 import com.android.inputmethod.keyboard.internal.MatrixUtils.MatrixOperationFailedException;
 
-import android.test.AndroidTestCase;
-import android.test.suitebuilder.annotation.SmallTest;
+import org.junit.Test;
+import org.junit.runner.RunWith;
 
 @SmallTest
-public class MatrixUtilsTests extends AndroidTestCase {
+@RunWith(AndroidJUnit4.class)
+public class MatrixUtilsTests {
     // "run tests" -c com.android.inputmethod.keyboard.internal.MatrixUtilsTests
     private static final boolean DEBUG = false;
     private static final float EPSILON = 0.00001f;
 
-    private static void assertEqualsFloat(float f0, float f1) {
-        assertEqualsFloat(f0, f1, EPSILON);
-    }
-
-    /* package */ static void assertEqualsFloat(float f0, float f1, float error) {
-        assertTrue(Math.abs(f0 - f1) < error);
-    }
-
+    @Test
     public void testMulti() {
         final float[][] matrixA = {{1, 2}, {3, 4}};
         final float[][] matrixB = {{5, 6}, {7, 8}};
@@ -47,12 +47,13 @@
         if (DEBUG) {
             MatrixUtils.dump("multi", retval);
         }
-        assertEqualsFloat(retval[0][0], 19);
-        assertEqualsFloat(retval[0][1], 22);
-        assertEqualsFloat(retval[1][0], 43);
-        assertEqualsFloat(retval[1][1], 50);
+        assertEquals(retval[0][0], 19, EPSILON);
+        assertEquals(retval[0][1], 22, EPSILON);
+        assertEquals(retval[1][0], 43, EPSILON);
+        assertEquals(retval[1][1], 50, EPSILON);
     }
 
+    @Test
     public void testInverse() {
         final int N = 4;
         final float[][] matrix =
@@ -77,7 +78,7 @@
         }
         for (int i = 0; i < N; ++i) {
             for (int j = 0; j < N; ++j) {
-                assertEqualsFloat(((i == j) ? 1.0f : 0.0f), retval[i][j]);
+                assertEquals(((i == j) ? 1.0f : 0.0f), retval[i][j], EPSILON);
             }
         }
     }
diff --git a/tests/src/com/android/inputmethod/keyboard/internal/MoreKeySpecSplitTests.java b/tests/src/com/android/inputmethod/keyboard/internal/MoreKeySpecSplitTests.java
index 8f4648c..cbedd04 100644
--- a/tests/src/com/android/inputmethod/keyboard/internal/MoreKeySpecSplitTests.java
+++ b/tests/src/com/android/inputmethod/keyboard/internal/MoreKeySpecSplitTests.java
@@ -16,26 +16,34 @@
 
 package com.android.inputmethod.keyboard.internal;
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.fail;
+
 import android.content.Context;
 import android.content.res.Resources;
-import android.test.AndroidTestCase;
-import android.test.suitebuilder.annotation.SmallTest;
+
+import androidx.test.InstrumentationRegistry;
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
 
 import com.android.inputmethod.latin.R;
 
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
 import java.util.Arrays;
 import java.util.Locale;
 
 @SmallTest
-public class MoreKeySpecSplitTests extends AndroidTestCase {
+@RunWith(AndroidJUnit4.class)
+public class MoreKeySpecSplitTests {
     private static final Locale TEST_LOCALE = Locale.ENGLISH;
     private final KeyboardTextsSet mTextsSet = new KeyboardTextsSet();
 
-    @Override
-    protected void setUp() throws Exception {
-        super.setUp();
-
-        final Context targetContext = getContext();
+    @Before
+    public void setUp() throws Exception {
+        final Context targetContext = InstrumentationRegistry.getTargetContext();
         final Resources targetRes = targetContext.getResources();
         final String targetPackageName = targetRes.getResourcePackageName(
                 R.string.english_ime_name);
@@ -90,6 +98,7 @@
     private static final String SURROGATE1 = PAIR1 + PAIR2;
     private static final String SURROGATE2 = PAIR1 + PAIR2 + PAIR3;
 
+    @Test
     public void testSplitZero() {
         assertTextArray("Empty string", "");
         assertTextArray("Empty entry", ",");
@@ -99,6 +108,7 @@
         assertTextArray("Empty entries with escape", ",a,b\\,c,,d,", "a", "b\\,c", "d");
     }
 
+    @Test
     public void testSplitSingle() {
         assertTextArray("Single char", "a", "a");
         assertTextArray("Surrogate pair", PAIR1, PAIR1);
@@ -128,6 +138,7 @@
         assertTextArray("Incomplete resource reference 4", "!" + SURROGATE2, "!" + SURROGATE2);
     }
 
+    @Test
     public void testSplitSingleEscaped() {
         assertTextArray("Escaped char", "\\a", "\\a");
         assertTextArray("Escaped surrogate pair", "\\" + PAIR1, "\\" + PAIR1);
@@ -163,6 +174,7 @@
         assertTextArray("Escaped !TEXT/NAME", "\\!TEXT/EMPTY_STRING", "\\!TEXT/EMPTY_STRING");
     }
 
+    @Test
     public void testSplitMulti() {
         assertTextArray("Multiple chars", "a,b,c", "a", "b", "c");
         assertTextArray("Multiple chars", "a,b,\\c", "a", "b", "\\c");
@@ -178,6 +190,7 @@
                 " abc ", " def ", " ghi ");
     }
 
+    @Test
     public void testSplitMultiEscaped() {
         assertTextArray("Multiple chars with comma", "a,\\,,c", "a", "\\,", "c");
         assertTextArray("Multiple chars with comma surrounded by spaces", " a , \\, , c ",
@@ -197,16 +210,19 @@
                 "\\!", "\\!TEXT/EMPTY_STRING");
     }
 
+    @Test
     public void testSplitTextReferenceError() {
         assertError("Incomplete text name", "!text/", "!text/");
         assertError("Non existing text", "!text/non_existing");
     }
 
+    @Test
     public void testSplitEmptyTextReference() {
         // Note that morekeys_q of English locale is empty.
         assertTextArray("Empty string", "!text/morekeys_q");
     }
 
+    @Test
     public void testLabelReferece() {
         assertTextArray("Label time am", "!text/keylabel_time_am", "AM");
 
@@ -217,6 +233,7 @@
                 "!icon/settings_key|!code/key_settings");
     }
 
+    @Test
     public void testUselessUpperCaseSpecifier() {
         assertTextArray("EMPTY STRING",
                 "!TEXT/EMPTY_STRING", "!TEXT/EMPTY_STRING");
diff --git a/tests/src/com/android/inputmethod/keyboard/internal/MoreKeySpecStringReferenceTests.java b/tests/src/com/android/inputmethod/keyboard/internal/MoreKeySpecStringReferenceTests.java
index e06ecae..3655abb 100644
--- a/tests/src/com/android/inputmethod/keyboard/internal/MoreKeySpecStringReferenceTests.java
+++ b/tests/src/com/android/inputmethod/keyboard/internal/MoreKeySpecStringReferenceTests.java
@@ -16,26 +16,34 @@
 
 package com.android.inputmethod.keyboard.internal;
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.fail;
+
 import android.app.Instrumentation;
 import android.content.Context;
 import android.content.res.Resources;
-import android.test.InstrumentationTestCase;
-import android.test.suitebuilder.annotation.SmallTest;
+
+import androidx.test.InstrumentationRegistry;
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
 
 import com.android.inputmethod.latin.tests.R;
 
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
 import java.util.Locale;
 
 @SmallTest
-public class MoreKeySpecStringReferenceTests extends InstrumentationTestCase {
+@RunWith(AndroidJUnit4.class)
+public class MoreKeySpecStringReferenceTests {
     private static final Locale TEST_LOCALE = Locale.ENGLISH;
     private final KeyboardTextsSet mTextsSet = new KeyboardTextsSet();
 
-    @Override
-    protected void setUp() throws Exception {
-        super.setUp();
-
-        final Instrumentation instrumentation = getInstrumentation();
+    @Before
+    public void setUp() throws Exception {
+        final Instrumentation instrumentation = InstrumentationRegistry.getInstrumentation();
         final Context testContext = instrumentation.getContext();
         final Resources testRes = testContext.getResources();
         final String testPackageName = testRes.getResourcePackageName(R.string.empty_string);
@@ -59,16 +67,19 @@
         }
     }
 
+    @Test
     public void testResolveNullText() {
         assertEquals("resolve null",
                 mTextsSet.resolveTextReference(null), null);
     }
 
+    @Test
     public void testResolveEmptyText() {
         assertEquals("resolve empty text",
                 mTextsSet.resolveTextReference("!string/empty_string"), null);
     }
 
+    @Test
     public void testSplitSingleEscaped() {
         assertTextArray("Escaped !string", "\\!string",
                 "\\!string");
@@ -82,6 +93,7 @@
                 "\\!STRING/EMPTY_STRING");
     }
 
+    @Test
     public void testSplitMultiEscaped() {
         assertTextArray("Multiple escaped !string", "\\!,\\!string/empty_string",
                 "\\!", "\\!string/empty_string");
@@ -89,15 +101,18 @@
                 "\\!", "\\!STRING/EMPTY_STRING");
     }
 
+    @Test
     public void testSplitStringReferenceError() {
         assertError("Incomplete resource name", "!string/", "!string/");
         assertError("Non existing resource", "!string/non_existing");
     }
 
+    @Test
     public void testSplitEmptyStringReference() {
         assertTextArray("Empty string", "!string/empty_string");
     }
 
+    @Test
     public void testSplitResourceSingle() {
         assertTextArray("Single char", "!string/single_char",
                 "a");
@@ -119,6 +134,7 @@
                 "\\\\a");
     }
 
+    @Test
     public void testSplitResourceSingleEscaped() {
         assertTextArray("Escaped char",
                 "!string/escaped_char", "\\a");
@@ -146,6 +162,7 @@
                 "!string/escaped_label_with_escape", "a\\\\c");
     }
 
+    @Test
     public void testSplitResourceMulti() {
         assertTextArray("Multiple chars",
                 "!string/multiple_chars", "a", "b", "c");
@@ -158,6 +175,7 @@
                 "!string/multiple_labels_surrounded_by_spaces", " abc ", " def ", " ghi ");
     }
 
+    @Test
     public void testSplitResourcetMultiEscaped() {
         assertTextArray("Multiple chars with comma",
                 "!string/multiple_chars_with_comma",
@@ -179,6 +197,7 @@
                 " ab\\\\ ", " d\\\\\\, ", " g\\,i ");
     }
 
+    @Test
     public void testSplitMultipleResources() {
         assertTextArray("Literals and resources",
                 "1,!string/multiple_chars,z",
@@ -203,6 +222,7 @@
                 "abcabc", "def", "ghi");
     }
 
+    @Test
     public void testSplitIndirectReference() {
         assertTextArray("Indirect",
                 "!string/indirect_string", "a", "b", "c");
@@ -212,11 +232,13 @@
                 "!string/indirect2_string", "a", "b", "c");
     }
 
+    @Test
     public void testSplitInfiniteIndirectReference() {
         assertError("Infinite indirection",
                 "1,!string/infinite_indirection,2", "1", "infinite", "<infinite>", "loop", "2");
     }
 
+    @Test
     public void testLabelReferece() {
         assertTextArray("Indirect naviagte actions as more key",
                 "!string/keyspec_indirect_navigate_actions",
@@ -225,6 +247,7 @@
                 "!hasLabels!", "ActionNext|!code/key_action_next");
     }
 
+    @Test
     public void testUselessUpperCaseSpecifier() {
         assertTextArray("EMPTY STRING",
                 "!STRING/EMPTY_STRING", "!STRING/EMPTY_STRING");
diff --git a/tests/src/com/android/inputmethod/keyboard/internal/PointerTrackerQueueTests.java b/tests/src/com/android/inputmethod/keyboard/internal/PointerTrackerQueueTests.java
index 7908b26..6ab1549 100644
--- a/tests/src/com/android/inputmethod/keyboard/internal/PointerTrackerQueueTests.java
+++ b/tests/src/com/android/inputmethod/keyboard/internal/PointerTrackerQueueTests.java
@@ -16,11 +16,19 @@
 
 package com.android.inputmethod.keyboard.internal;
 
-import android.test.AndroidTestCase;
-import android.test.suitebuilder.annotation.SmallTest;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
 
 @SmallTest
-public class PointerTrackerQueueTests extends AndroidTestCase {
+@RunWith(AndroidJUnit4.class)
+public class PointerTrackerQueueTests {
     public static class Element implements PointerTrackerQueue.Element {
         public static int sPhantomUpCount;
         public static final long NOT_HAPPENED = -1;
@@ -65,11 +73,13 @@
     private final Element mElement4 = new Element(4);
     private final PointerTrackerQueue mQueue = new PointerTrackerQueue();
 
+    @Test
     public void testEmpty() {
         assertEquals(0, mQueue.size());
         assertEquals("[]", mQueue.toString());
     }
 
+    @Test
     public void testAdd() {
         mQueue.add(mElement1);
         assertEquals(1, mQueue.size());
@@ -85,6 +95,7 @@
         assertEquals("[1 2 3 4]", mQueue.toString());
     }
 
+    @Test
     public void testRemove() {
         Element.sPhantomUpCount = 0;
 
@@ -119,6 +130,7 @@
         assertEquals(Element.NOT_HAPPENED, mElement4.mPhantomUpEventTime);
     }
 
+    @Test
     public void testAddAndRemove() {
         Element.sPhantomUpCount = 0;
 
@@ -158,6 +170,7 @@
         assertEquals(Element.NOT_HAPPENED, mElement4.mPhantomUpEventTime);
     }
 
+    @Test
     public void testReleaseAllPointers() {
         mElement2.mIsModifier = true;
         mQueue.add(mElement1);
@@ -177,6 +190,7 @@
         assertEquals(eventTime + 4, mElement4.mPhantomUpEventTime);
     }
 
+    @Test
     public void testReleaseAllPointersOlderThanFirst() {
         mElement2.mIsModifier = true;
         mQueue.add(mElement1);
@@ -194,6 +208,7 @@
         assertEquals(Element.NOT_HAPPENED, mElement3.mPhantomUpEventTime);
     }
 
+    @Test
     public void testReleaseAllPointersOlderThanLast() {
         mElement2.mIsModifier = true;
         mQueue.add(mElement1);
@@ -213,6 +228,7 @@
         assertEquals(Element.NOT_HAPPENED, mElement4.mPhantomUpEventTime);
     }
 
+    @Test
     public void testReleaseAllPointersOlderThanWithoutModifierMiddle() {
         mQueue.add(mElement1);
         mQueue.add(mElement2);
@@ -231,6 +247,7 @@
         assertEquals(Element.NOT_HAPPENED, mElement4.mPhantomUpEventTime);
     }
 
+    @Test
     public void testReleaseAllPointersOlderThanWithoutModifierLast() {
         mQueue.add(mElement1);
         mQueue.add(mElement2);
@@ -249,6 +266,7 @@
         assertEquals(Element.NOT_HAPPENED, mElement4.mPhantomUpEventTime);
     }
 
+    @Test
     public void testReleaseAllPointersExcept() {
         mElement2.mIsModifier = true;
         mQueue.add(mElement1);
@@ -268,6 +286,7 @@
         assertEquals(eventTime + 3, mElement4.mPhantomUpEventTime);
     }
 
+    @Test
     public void testHasModifierKeyOlderThan() {
         Element.sPhantomUpCount = 0;
         assertFalse("hasModifierKeyOlderThan empty", mQueue.hasModifierKeyOlderThan(mElement1));
@@ -297,6 +316,7 @@
         assertEquals(Element.NOT_HAPPENED, mElement4.mPhantomUpEventTime);
     }
 
+    @Test
     public void testIsAnyInDraggingFinger() {
         Element.sPhantomUpCount = 0;
         assertFalse(mQueue.isAnyInDraggingFinger());
diff --git a/tests/src/com/android/inputmethod/keyboard/internal/SmoothingUtilsTests.java b/tests/src/com/android/inputmethod/keyboard/internal/SmoothingUtilsTests.java
index 293741a..39da3ec 100644
--- a/tests/src/com/android/inputmethod/keyboard/internal/SmoothingUtilsTests.java
+++ b/tests/src/com/android/inputmethod/keyboard/internal/SmoothingUtilsTests.java
@@ -16,16 +16,24 @@
 
 package com.android.inputmethod.keyboard.internal;
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
+
 import com.android.inputmethod.keyboard.internal.MatrixUtils.MatrixOperationFailedException;
 
-import android.test.AndroidTestCase;
-import android.test.suitebuilder.annotation.SmallTest;
+import org.junit.Test;
+import org.junit.runner.RunWith;
 
 @SmallTest
-public class SmoothingUtilsTests extends AndroidTestCase {
+@RunWith(AndroidJUnit4.class)
+public class SmoothingUtilsTests {
     // "run tests" -c com.android.inputmethod.keyboard.internal.SmoothingUtilsTests
     private static final boolean DEBUG = false;
 
+    @Test
     public void testGet3DParamaters() {
         final float[] xs = new float[] {0, 1, 2, 3, 4};
         final float[] ys = new float[] {1, 4, 15, 40, 85}; // y = x^3 + x^2 + x + 1
@@ -36,7 +44,7 @@
                 MatrixUtils.dump("3d", retval);
             }
             for (int i = 0; i < 4; ++i) {
-                MatrixUtilsTests.assertEqualsFloat(retval[i][0], 1.0f, 0.001f);
+                assertEquals(retval[i][0], 1.0f, 0.001f);
             }
         } catch (MatrixOperationFailedException e) {
             assertTrue(false);
diff --git a/tests/src/com/android/inputmethod/latin/BinaryDictionaryTests.java b/tests/src/com/android/inputmethod/latin/BinaryDictionaryTests.java
index e96c934..db8b809 100644
--- a/tests/src/com/android/inputmethod/latin/BinaryDictionaryTests.java
+++ b/tests/src/com/android/inputmethod/latin/BinaryDictionaryTests.java
@@ -16,11 +16,18 @@
 
 package com.android.inputmethod.latin;
 
-import android.test.AndroidTestCase;
-import android.test.suitebuilder.annotation.LargeTest;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
 import android.text.TextUtils;
 import android.util.Pair;
 
+import androidx.test.InstrumentationRegistry;
+import androidx.test.filters.LargeTest;
+import androidx.test.runner.AndroidJUnit4;
+
 import com.android.inputmethod.latin.NgramContext.WordInfo;
 import com.android.inputmethod.latin.common.CodePointUtils;
 import com.android.inputmethod.latin.common.FileUtils;
@@ -30,6 +37,11 @@
 import com.android.inputmethod.latin.makedict.WordProperty;
 import com.android.inputmethod.latin.utils.BinaryDictionaryUtils;
 
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
 import java.io.File;
 import java.io.IOException;
 import java.util.ArrayList;
@@ -39,26 +51,25 @@
 import java.util.Random;
 
 @LargeTest
-public class BinaryDictionaryTests extends AndroidTestCase {
+@RunWith(AndroidJUnit4.class)
+public class BinaryDictionaryTests {
     private static final String TEST_DICT_FILE_EXTENSION = ".testDict";
     private static final String TEST_LOCALE = "test";
     private static final String DICTIONARY_ID = "TestBinaryDictionary";
 
     private HashSet<File> mDictFilesToBeDeleted = new HashSet<>();
 
-    @Override
-    protected void setUp() throws Exception {
-        super.setUp();
+    @Before
+    public void setUp() throws Exception {
         mDictFilesToBeDeleted.clear();
     }
 
-    @Override
-    protected void tearDown() throws Exception {
+    @After
+    public void tearDown() throws Exception {
         for (final File dictFile : mDictFilesToBeDeleted) {
             dictFile.delete();
         }
         mDictFilesToBeDeleted.clear();
-        super.tearDown();
     }
 
     private File createEmptyDictionaryAndGetFile(final int formatVersion) {
@@ -82,7 +93,7 @@
     private File createEmptyVer4DictionaryAndGetFile(final int formatVersion,
             final HashMap<String, String> attributeMap) throws IOException {
         final File file = File.createTempFile(DICTIONARY_ID, TEST_DICT_FILE_EXTENSION,
-                getContext().getCacheDir());
+                InstrumentationRegistry.getTargetContext().getCacheDir());
         file.delete();
         file.mkdir();
         if (BinaryDictionaryUtils.createEmptyDictFile(file.getAbsolutePath(), formatVersion,
@@ -106,6 +117,7 @@
                 Locale.getDefault(), TEST_LOCALE, true /* isUpdatable */);
     }
 
+    @Test
     public void testIsValidDictionary() {
         final File dictFile = createEmptyDictionaryAndGetFile(FormatSpec.VERSION403);
         BinaryDictionary binaryDictionary = getBinaryDictionary(dictFile);
@@ -121,6 +133,7 @@
         binaryDictionary.close();
     }
 
+    @Test
     public void testConstructingDictionaryOnMemory() {
         final File dictFile = createEmptyDictionaryAndGetFile(FormatSpec.VERSION403);
         FileUtils.deleteRecursively(dictFile);
@@ -142,6 +155,7 @@
         binaryDictionary.close();
     }
 
+    @Test
     public void testAddTooLongWord() {
         final BinaryDictionary binaryDictionary = getEmptyBinaryDictionary(FormatSpec.VERSION403);
         final StringBuffer stringBuilder = new StringBuffer();
@@ -209,6 +223,7 @@
                 new NgramContext(new WordInfo(word1), new WordInfo(word0)), word2);
     }
 
+    @Test
     public void testAddUnigramWord() {
         final BinaryDictionary binaryDictionary = getEmptyBinaryDictionary(FormatSpec.VERSION403);
         final int probability = 100;
@@ -236,6 +251,7 @@
         assertEquals(updatedProbability, binaryDictionary.getFrequency("aaa"));
     }
 
+    @Test
     public void testRandomlyAddUnigramWord() {
         final int wordCount = 1000;
         final int codePointSetSize = 50;
@@ -258,6 +274,7 @@
         }
     }
 
+    @Test
     public void testAddBigramWords() {
         final BinaryDictionary binaryDictionary = getEmptyBinaryDictionary(FormatSpec.VERSION403);
 
@@ -311,6 +328,7 @@
                 getBigramProbability(binaryDictionary, "abcde", "fghij"));
     }
 
+    @Test
     public void testRandomlyAddBigramWords() {
         final int wordCount = 100;
         final int bigramCount = 1000;
@@ -357,6 +375,7 @@
         }
     }
 
+    @Test
     public void testAddTrigramWords() {
         final BinaryDictionary binaryDictionary = getEmptyBinaryDictionary(FormatSpec.VERSION403);
         final int unigramProbability = 100;
@@ -383,6 +402,7 @@
                 getTrigramProbability(binaryDictionary, "bcc", "abb", "aaa"));
     }
 
+    @Test
     public void testFlushDictionary() {
         final File dictFile = createEmptyDictionaryAndGetFile(FormatSpec.VERSION403);
         BinaryDictionary binaryDictionary = getBinaryDictionary(dictFile);
@@ -417,6 +437,7 @@
         binaryDictionary.close();
     }
 
+    @Test
     public void testFlushWithGCDictionary() {
         final File dictFile = createEmptyDictionaryAndGetFile(FormatSpec.VERSION403);
         BinaryDictionary binaryDictionary = getBinaryDictionary(dictFile);
@@ -447,6 +468,7 @@
         binaryDictionary.close();
     }
 
+    @Test
     public void testAddBigramWordsAndFlashWithGC() {
         final int wordCount = 100;
         final int bigramCount = 1000;
@@ -499,6 +521,7 @@
         }
     }
 
+    @Test
     public void testRandomOperationsAndFlashWithGC() {
         final int maxUnigramCount = 5000;
         final int maxBigramCount = 10000;
@@ -593,6 +616,7 @@
         }
     }
 
+    @Test
     public void testAddManyUnigramsAndFlushWithGC() {
         final int flashWithGCIterationCount = 3;
         final int codePointSetSize = 50;
@@ -628,6 +652,7 @@
         }
     }
 
+    @Test
     public void testUnigramAndBigramCount() {
         final int maxUnigramCount = 5000;
         final int maxBigramCount = 10000;
@@ -684,6 +709,7 @@
         }
     }
 
+    @Test
     public void testGetWordProperties() {
         final long seed = System.currentTimeMillis();
         final Random random = new Random(seed);
@@ -769,6 +795,7 @@
         }
     }
 
+    @Test
     public void testIterateAllWords() {
         final long seed = System.currentTimeMillis();
         final Random random = new Random(seed);
@@ -852,6 +879,7 @@
         assertTrue(bigramSet.isEmpty());
     }
 
+    @Test
     public void testPossiblyOffensiveAttributeMaintained() {
         final BinaryDictionary binaryDictionary =
                 getEmptyBinaryDictionary(FormatSpec.VERSION403);
@@ -860,6 +888,7 @@
         assertEquals(true, wordProperty.mIsPossiblyOffensive);
     }
 
+    @Test
     public void testBeginningOfSentence() {
         final BinaryDictionary binaryDictionary = getEmptyBinaryDictionary(FormatSpec.VERSION403);
         final int dummyProbability = 0;
diff --git a/tests/src/com/android/inputmethod/latin/ContactsContentObserverTest.java b/tests/src/com/android/inputmethod/latin/ContactsContentObserverTest.java
index f90a18b..029e1b5 100644
--- a/tests/src/com/android/inputmethod/latin/ContactsContentObserverTest.java
+++ b/tests/src/com/android/inputmethod/latin/ContactsContentObserverTest.java
@@ -24,11 +24,14 @@
 
 import android.content.Context;
 import android.provider.ContactsContract.Contacts;
-import android.test.suitebuilder.annotation.SmallTest;
+
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
 
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
+import org.junit.runner.RunWith;
 import org.mockito.Mock;
 import org.mockito.MockitoAnnotations;
 
@@ -38,6 +41,7 @@
  * Tests for {@link ContactsContentObserver}.
  */
 @SmallTest
+@RunWith(AndroidJUnit4.class)
 public class ContactsContentObserverTest {
     private static final int UPDATED_CONTACT_COUNT = 10;
     private static final int STALE_CONTACT_COUNT = 8;
diff --git a/tests/src/com/android/inputmethod/latin/ContactsDictionaryUtilsTest.java b/tests/src/com/android/inputmethod/latin/ContactsDictionaryUtilsTest.java
index 9b49f1a..a00c9df 100644
--- a/tests/src/com/android/inputmethod/latin/ContactsDictionaryUtilsTest.java
+++ b/tests/src/com/android/inputmethod/latin/ContactsDictionaryUtilsTest.java
@@ -20,9 +20,11 @@
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
 
-import android.test.suitebuilder.annotation.SmallTest;
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
 
 import org.junit.Test;
+import org.junit.runner.RunWith;
 
 import java.util.Locale;
 
@@ -30,6 +32,7 @@
  * Tests for {@link ContactsDictionaryUtils}
  */
 @SmallTest
+@RunWith(AndroidJUnit4.class)
 public class ContactsDictionaryUtilsTest {
 
     @Test
diff --git a/tests/src/com/android/inputmethod/latin/ContactsManagerTest.java b/tests/src/com/android/inputmethod/latin/ContactsManagerTest.java
index f987e0c..d3d746d 100644
--- a/tests/src/com/android/inputmethod/latin/ContactsManagerTest.java
+++ b/tests/src/com/android/inputmethod/latin/ContactsManagerTest.java
@@ -16,6 +16,10 @@
 
 package com.android.inputmethod.latin;
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
 import android.content.ContentResolver;
 import android.content.Context;
 import android.database.Cursor;
@@ -23,17 +27,20 @@
 import android.net.Uri;
 import android.provider.ContactsContract;
 import android.provider.ContactsContract.Contacts;
-import android.test.AndroidTestCase;
 import android.test.RenamingDelegatingContext;
 import android.test.mock.MockContentProvider;
 import android.test.mock.MockContentResolver;
-import android.test.suitebuilder.annotation.SmallTest;
+
+import androidx.test.InstrumentationRegistry;
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
 
 import com.android.inputmethod.latin.ContactsDictionaryConstants;
 import com.android.inputmethod.latin.ContactsManager;
 
 import org.junit.Before;
 import org.junit.Test;
+import org.junit.runner.RunWith;
 
 import java.util.ArrayList;
 import java.util.HashMap;
@@ -43,14 +50,16 @@
  * Tests for {@link ContactsManager}
  */
 @SmallTest
-public class ContactsManagerTest extends AndroidTestCase {
+@RunWith(AndroidJUnit4.class)
+public class ContactsManagerTest {
 
     private ContactsManager mManager;
     private FakeContactsContentProvider mFakeContactsContentProvider;
     private MatrixCursor mMatrixCursor;
 
+    private final static float EPSILON = 0.00001f;
+
     @Before
-    @Override
     public void setUp() throws Exception {
         // Fake content provider
         mFakeContactsContentProvider = new FakeContactsContentProvider();
@@ -59,7 +68,8 @@
         final MockContentResolver contentResolver = new MockContentResolver();
         contentResolver.addProvider(ContactsContract.AUTHORITY, mFakeContactsContentProvider);
         // Add the fake content resolver to a fake context.
-        final ContextWithMockContentResolver context = new ContextWithMockContentResolver(mContext);
+        final ContextWithMockContentResolver context =
+                new ContextWithMockContentResolver(InstrumentationRegistry.getTargetContext());
         context.setContentResolver(contentResolver);
 
         mManager = new ContactsManager(context);
@@ -113,9 +123,10 @@
         cursor.moveToFirst();
         ContactsManager.RankedContact contact = new ContactsManager.RankedContact(cursor);
         contact.computeAffinity(1, month_ago);
-        assertEquals(contact.getAffinity(), 1.0f);
+        assertEquals(contact.getAffinity(), 1.0f, EPSILON);
         contact.computeAffinity(2, now);
-        assertEquals(contact.getAffinity(), (2.0f/3.0f + (float)Math.pow(0.5, 3) + 1.0f) / 3);
+        assertEquals(contact.getAffinity(), (2.0f/3.0f + (float)Math.pow(0.5, 3) + 1.0f) / 3,
+                EPSILON);
     }
 
     @Test
diff --git a/tests/src/com/android/inputmethod/latin/DictionaryFacilitatorLruCacheTests.java b/tests/src/com/android/inputmethod/latin/DictionaryFacilitatorLruCacheTests.java
index 6b0bbc2..f8130f3 100644
--- a/tests/src/com/android/inputmethod/latin/DictionaryFacilitatorLruCacheTests.java
+++ b/tests/src/com/android/inputmethod/latin/DictionaryFacilitatorLruCacheTests.java
@@ -16,16 +16,26 @@
 
 package com.android.inputmethod.latin;
 
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import androidx.test.InstrumentationRegistry;
+import androidx.test.filters.LargeTest;
+import androidx.test.runner.AndroidJUnit4;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
 import java.util.Locale;
 
-import android.test.AndroidTestCase;
-import android.test.suitebuilder.annotation.LargeTest;
-
 @LargeTest
-public class DictionaryFacilitatorLruCacheTests extends AndroidTestCase {
+@RunWith(AndroidJUnit4.class)
+public class DictionaryFacilitatorLruCacheTests {
+
+    @Test
     public void testGetFacilitator() {
         final DictionaryFacilitatorLruCache cache =
-                new DictionaryFacilitatorLruCache(getContext(), "");
+                new DictionaryFacilitatorLruCache(InstrumentationRegistry.getTargetContext(), "");
 
         final DictionaryFacilitator dictionaryFacilitatorEnUs = cache.get(Locale.US);
         assertNotNull(dictionaryFacilitatorEnUs);
diff --git a/tests/src/com/android/inputmethod/latin/NgramContextTests.java b/tests/src/com/android/inputmethod/latin/NgramContextTests.java
index 0a662db..5058184 100644
--- a/tests/src/com/android/inputmethod/latin/NgramContextTests.java
+++ b/tests/src/com/android/inputmethod/latin/NgramContextTests.java
@@ -16,15 +16,26 @@
 
 package com.android.inputmethod.latin;
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+import androidx.test.InstrumentationRegistry;
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
+
 import com.android.inputmethod.latin.NgramContext.WordInfo;
 import com.android.inputmethod.latin.settings.SpacingAndPunctuations;
 import com.android.inputmethod.latin.utils.NgramContextUtils;
 
-import android.test.AndroidTestCase;
-import android.test.suitebuilder.annotation.SmallTest;
+import org.junit.Test;
+import org.junit.runner.RunWith;
 
 @SmallTest
-public class NgramContextTests extends AndroidTestCase {
+@RunWith(AndroidJUnit4.class)
+public class NgramContextTests {
+
+    @Test
     public void testConstruct() {
         assertEquals(new NgramContext(new WordInfo("a")), new NgramContext(new WordInfo("a")));
         assertEquals(new NgramContext(WordInfo.BEGINNING_OF_SENTENCE_WORD_INFO),
@@ -35,6 +46,7 @@
                 new NgramContext(WordInfo.EMPTY_WORD_INFO));
     }
 
+    @Test
     public void testIsBeginningOfSentenceContext() {
         assertFalse(new NgramContext().isBeginningOfSentenceContext());
         assertTrue(new NgramContext(WordInfo.BEGINNING_OF_SENTENCE_WORD_INFO)
@@ -52,6 +64,7 @@
                 .isBeginningOfSentenceContext());
     }
 
+    @Test
     public void testGetNextNgramContext() {
         final NgramContext ngramContext_a = new NgramContext(new WordInfo("a"));
         final NgramContext ngramContext_b_a =
@@ -67,6 +80,7 @@
         assertEquals("c", ngramContext_c_bos.getNthPrevWord(1));
     }
 
+    @Test
     public void testExtractPrevWordsContextTest() {
         final NgramContext ngramContext_bos =
                 new NgramContext(WordInfo.BEGINNING_OF_SENTENCE_WORD_INFO);
@@ -92,6 +106,7 @@
         assertEquals("a", ngramContext_a_empty.extractPrevWordsContext());
     }
 
+    @Test
     public void testExtractPrevWordsContextArray() {
         final NgramContext ngramContext_bos =
                 new NgramContext(WordInfo.BEGINNING_OF_SENTENCE_WORD_INFO);
@@ -123,9 +138,10 @@
         assertEquals("a", ngramContext_a_empty.extractPrevWordsContextArray()[0]);
     }
 
+    @Test
     public void testGetNgramContextFromNthPreviousWord() {
         SpacingAndPunctuations spacingAndPunctuations = new SpacingAndPunctuations(
-                mContext.getResources());
+                InstrumentationRegistry.getTargetContext().getResources());
         assertEquals("<S>", NgramContextUtils.getNgramContextFromNthPreviousWord("",
                 spacingAndPunctuations, 1).extractPrevWordsContext());
         assertEquals("<S> b", NgramContextUtils.getNgramContextFromNthPreviousWord("a. b ",
diff --git a/tests/src/com/android/inputmethod/latin/PersonalDictionaryLookupTest.java b/tests/src/com/android/inputmethod/latin/PersonalDictionaryLookupTest.java
deleted file mode 100644
index c06aded..0000000
--- a/tests/src/com/android/inputmethod/latin/PersonalDictionaryLookupTest.java
+++ /dev/null
@@ -1,492 +0,0 @@
-/*
- * Copyright (C) 2015 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;
-
-import static com.android.inputmethod.latin.PersonalDictionaryLookup.ANY_LOCALE;
-
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.times;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.verifyNoMoreInteractions;
-
-import android.annotation.SuppressLint;
-import android.content.ContentResolver;
-import android.database.Cursor;
-import android.net.Uri;
-import android.provider.UserDictionary;
-import android.test.AndroidTestCase;
-import android.test.suitebuilder.annotation.SmallTest;
-import android.util.Log;
-
-import com.android.inputmethod.latin.PersonalDictionaryLookup.PersonalDictionaryListener;
-import com.android.inputmethod.latin.utils.ExecutorUtils;
-
-import java.util.HashSet;
-import java.util.Locale;
-import java.util.Set;
-
-/**
- * Unit tests for {@link PersonalDictionaryLookup}.
- *
- * Note, this test doesn't mock out the ContentResolver, in order to make sure
- * {@link PersonalDictionaryLookup} works in a real setting.
- */
-@SmallTest
-public class PersonalDictionaryLookupTest extends AndroidTestCase {
-    private static final String TAG = PersonalDictionaryLookupTest.class.getSimpleName();
-
-    private ContentResolver mContentResolver;
-    private HashSet<Uri> mAddedBackup;
-
-    @Override
-    protected void setUp() throws Exception {
-        super.setUp();
-        mContentResolver = mContext.getContentResolver();
-        mAddedBackup = new HashSet<Uri>();
-    }
-
-    @Override
-    protected void tearDown() throws Exception {
-        // Remove all entries added during this test.
-        for (Uri row : mAddedBackup) {
-            mContentResolver.delete(row, null, null);
-        }
-        mAddedBackup.clear();
-
-        super.tearDown();
-    }
-
-    /**
-     * Adds the given word to the personal dictionary.
-     *
-     * @param word the word to add
-     * @param locale the locale of the word to add
-     * @param frequency the frequency of the word to add
-     * @return the Uri for the given word
-     */
-    @SuppressLint("NewApi")
-    private Uri addWord(final String word, final Locale locale, int frequency, String shortcut) {
-        // Add the given word for the given locale.
-        UserDictionary.Words.addWord(mContext, word, frequency, shortcut, locale);
-        // Obtain an Uri for the given word.
-        Cursor cursor = mContentResolver.query(UserDictionary.Words.CONTENT_URI, null,
-                UserDictionary.Words.WORD + "='" + word + "'", null, null);
-        assertTrue(cursor.moveToFirst());
-        Uri uri = Uri.withAppendedPath(UserDictionary.Words.CONTENT_URI,
-                cursor.getString(cursor.getColumnIndex(UserDictionary.Words._ID)));
-        // Add the row to the backup for later clearing.
-        mAddedBackup.add(uri);
-        return uri;
-    }
-
-    /**
-     * Deletes the entry for the given word from UserDictionary.
-     *
-     * @param uri the Uri for the word as returned by addWord
-     */
-    private void deleteWord(Uri uri) {
-        // Remove the word from the backup so that it's not cleared again later.
-        mAddedBackup.remove(uri);
-        // Remove the word from the personal dictionary.
-        mContentResolver.delete(uri, null, null);
-    }
-
-    private PersonalDictionaryLookup setUpWord(final Locale locale) {
-        // Insert "foo" in the personal dictionary for the given locale.
-        addWord("foo", locale, 17, null);
-
-        // Create the PersonalDictionaryLookup and wait until it's loaded.
-        PersonalDictionaryLookup lookup =
-                new PersonalDictionaryLookup(mContext, ExecutorUtils.SPELLING);
-        lookup.open();
-        return lookup;
-    }
-
-    private PersonalDictionaryLookup setUpShortcut(final Locale locale) {
-        // Insert "shortcut" => "Expansion" in the personal dictionary for the given locale.
-        addWord("Expansion", locale, 17, "shortcut");
-
-        // Create the PersonalDictionaryLookup and wait until it's loaded.
-        PersonalDictionaryLookup lookup =
-                new PersonalDictionaryLookup(mContext, ExecutorUtils.SPELLING);
-        lookup.open();
-        return lookup;
-    }
-
-    private void verifyWordExists(final Set<String> set, final String word) {
-        assertTrue(set.contains(word));
-    }
-
-    private void verifyWordDoesNotExist(final Set<String> set, final String word) {
-        assertFalse(set.contains(word));
-    }
-
-    public void testShortcutKeyMatching() {
-        Log.d(TAG, "testShortcutKeyMatching");
-        PersonalDictionaryLookup lookup = setUpShortcut(Locale.US);
-
-        assertEquals("Expansion", lookup.expandShortcut("shortcut", Locale.US));
-        assertNull(lookup.expandShortcut("Shortcut", Locale.US));
-        assertNull(lookup.expandShortcut("SHORTCUT", Locale.US));
-        assertNull(lookup.expandShortcut("shortcu", Locale.US));
-        assertNull(lookup.expandShortcut("shortcutt", Locale.US));
-
-        lookup.close();
-    }
-
-    public void testShortcutMatchesInputCountry() {
-        Log.d(TAG, "testShortcutMatchesInputCountry");
-        PersonalDictionaryLookup lookup = setUpShortcut(Locale.US);
-
-        verifyWordExists(lookup.getShortcutsForLocale(Locale.US), "shortcut");
-        assertTrue(lookup.getShortcutsForLocale(Locale.UK).isEmpty());
-        assertTrue(lookup.getShortcutsForLocale(Locale.ENGLISH).isEmpty());
-        assertTrue(lookup.getShortcutsForLocale(Locale.FRENCH).isEmpty());
-        assertTrue(lookup.getShortcutsForLocale(ANY_LOCALE).isEmpty());
-
-        assertEquals("Expansion", lookup.expandShortcut("shortcut", Locale.US));
-        assertNull(lookup.expandShortcut("shortcut", Locale.UK));
-        assertNull(lookup.expandShortcut("shortcut", Locale.ENGLISH));
-        assertNull(lookup.expandShortcut("shortcut", Locale.FRENCH));
-        assertNull(lookup.expandShortcut("shortcut", ANY_LOCALE));
-
-        lookup.close();
-    }
-
-    public void testShortcutMatchesInputLanguage() {
-        Log.d(TAG, "testShortcutMatchesInputLanguage");
-        PersonalDictionaryLookup lookup = setUpShortcut(Locale.ENGLISH);
-
-        verifyWordExists(lookup.getShortcutsForLocale(Locale.US), "shortcut");
-        verifyWordExists(lookup.getShortcutsForLocale(Locale.UK), "shortcut");
-        verifyWordExists(lookup.getShortcutsForLocale(Locale.ENGLISH), "shortcut");
-        assertTrue(lookup.getShortcutsForLocale(Locale.FRENCH).isEmpty());
-        assertTrue(lookup.getShortcutsForLocale(ANY_LOCALE).isEmpty());
-
-        assertEquals("Expansion", lookup.expandShortcut("shortcut", Locale.US));
-        assertEquals("Expansion", lookup.expandShortcut("shortcut", Locale.UK));
-        assertEquals("Expansion", lookup.expandShortcut("shortcut", Locale.ENGLISH));
-        assertNull(lookup.expandShortcut("shortcut", Locale.FRENCH));
-        assertNull(lookup.expandShortcut("shortcut", ANY_LOCALE));
-
-        lookup.close();
-    }
-
-    public void testShortcutMatchesAnyLocale() {
-        PersonalDictionaryLookup lookup = setUpShortcut(PersonalDictionaryLookup.ANY_LOCALE);
-
-        verifyWordExists(lookup.getShortcutsForLocale(Locale.US), "shortcut");
-        verifyWordExists(lookup.getShortcutsForLocale(Locale.UK), "shortcut");
-        verifyWordExists(lookup.getShortcutsForLocale(Locale.ENGLISH), "shortcut");
-        verifyWordExists(lookup.getShortcutsForLocale(Locale.FRENCH), "shortcut");
-        verifyWordExists(lookup.getShortcutsForLocale(ANY_LOCALE), "shortcut");
-
-        assertEquals("Expansion", lookup.expandShortcut("shortcut", Locale.US));
-        assertEquals("Expansion", lookup.expandShortcut("shortcut", Locale.UK));
-        assertEquals("Expansion", lookup.expandShortcut("shortcut", Locale.ENGLISH));
-        assertEquals("Expansion", lookup.expandShortcut("shortcut", Locale.FRENCH));
-        assertEquals("Expansion", lookup.expandShortcut("shortcut", ANY_LOCALE));
-
-        lookup.close();
-    }
-
-    public void testExactLocaleMatch() {
-        Log.d(TAG, "testExactLocaleMatch");
-        PersonalDictionaryLookup lookup = setUpWord(Locale.US);
-
-        verifyWordExists(lookup.getWordsForLocale(Locale.US), "foo");
-        verifyWordDoesNotExist(lookup.getWordsForLocale(Locale.UK), "foo");
-        verifyWordDoesNotExist(lookup.getWordsForLocale(Locale.ENGLISH), "foo");
-        verifyWordDoesNotExist(lookup.getWordsForLocale(Locale.FRENCH), "foo");
-        verifyWordDoesNotExist(lookup.getWordsForLocale(ANY_LOCALE), "foo");
-
-        // Any capitalization variation should match.
-        assertTrue(lookup.isValidWord("foo", Locale.US));
-        assertTrue(lookup.isValidWord("Foo", Locale.US));
-        assertTrue(lookup.isValidWord("FOO", Locale.US));
-        // But similar looking words don't match.
-        assertFalse(lookup.isValidWord("fo", Locale.US));
-        assertFalse(lookup.isValidWord("fop", Locale.US));
-        assertFalse(lookup.isValidWord("fooo", Locale.US));
-        // Other locales, including more general locales won't match.
-        assertFalse(lookup.isValidWord("foo", Locale.ENGLISH));
-        assertFalse(lookup.isValidWord("foo", Locale.UK));
-        assertFalse(lookup.isValidWord("foo", Locale.FRENCH));
-        assertFalse(lookup.isValidWord("foo", ANY_LOCALE));
-
-        lookup.close();
-    }
-
-    public void testSubLocaleMatch() {
-        Log.d(TAG, "testSubLocaleMatch");
-        PersonalDictionaryLookup lookup = setUpWord(Locale.ENGLISH);
-
-        verifyWordExists(lookup.getWordsForLocale(Locale.US), "foo");
-        verifyWordExists(lookup.getWordsForLocale(Locale.UK), "foo");
-        verifyWordExists(lookup.getWordsForLocale(Locale.ENGLISH), "foo");
-        verifyWordDoesNotExist(lookup.getWordsForLocale(Locale.FRENCH), "foo");
-        verifyWordDoesNotExist(lookup.getWordsForLocale(ANY_LOCALE), "foo");
-
-        // Any capitalization variation should match for both en and en_US.
-        assertTrue(lookup.isValidWord("foo", Locale.ENGLISH));
-        assertTrue(lookup.isValidWord("foo", Locale.US));
-        assertTrue(lookup.isValidWord("Foo", Locale.US));
-        assertTrue(lookup.isValidWord("FOO", Locale.US));
-        // But similar looking words don't match.
-        assertFalse(lookup.isValidWord("fo", Locale.US));
-        assertFalse(lookup.isValidWord("fop", Locale.US));
-        assertFalse(lookup.isValidWord("fooo", Locale.US));
-
-        lookup.close();
-    }
-
-    public void testAllLocalesMatch() {
-        Log.d(TAG, "testAllLocalesMatch");
-        PersonalDictionaryLookup lookup = setUpWord(null);
-
-        verifyWordExists(lookup.getWordsForLocale(Locale.US), "foo");
-        verifyWordExists(lookup.getWordsForLocale(Locale.UK), "foo");
-        verifyWordExists(lookup.getWordsForLocale(Locale.ENGLISH), "foo");
-        verifyWordExists(lookup.getWordsForLocale(Locale.FRENCH), "foo");
-        verifyWordExists(lookup.getWordsForLocale(ANY_LOCALE), "foo");
-
-        // Any capitalization variation should match for fr, en and en_US.
-        assertTrue(lookup.isValidWord("foo", ANY_LOCALE));
-        assertTrue(lookup.isValidWord("foo", Locale.FRENCH));
-        assertTrue(lookup.isValidWord("foo", Locale.ENGLISH));
-        assertTrue(lookup.isValidWord("foo", Locale.US));
-        assertTrue(lookup.isValidWord("Foo", Locale.US));
-        assertTrue(lookup.isValidWord("FOO", Locale.US));
-        // But similar looking words don't match.
-        assertFalse(lookup.isValidWord("fo", Locale.US));
-        assertFalse(lookup.isValidWord("fop", Locale.US));
-        assertFalse(lookup.isValidWord("fooo", Locale.US));
-
-        lookup.close();
-    }
-
-    public void testMultipleLocalesMatch() {
-        Log.d(TAG, "testMultipleLocalesMatch");
-
-        // Insert "Foo" as capitalized in the personal dictionary under the en_US and en_CA and fr
-        // locales.
-        addWord("Foo", Locale.US, 17, null);
-        addWord("foO", Locale.CANADA, 17, null);
-        addWord("fOo", Locale.FRENCH, 17, null);
-
-        // Create the PersonalDictionaryLookup and wait until it's loaded.
-        PersonalDictionaryLookup lookup = new PersonalDictionaryLookup(mContext,
-                ExecutorUtils.SPELLING);
-        lookup.open();
-
-        // Both en_CA and en_US match.
-        assertTrue(lookup.isValidWord("foo", Locale.CANADA));
-        assertTrue(lookup.isValidWord("foo", Locale.US));
-        assertTrue(lookup.isValidWord("foo", Locale.FRENCH));
-        // Other locales, including more general locales won't match.
-        assertFalse(lookup.isValidWord("foo", Locale.ENGLISH));
-        assertFalse(lookup.isValidWord("foo", Locale.UK));
-        assertFalse(lookup.isValidWord("foo", ANY_LOCALE));
-
-        lookup.close();
-    }
-
-
-    public void testCaseMatchingForWordsAndShortcuts() {
-        Log.d(TAG, "testCaseMatchingForWordsAndShortcuts");
-        addWord("Foo", Locale.US, 17, "f");
-        addWord("bokabu", Locale.US, 17, "Bu");
-
-        // Create the PersonalDictionaryLookup and wait until it's loaded.
-        PersonalDictionaryLookup lookup = new PersonalDictionaryLookup(mContext,
-                ExecutorUtils.SPELLING);
-        lookup.open();
-
-        // Valid, inspite of capitalization in US but not in other
-        // locales.
-        assertTrue(lookup.isValidWord("Foo", Locale.US));
-        assertTrue(lookup.isValidWord("foo", Locale.US));
-        assertFalse(lookup.isValidWord("Foo", Locale.UK));
-        assertFalse(lookup.isValidWord("foo", Locale.UK));
-
-        // Valid in all forms in US.
-        assertTrue(lookup.isValidWord("bokabu", Locale.US));
-        assertTrue(lookup.isValidWord("BOKABU", Locale.US));
-        assertTrue(lookup.isValidWord("BokaBU", Locale.US));
-
-        // Correct capitalization; sensitive to shortcut casing & locale.
-        assertEquals("Foo", lookup.expandShortcut("f", Locale.US));
-        assertNull(lookup.expandShortcut("f", Locale.UK));
-
-        // Correct capitalization; sensitive to shortcut casing & locale.
-        assertEquals("bokabu", lookup.expandShortcut("Bu", Locale.US));
-        assertNull(lookup.expandShortcut("Bu", Locale.UK));
-        assertNull(lookup.expandShortcut("bu", Locale.US));
-
-        // Verify that raw strings are retained for #getWordsForLocale.
-        verifyWordExists(lookup.getWordsForLocale(Locale.US), "Foo");
-        verifyWordDoesNotExist(lookup.getWordsForLocale(Locale.US), "foo");
-    }
-
-    public void testManageListeners() {
-        Log.d(TAG, "testManageListeners");
-
-        PersonalDictionaryLookup lookup =
-                new PersonalDictionaryLookup(mContext, ExecutorUtils.SPELLING);
-
-        PersonalDictionaryListener listener = mock(PersonalDictionaryListener.class);
-        // Add the same listener a bunch of times. It doesn't make a difference.
-        lookup.addListener(listener);
-        lookup.addListener(listener);
-        lookup.addListener(listener);
-        lookup.notifyListeners();
-
-        verify(listener, times(1)).onUpdate();
-
-        // Remove the same listener a bunch of times. It doesn't make a difference.
-        lookup.removeListener(listener);
-        lookup.removeListener(listener);
-        lookup.removeListener(listener);
-        lookup.notifyListeners();
-
-        verifyNoMoreInteractions(listener);
-    }
-
-    public void testReload() {
-        Log.d(TAG, "testReload");
-
-        // Insert "foo".
-        Uri uri = addWord("foo", Locale.US, 17, null);
-
-        // Create the PersonalDictionaryLookup and wait until it's loaded.
-        PersonalDictionaryLookup lookup =
-                new PersonalDictionaryLookup(mContext, ExecutorUtils.SPELLING);
-        lookup.open();
-
-        // "foo" should match.
-        assertTrue(lookup.isValidWord("foo", Locale.US));
-
-        // "bar" shouldn't match.
-        assertFalse(lookup.isValidWord("bar", Locale.US));
-
-        // Now delete "foo" and add "bar".
-        deleteWord(uri);
-        addWord("bar", Locale.US, 18, null);
-
-        // Wait a little bit before expecting a change. The time we wait should be greater than
-        // PersonalDictionaryLookup.RELOAD_DELAY_MS.
-        try {
-            Thread.sleep(PersonalDictionaryLookup.RELOAD_DELAY_MS + 1000);
-        } catch (InterruptedException e) {
-        }
-
-        // Perform lookups again. Reload should have occured.
-        //
-        // "foo" should not match.
-        assertFalse(lookup.isValidWord("foo", Locale.US));
-
-        // "bar" should match.
-        assertTrue(lookup.isValidWord("bar", Locale.US));
-
-        lookup.close();
-    }
-
-    public void testDictionaryStats() {
-        Log.d(TAG, "testDictionaryStats");
-
-        // Insert "foo" and "bar". Only "foo" has a shortcut.
-        Uri uri = addWord("foo", Locale.GERMANY, 17, "f");
-        addWord("bar", Locale.GERMANY, 17, null);
-
-        // Create the PersonalDictionaryLookup and wait until it's loaded.
-        PersonalDictionaryLookup lookup =
-                new PersonalDictionaryLookup(mContext, ExecutorUtils.SPELLING);
-        lookup.open();
-
-        // "foo" should match.
-        assertTrue(lookup.isValidWord("foo", Locale.GERMANY));
-
-        // "bar" should match.
-        assertTrue(lookup.isValidWord("bar", Locale.GERMANY));
-
-        // "foo" should have a shortcut.
-        assertEquals("foo", lookup.expandShortcut("f", Locale.GERMANY));
-
-        // Now delete "foo".
-        deleteWord(uri);
-
-        // Wait a little bit before expecting a change. The time we wait should be greater than
-        // PersonalDictionaryLookup.RELOAD_DELAY_MS.
-        try {
-            Thread.sleep(PersonalDictionaryLookup.RELOAD_DELAY_MS + 1000);
-        } catch (InterruptedException e) {
-        }
-
-        // Perform lookups again. Reload should have occured.
-        //
-        // "foo" should not match.
-        assertFalse(lookup.isValidWord("foo", Locale.GERMANY));
-
-        // "foo" should not have a shortcut.
-        assertNull(lookup.expandShortcut("f", Locale.GERMANY));
-
-        // "bar" should still match.
-        assertTrue(lookup.isValidWord("bar", Locale.GERMANY));
-
-        lookup.close();
-    }
-
-    public void testClose() {
-        Log.d(TAG, "testClose");
-
-        // Insert "foo".
-        Uri uri = addWord("foo", Locale.US, 17, null);
-
-        // Create the PersonalDictionaryLookup and wait until it's loaded.
-        PersonalDictionaryLookup lookup =
-                new PersonalDictionaryLookup(mContext, ExecutorUtils.SPELLING);
-        lookup.open();
-
-        // "foo" should match.
-        assertTrue(lookup.isValidWord("foo", Locale.US));
-
-        // "bar" shouldn't match.
-        assertFalse(lookup.isValidWord("bar", Locale.US));
-
-        // Now close (prevents further reloads).
-        lookup.close();
-
-        // Now delete "foo" and add "bar".
-        deleteWord(uri);
-        addWord("bar", Locale.US, 18, null);
-
-        // Wait a little bit before expecting a change. The time we wait should be greater than
-        // PersonalDictionaryLookup.RELOAD_DELAY_MS.
-        try {
-            Thread.sleep(PersonalDictionaryLookup.RELOAD_DELAY_MS + 1000);
-        } catch (InterruptedException e) {
-        }
-
-        // Perform lookups again. Reload should not have occurred.
-        //
-        // "foo" should stil match.
-        assertTrue(lookup.isValidWord("foo", Locale.US));
-
-        // "bar" should still not match.
-        assertFalse(lookup.isValidWord("bar", Locale.US));
-    }
-}
diff --git a/tests/src/com/android/inputmethod/latin/RichInputConnectionAndTextRangeTests.java b/tests/src/com/android/inputmethod/latin/RichInputConnectionAndTextRangeTests.java
index 128f9f7..ac38468 100644
--- a/tests/src/com/android/inputmethod/latin/RichInputConnectionAndTextRangeTests.java
+++ b/tests/src/com/android/inputmethod/latin/RichInputConnectionAndTextRangeTests.java
@@ -16,12 +16,13 @@
 
 package com.android.inputmethod.latin;
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
 import android.content.res.Resources;
 import android.inputmethodservice.InputMethodService;
 import android.os.Parcel;
-import android.test.AndroidTestCase;
-import android.test.MoreAsserts;
-import android.test.suitebuilder.annotation.SmallTest;
 import android.text.SpannableString;
 import android.text.TextUtils;
 import android.text.style.SuggestionSpan;
@@ -30,6 +31,10 @@
 import android.view.inputmethod.InputConnection;
 import android.view.inputmethod.InputConnectionWrapper;
 
+import androidx.test.InstrumentationRegistry;
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
+
 import com.android.inputmethod.latin.common.Constants;
 import com.android.inputmethod.latin.common.StringUtils;
 import com.android.inputmethod.latin.settings.SpacingAndPunctuations;
@@ -38,25 +43,29 @@
 import com.android.inputmethod.latin.utils.ScriptUtils;
 import com.android.inputmethod.latin.utils.TextRange;
 
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
 import java.util.Locale;
 
 @SmallTest
-public class RichInputConnectionAndTextRangeTests extends AndroidTestCase {
+@RunWith(AndroidJUnit4.class)
+public class RichInputConnectionAndTextRangeTests {
 
     // The following is meant to be a reasonable default for
     // the "word_separators" resource.
     private SpacingAndPunctuations mSpacingAndPunctuations;
 
-    @Override
-    protected void setUp() throws Exception {
-        super.setUp();
+    @Before
+    public void setUp() throws Exception {
         final RunInLocale<SpacingAndPunctuations> job = new RunInLocale<SpacingAndPunctuations>() {
             @Override
             protected SpacingAndPunctuations job(final Resources res) {
                 return new SpacingAndPunctuations(res);
             }
         };
-        final Resources res = getContext().getResources();
+        final Resources res = InstrumentationRegistry.getTargetContext().getResources();
         mSpacingAndPunctuations = job.runInLocale(res, Locale.ENGLISH);
     }
 
@@ -156,6 +165,7 @@
     /**
      * Test for getting previous word (for bigram suggestions)
      */
+    @Test
     public void testGetPreviousWord() {
         // If one of the following cases breaks, the bigram suggestions won't work.
         assertEquals(NgramContextUtils.getNgramContextFromNthPreviousWord(
@@ -218,6 +228,7 @@
                 "abc 'def", mSpacingAndPunctuations, 2), NgramContext.EMPTY_PREV_WORDS_INFO);
     }
 
+    @Test
     public void testGetWordRangeAtCursor() {
         /**
          * Test logic in getting the word range at the cursor.
@@ -282,6 +293,7 @@
     /**
      * Test logic in getting the word range at the cursor.
      */
+    @Test
     public void testGetSuggestionSpansAtWord() {
         helpTestGetSuggestionSpansAtWord(10);
         helpTestGetSuggestionSpansAtWord(12);
@@ -309,7 +321,7 @@
         r = ic.getWordRangeAtCursor(SPACE, ScriptUtils.SCRIPT_LATIN);
         suggestions = r.getSuggestionSpansAtWord();
         assertEquals(suggestions.length, 1);
-        MoreAsserts.assertEquals(suggestions[0].getSuggestions(), SUGGESTIONS1);
+        assertEquals(suggestions[0].getSuggestions(), SUGGESTIONS1);
 
         // Test the case with 2 suggestion spans in the same place.
         text = new SpannableString("This is a string for test");
@@ -321,8 +333,8 @@
         r = ic.getWordRangeAtCursor(SPACE, ScriptUtils.SCRIPT_LATIN);
         suggestions = r.getSuggestionSpansAtWord();
         assertEquals(suggestions.length, 2);
-        MoreAsserts.assertEquals(suggestions[0].getSuggestions(), SUGGESTIONS1);
-        MoreAsserts.assertEquals(suggestions[1].getSuggestions(), SUGGESTIONS2);
+        assertEquals(suggestions[0].getSuggestions(), SUGGESTIONS1);
+        assertEquals(suggestions[1].getSuggestions(), SUGGESTIONS2);
 
         // Test a case with overlapping spans, 2nd extending past the start of the word
         text = new SpannableString("This is a string for test");
@@ -334,7 +346,7 @@
         r = ic.getWordRangeAtCursor(SPACE, ScriptUtils.SCRIPT_LATIN);
         suggestions = r.getSuggestionSpansAtWord();
         assertEquals(suggestions.length, 1);
-        MoreAsserts.assertEquals(suggestions[0].getSuggestions(), SUGGESTIONS1);
+        assertEquals(suggestions[0].getSuggestions(), SUGGESTIONS1);
 
         // Test a case with overlapping spans, 2nd extending past the end of the word
         text = new SpannableString("This is a string for test");
@@ -346,7 +358,7 @@
         r = ic.getWordRangeAtCursor(SPACE, ScriptUtils.SCRIPT_LATIN);
         suggestions = r.getSuggestionSpansAtWord();
         assertEquals(suggestions.length, 1);
-        MoreAsserts.assertEquals(suggestions[0].getSuggestions(), SUGGESTIONS1);
+        assertEquals(suggestions[0].getSuggestions(), SUGGESTIONS1);
 
         // Test a case with overlapping spans, 2nd extending past both ends of the word
         text = new SpannableString("This is a string for test");
@@ -358,7 +370,7 @@
         r = ic.getWordRangeAtCursor(SPACE, ScriptUtils.SCRIPT_LATIN);
         suggestions = r.getSuggestionSpansAtWord();
         assertEquals(suggestions.length, 1);
-        MoreAsserts.assertEquals(suggestions[0].getSuggestions(), SUGGESTIONS1);
+        assertEquals(suggestions[0].getSuggestions(), SUGGESTIONS1);
 
         // Test a case with overlapping spans, none right on the word
         text = new SpannableString("This is a string for test");
@@ -372,6 +384,7 @@
         assertEquals(suggestions.length, 0);
     }
 
+    @Test
     public void testCursorTouchingWord() {
         final MockInputMethodService ims = new MockInputMethodService();
         final RichInputConnection ic = new RichInputConnection(ims);
diff --git a/tests/src/com/android/inputmethod/latin/RichInputMethodSubtypeTests.java b/tests/src/com/android/inputmethod/latin/RichInputMethodSubtypeTests.java
index af94be6..578e6be 100644
--- a/tests/src/com/android/inputmethod/latin/RichInputMethodSubtypeTests.java
+++ b/tests/src/com/android/inputmethod/latin/RichInputMethodSubtypeTests.java
@@ -16,13 +16,20 @@
 
 package com.android.inputmethod.latin;
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
 import android.content.Context;
 import android.content.res.Resources;
-import android.test.AndroidTestCase;
-import android.test.suitebuilder.annotation.SmallTest;
 import android.view.inputmethod.InputMethodInfo;
 import android.view.inputmethod.InputMethodSubtype;
 
+import androidx.test.InstrumentationRegistry;
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
+
 import com.android.inputmethod.latin.R;
 import com.android.inputmethod.latin.RichInputMethodManager;
 import com.android.inputmethod.latin.RichInputMethodSubtype;
@@ -30,11 +37,17 @@
 import com.android.inputmethod.latin.utils.RunInLocale;
 import com.android.inputmethod.latin.utils.SubtypeLocaleUtils;
 
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
 import java.util.ArrayList;
 import java.util.Locale;
 
 @SmallTest
-public class RichInputMethodSubtypeTests extends AndroidTestCase {
+@RunWith(AndroidJUnit4.class)
+public class RichInputMethodSubtypeTests {
     // All input method subtypes of LatinIME.
     private final ArrayList<RichInputMethodSubtype> mSubtypesList = new ArrayList<>();
 
@@ -67,10 +80,9 @@
     RichInputMethodSubtype HI_LATN_DVORAK;
     RichInputMethodSubtype SR_LATN_QWERTY;
 
-    @Override
-    protected void setUp() throws Exception {
-        super.setUp();
-        final Context context = getContext();
+    @Before
+    public void setUp() throws Exception {
+        final Context context = InstrumentationRegistry.getTargetContext();
         mRes = context.getResources();
         RichInputMethodManager.init(context);
         mRichImm = RichInputMethodManager.getInstance();
@@ -152,13 +164,13 @@
         }
     }
 
-    @Override
-    protected void tearDown() throws Exception {
+    @After
+    public void tearDown() throws Exception {
         // Restore additional subtypes.
         mRichImm.setAdditionalInputMethodSubtypes(mSavedAddtionalSubtypes);
-        super.tearDown();
     }
 
+    @Test
     public void testAllFullDisplayNameForSpacebar() {
         for (final RichInputMethodSubtype subtype : mSubtypesList) {
             final String subtypeName = SubtypeLocaleUtils
@@ -174,7 +186,8 @@
         }
     }
 
-   public void testAllMiddleDisplayNameForSpacebar() {
+    @Test
+    public void testAllMiddleDisplayNameForSpacebar() {
         for (final RichInputMethodSubtype subtype : mSubtypesList) {
             final String subtypeName = SubtypeLocaleUtils
                     .getSubtypeDisplayNameInSystemLocale(subtype.getRawSubtype());
@@ -293,22 +306,27 @@
         }
     };
 
+    @Test
     public void testPredefinedSubtypesForSpacebarInEnglish() {
         testsPredefinedSubtypesForSpacebar.runInLocale(mRes, Locale.ENGLISH);
     }
 
+    @Test
     public void testAdditionalSubtypeForSpacebarInEnglish() {
         testsAdditionalSubtypesForSpacebar.runInLocale(mRes, Locale.ENGLISH);
     }
 
+    @Test
     public void testPredefinedSubtypesForSpacebarInFrench() {
         testsPredefinedSubtypesForSpacebar.runInLocale(mRes, Locale.FRENCH);
     }
 
+    @Test
     public void testAdditionalSubtypeForSpacebarInFrench() {
         testsAdditionalSubtypesForSpacebar.runInLocale(mRes, Locale.FRENCH);
     }
 
+    @Test
     public void testRichInputMethodSubtypeForNullInputMethodSubtype() {
         RichInputMethodSubtype subtype = RichInputMethodSubtype.getRichInputMethodSubtype(null);
         assertNotNull(subtype);
diff --git a/tests/src/com/android/inputmethod/latin/SuggestedWordsTests.java b/tests/src/com/android/inputmethod/latin/SuggestedWordsTests.java
index d465ce6..92bff0e 100644
--- a/tests/src/com/android/inputmethod/latin/SuggestedWordsTests.java
+++ b/tests/src/com/android/inputmethod/latin/SuggestedWordsTests.java
@@ -16,16 +16,24 @@
 
 package com.android.inputmethod.latin;
 
-import android.test.AndroidTestCase;
-import android.test.suitebuilder.annotation.SmallTest;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
 
 import com.android.inputmethod.latin.SuggestedWords.SuggestedWordInfo;
 
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
 import java.util.ArrayList;
 import java.util.Locale;
 
 @SmallTest
-public class SuggestedWordsTests extends AndroidTestCase {
+@RunWith(AndroidJUnit4.class)
+public class SuggestedWordsTests {
 
     /**
      * Helper method to create a dummy {@link SuggestedWordInfo} with specifying
@@ -80,30 +88,35 @@
         return returnedWordInfo;
     }
 
+    @Test
     public void testRemoveDupesNoDupes() {
         final ArrayList<SuggestedWordInfo> infos = createCorrectionWordInfos("a", "c");
         assertEquals(-1, SuggestedWordInfo.removeDups("b", infos));
         assertEquals(2, infos.size());
     }
 
+    @Test
     public void testRemoveDupesTypedWordNotDupe() {
         final ArrayList<SuggestedWordInfo> infos = createCorrectionWordInfos("a", "a", "c");
         assertEquals(-1, SuggestedWordInfo.removeDups("b", infos));
         assertEquals(2, infos.size());
     }
 
+    @Test
     public void testRemoveDupesTypedWordOnlyDupe() {
         final ArrayList<SuggestedWordInfo> infos = createCorrectionWordInfos("a", "b", "c");
         assertEquals(1, SuggestedWordInfo.removeDups("b", infos));
         assertEquals(2, infos.size());
     }
 
+    @Test
     public void testRemoveDupesTypedWordNotOnlyDupe() {
         final ArrayList<SuggestedWordInfo> infos = createCorrectionWordInfos("a", "b", "b", "c");
         assertEquals(1, SuggestedWordInfo.removeDups("b", infos));
         assertEquals(2, infos.size());
     }
 
+    @Test
     public void testGetTransformedSuggestedWordInfo() {
         SuggestedWordInfo result = transformWordInfo("word", 0);
         assertEquals(result.mWord, "word");
@@ -119,6 +132,7 @@
         assertEquals(result.mWord, "didn't''");
     }
 
+    @Test
     public void testGetTypedWordInfoOrNull() {
         final String TYPED_WORD = "typed";
         final SuggestedWordInfo TYPED_WORD_INFO = createTypedWordInfo(TYPED_WORD);
diff --git a/tests/src/com/android/inputmethod/latin/WordComposerTests.java b/tests/src/com/android/inputmethod/latin/WordComposerTests.java
index 8ae475f..4ac094b 100644
--- a/tests/src/com/android/inputmethod/latin/WordComposerTests.java
+++ b/tests/src/com/android/inputmethod/latin/WordComposerTests.java
@@ -16,18 +16,28 @@
 
 package com.android.inputmethod.latin;
 
-import android.test.AndroidTestCase;
-import android.test.suitebuilder.annotation.SmallTest;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
 
 import com.android.inputmethod.latin.common.Constants;
 import com.android.inputmethod.latin.common.CoordinateUtils;
 import com.android.inputmethod.latin.common.StringUtils;
 
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
 /**
  * Unit tests for WordComposer.
  */
 @SmallTest
-public class WordComposerTests extends AndroidTestCase {
+@RunWith(AndroidJUnit4.class)
+public class WordComposerTests {
+
+    @Test
     public void testMoveCursor() {
         final WordComposer wc = new WordComposer();
         // BMP is the Basic Multilingual Plane, as defined by Unicode. This includes
diff --git a/tests/src/com/android/inputmethod/latin/accounts/AccountsChangedReceiverTests.java b/tests/src/com/android/inputmethod/latin/accounts/AccountsChangedReceiverTests.java
index 8328179..86f453b 100644
--- a/tests/src/com/android/inputmethod/latin/accounts/AccountsChangedReceiverTests.java
+++ b/tests/src/com/android/inputmethod/latin/accounts/AccountsChangedReceiverTests.java
@@ -16,40 +16,55 @@
 
 package com.android.inputmethod.latin.accounts;
 
+import static org.junit.Assert.assertEquals;
+
 import android.accounts.AccountManager;
 import android.content.Context;
 import android.content.Intent;
 import android.content.SharedPreferences;
 import android.preference.PreferenceManager;
-import android.test.AndroidTestCase;
+
+import androidx.test.InstrumentationRegistry;
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
 
 import com.android.inputmethod.latin.settings.LocalSettingsConstants;
 
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
 /**
  * Tests for {@link AccountsChangedReceiver}.
  */
-public class AccountsChangedReceiverTests extends AndroidTestCase {
+@SmallTest
+@RunWith(AndroidJUnit4.class)
+public class AccountsChangedReceiverTests {
     private static final String ACCOUNT_1 = "account1@example.com";
     private static final String ACCOUNT_2 = "account2@example.com";
 
     private SharedPreferences mPrefs;
     private String mLastKnownAccount = null;
 
-    @Override
-    protected void setUp() throws Exception {
-        super.setUp();
+    private Context getContext() {
+        return InstrumentationRegistry.getTargetContext();
+    }
+
+    @Before
+    public void setUp() throws Exception {
         mPrefs = PreferenceManager.getDefaultSharedPreferences(getContext());
         // Keep track of the current account so that we restore it when the test finishes.
         mLastKnownAccount = mPrefs.getString(LocalSettingsConstants.PREF_ACCOUNT_NAME, null);
     }
 
-    @Override
-    protected void tearDown() throws Exception {
-        super.tearDown();
+    @After
+    public void tearDown() throws Exception {
         // Restore the account that was present before running the test.
         updateAccountName(mLastKnownAccount);
     }
 
+    @Test
     public void testUnknownIntent() {
         updateAccountName(ACCOUNT_1);
         AccountsChangedReceiver reciever = new AccountsChangedReceiver();
@@ -58,6 +73,7 @@
         assertAccountName(ACCOUNT_1);
     }
 
+    @Test
     public void testAccountRemoved() {
         updateAccountName(ACCOUNT_1);
         AccountsChangedReceiver reciever = new AccountsChangedReceiver() {
@@ -71,6 +87,7 @@
         assertAccountName(null);
     }
 
+    @Test
     public void testAccountRemoved_noAccounts() {
         updateAccountName(ACCOUNT_2);
         AccountsChangedReceiver reciever = new AccountsChangedReceiver() {
@@ -84,6 +101,7 @@
         assertAccountName(null);
     }
 
+    @Test
     public void testAccountNotRemoved() {
         updateAccountName(ACCOUNT_2);
         AccountsChangedReceiver reciever = new AccountsChangedReceiver() {
diff --git a/tests/src/com/android/inputmethod/latin/common/InputPointersTests.java b/tests/src/com/android/inputmethod/latin/common/InputPointersTests.java
index 6b3490d..29abec3 100644
--- a/tests/src/com/android/inputmethod/latin/common/InputPointersTests.java
+++ b/tests/src/com/android/inputmethod/latin/common/InputPointersTests.java
@@ -16,15 +16,27 @@
 
 package com.android.inputmethod.latin.common;
 
-import android.test.AndroidTestCase;
-import android.test.suitebuilder.annotation.SmallTest;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNotSame;
+import static org.junit.Assert.assertSame;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
 
 import java.util.Arrays;
 
 @SmallTest
-public class InputPointersTests extends AndroidTestCase {
+@RunWith(AndroidJUnit4.class)
+public class InputPointersTests {
     private static final int DEFAULT_CAPACITY = 48;
 
+    @Test
     public void testNewInstance() {
         final InputPointers src = new InputPointers(DEFAULT_CAPACITY);
         assertEquals("new instance size", 0, src.getPointerSize());
@@ -34,6 +46,7 @@
         assertNotNull("new instance times", src.getTimes());
     }
 
+    @Test
     public void testReset() {
         final InputPointers src = new InputPointers(DEFAULT_CAPACITY);
         final int[] xCoordinates = src.getXCoordinates();
@@ -49,6 +62,7 @@
         assertNotSame("times after reset", times, src.getTimes());
     }
 
+    @Test
     public void testAdd() {
         final InputPointers src = new InputPointers(DEFAULT_CAPACITY);
         final int limit = src.getXCoordinates().length * 2 + 10;
@@ -72,6 +86,7 @@
         }
     }
 
+    @Test
     public void testAddAt() {
         final InputPointers src = new InputPointers(DEFAULT_CAPACITY);
         final int limit = 1000, step = 100;
@@ -95,6 +110,7 @@
         }
     }
 
+    @Test
     public void testSet() {
         final InputPointers src = new InputPointers(DEFAULT_CAPACITY);
         final int limit = src.getXCoordinates().length * 2 + 10;
@@ -114,6 +130,7 @@
         assertSame("times after set", dst.getTimes(), src.getTimes());
     }
 
+    @Test
     public void testCopy() {
         final InputPointers src = new InputPointers(DEFAULT_CAPACITY);
         final int limit = 100;
@@ -142,6 +159,7 @@
                 dst.getTimes(), 0, src.getTimes(), 0, size);
     }
 
+    @Test
     public void testAppend() {
         final int dstLength = 50;
         final InputPointers dst = new InputPointers(DEFAULT_CAPACITY);
@@ -211,6 +229,7 @@
                 srcTimes.getPrimitiveArray(), startPos, dst.getTimes(), dstLength, srcLength);
     }
 
+    @Test
     public void testAppendResizableIntArray() {
         final int dstLength = 50;
         final InputPointers dst = new InputPointers(DEFAULT_CAPACITY);
@@ -296,6 +315,7 @@
         }
     }
 
+    @Test
     public void testShift() {
         final InputPointers src = new InputPointers(DEFAULT_CAPACITY);
         final int limit = 100;
diff --git a/tests/src/com/android/inputmethod/latin/common/ResizableIntArrayTests.java b/tests/src/com/android/inputmethod/latin/common/ResizableIntArrayTests.java
index bd1629f..5151b6b 100644
--- a/tests/src/com/android/inputmethod/latin/common/ResizableIntArrayTests.java
+++ b/tests/src/com/android/inputmethod/latin/common/ResizableIntArrayTests.java
@@ -16,15 +16,27 @@
 
 package com.android.inputmethod.latin.common;
 
-import android.test.AndroidTestCase;
-import android.test.suitebuilder.annotation.SmallTest;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNotSame;
+import static org.junit.Assert.assertSame;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
 
 import java.util.Arrays;
 
 @SmallTest
-public class ResizableIntArrayTests extends AndroidTestCase {
+@RunWith(AndroidJUnit4.class)
+public class ResizableIntArrayTests {
     private static final int DEFAULT_CAPACITY = 48;
 
+    @Test
     public void testNewInstance() {
         final ResizableIntArray src = new ResizableIntArray(DEFAULT_CAPACITY);
         final int[] array = src.getPrimitiveArray();
@@ -33,6 +45,7 @@
         assertEquals("new instance array length", DEFAULT_CAPACITY, array.length);
     }
 
+    @Test
     public void testAdd() {
         final ResizableIntArray src = new ResizableIntArray(DEFAULT_CAPACITY);
         final int[] array = src.getPrimitiveArray();
@@ -62,6 +75,7 @@
         }
     }
 
+    @Test
     public void testAddAt() {
         final ResizableIntArray src = new ResizableIntArray(DEFAULT_CAPACITY);
         final int limit = DEFAULT_CAPACITY * 10, step = DEFAULT_CAPACITY * 2;
@@ -76,6 +90,7 @@
         }
     }
 
+    @Test
     public void testGet() {
         final ResizableIntArray src = new ResizableIntArray(DEFAULT_CAPACITY);
         try {
@@ -105,6 +120,7 @@
         }
     }
 
+    @Test
     public void testReset() {
         final ResizableIntArray src = new ResizableIntArray(DEFAULT_CAPACITY);
         final int[] array = src.getPrimitiveArray();
@@ -136,6 +152,7 @@
         }
     }
 
+    @Test
     public void testSetLength() {
         final ResizableIntArray src = new ResizableIntArray(DEFAULT_CAPACITY);
         final int[] array = src.getPrimitiveArray();
@@ -172,6 +189,7 @@
         }
     }
 
+    @Test
     public void testSet() {
         final ResizableIntArray src = new ResizableIntArray(DEFAULT_CAPACITY);
         final int limit = DEFAULT_CAPACITY * 2 + 10;
@@ -186,6 +204,7 @@
         assertSame("array after set", dst.getPrimitiveArray(), src.getPrimitiveArray());
     }
 
+    @Test
     public void testCopy() {
         final ResizableIntArray src = new ResizableIntArray(DEFAULT_CAPACITY);
         for (int i = 0; i < DEFAULT_CAPACITY; i++) {
@@ -214,6 +233,7 @@
                 dst.getPrimitiveArray(), 0, src.getPrimitiveArray(), 0, dst.getLength());
     }
 
+    @Test
     public void testAppend() {
         final int srcLength = DEFAULT_CAPACITY;
         final ResizableIntArray src = new ResizableIntArray(srcLength);
@@ -264,6 +284,7 @@
                 srcLength);
     }
 
+    @Test
     public void testFill() {
         final int srcLength = DEFAULT_CAPACITY;
         final ResizableIntArray src = new ResizableIntArray(srcLength);
@@ -359,6 +380,7 @@
         }
     }
 
+    @Test
     public void testShift() {
         final ResizableIntArray src = new ResizableIntArray(DEFAULT_CAPACITY);
         final int limit = DEFAULT_CAPACITY * 10;
diff --git a/tests/src/com/android/inputmethod/latin/common/StringUtilsTests.java b/tests/src/com/android/inputmethod/latin/common/StringUtilsTests.java
index ec9d4be..36a4b91 100644
--- a/tests/src/com/android/inputmethod/latin/common/StringUtilsTests.java
+++ b/tests/src/com/android/inputmethod/latin/common/StringUtilsTests.java
@@ -16,13 +16,21 @@
 
 package com.android.inputmethod.latin.common;
 
-import android.test.AndroidTestCase;
-import android.test.suitebuilder.annotation.SmallTest;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
 
 import java.util.Locale;
 
 @SmallTest
-public class StringUtilsTests extends AndroidTestCase {
+@RunWith(AndroidJUnit4.class)
+public class StringUtilsTests {
     private static final Locale US = Locale.US;
     private static final Locale GERMAN = Locale.GERMAN;
     private static final Locale TURKEY = new Locale("tr", "TR");
@@ -34,6 +42,7 @@
                 StringUtils.toTitleCaseOfKeyLabel(lowerCase, locale));
     }
 
+    @Test
     public void test_toTitleCaseOfKeyLabel() {
         assert_toTitleCaseOfKeyLabel(US, null, null);
         assert_toTitleCaseOfKeyLabel(US, "", "");
@@ -116,6 +125,7 @@
                 StringUtils.toTitleCaseOfKeyCode(lowerCase, locale));
     }
 
+    @Test
     public void test_toTitleCaseOfKeyCode() {
         assert_toTitleCaseOfKeyCode(US, Constants.CODE_ENTER, Constants.CODE_ENTER);
         assert_toTitleCaseOfKeyCode(US, Constants.CODE_SPACE, Constants.CODE_SPACE);
@@ -148,6 +158,7 @@
                 StringUtils.capitalizeFirstCodePoint(text, locale));
     }
 
+    @Test
     public void test_capitalizeFirstCodePoint() {
         assert_capitalizeFirstCodePoint(US, "", "");
         assert_capitalizeFirstCodePoint(US, "a", "A");
@@ -167,6 +178,7 @@
                 StringUtils.capitalizeFirstAndDowncaseRest(text, locale));
     }
 
+    @Test
     public void test_capitalizeFirstAndDowncaseRest() {
         assert_capitalizeFirstAndDowncaseRest(US, "", "");
         assert_capitalizeFirstAndDowncaseRest(US, "a", "A");
@@ -185,6 +197,7 @@
         assert_capitalizeFirstAndDowncaseRest(GREECE, "ΆΝΕΣΗ", "Άνεση");
     }
 
+    @Test
     public void testContainsInArray() {
         assertFalse("empty array", StringUtils.containsInArray("key", new String[0]));
         assertFalse("not in 1 element", StringUtils.containsInArray("key", new String[] {
@@ -202,6 +215,7 @@
         }));
     }
 
+    @Test
     public void testContainsInCommaSplittableText() {
         assertFalse("null", StringUtils.containsInCommaSplittableText("key", null));
         assertFalse("empty", StringUtils.containsInCommaSplittableText("key", ""));
@@ -214,6 +228,7 @@
         assertTrue("in 2 elements", StringUtils.containsInCommaSplittableText("key", "key1,key"));
     }
 
+    @Test
     public void testRemoveFromCommaSplittableTextIfExists() {
         assertEquals("null", "", StringUtils.removeFromCommaSplittableTextIfExists("key", null));
         assertEquals("empty", "", StringUtils.removeFromCommaSplittableTextIfExists("key", ""));
@@ -239,7 +254,7 @@
                         "key", "key1,key,key3,key,key5"));
     }
 
-
+    @Test
     public void testCapitalizeFirstCodePoint() {
         assertEquals("SSaa",
                 StringUtils.capitalizeFirstCodePoint("ßaa", Locale.GERMAN));
@@ -259,6 +274,7 @@
                 StringUtils.capitalizeFirstCodePoint("A", Locale.ENGLISH));
     }
 
+    @Test
     public void testCapitalizeFirstAndDowncaseRest() {
         assertEquals("SSaa",
                 StringUtils.capitalizeFirstAndDowncaseRest("ßaa", Locale.GERMAN));
@@ -278,6 +294,7 @@
                 StringUtils.capitalizeFirstAndDowncaseRest("A", Locale.ENGLISH));
     }
 
+    @Test
     public void testGetCapitalizationType() {
         assertEquals(StringUtils.CAPITALIZE_NONE,
                 StringUtils.getCapitalizationType("capitalize"));
@@ -301,6 +318,7 @@
                 StringUtils.getCapitalizationType(""));
     }
 
+    @Test
     public void testIsIdenticalAfterUpcaseIsIdenticalAfterDowncase() {
         assertFalse(StringUtils.isIdenticalAfterUpcase("capitalize"));
         assertTrue(StringUtils.isIdenticalAfterDowncase("capitalize"));
@@ -337,6 +355,7 @@
             StringUtils.toSortedCodePointArray(" \n.!?*()&");
     private static final int[] WORD_SEPARATORS = StringUtils.toSortedCodePointArray(" \n.!?*,();&");
 
+    @Test
     public void testCapitalizeEachWord() {
         checkCapitalize("", "", SPACE, Locale.ENGLISH);
         checkCapitalize("test", "Test", SPACE, Locale.ENGLISH);
@@ -367,6 +386,7 @@
                 WORD_SEPARATORS, Locale.ENGLISH);
     }
 
+    @Test
     public void testLooksLikeURL() {
         assertTrue(StringUtils.lastPartLooksLikeURL("http://www.google."));
         assertFalse(StringUtils.lastPartLooksLikeURL("word wo"));
@@ -389,6 +409,7 @@
         assertTrue(StringUtils.lastPartLooksLikeURL(".abc/def"));
     }
 
+    @Test
     public void testHexStringUtils() {
         final byte[] bytes = new byte[] { (byte)0x01, (byte)0x11, (byte)0x22, (byte)0x33,
                 (byte)0x55, (byte)0x88, (byte)0xEE };
@@ -401,6 +422,7 @@
         assertTrue(bytesStr.equals(bytesStr2));
     }
 
+    @Test
     public void testToCodePointArray() {
         final String STR_WITH_SUPPLEMENTARY_CHAR = "abcde\uD861\uDED7fgh\u0000\u2002\u2003\u3000xx";
         final int[] EXPECTED_RESULT = new int[] { 'a', 'b', 'c', 'd', 'e', 0x286D7, 'f', 'g', 'h',
@@ -414,6 +436,7 @@
         }
     }
 
+    @Test
     public void testCopyCodePointsAndReturnCodePointCount() {
         final String STR_WITH_SUPPLEMENTARY_CHAR = "AbcDE\uD861\uDED7fGh\u0000\u2002\u3000あx";
         final int[] EXPECTED_RESULT = new int[] { 'A', 'b', 'c', 'D', 'E', 0x286D7,
@@ -465,6 +488,7 @@
                 exceptionHappened);
     }
 
+    @Test
     public void testGetTrailingSingleQuotesCount() {
         assertEquals(0, StringUtils.getTrailingSingleQuotesCount(""));
         assertEquals(1, StringUtils.getTrailingSingleQuotesCount("'"));
diff --git a/tests/src/com/android/inputmethod/latin/common/UnicodeSurrogateTests.java b/tests/src/com/android/inputmethod/latin/common/UnicodeSurrogateTests.java
index 59bb082..adfbbf4 100644
--- a/tests/src/com/android/inputmethod/latin/common/UnicodeSurrogateTests.java
+++ b/tests/src/com/android/inputmethod/latin/common/UnicodeSurrogateTests.java
@@ -16,18 +16,27 @@
 
 package com.android.inputmethod.latin.common;
 
-import android.test.AndroidTestCase;
-import android.test.suitebuilder.annotation.SmallTest;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
 
 @SmallTest
-public class UnicodeSurrogateTests extends AndroidTestCase {
+@RunWith(AndroidJUnit4.class)
+public class UnicodeSurrogateTests {
 
+    @Test
     public void testIsLowSurrogate() {
         assertFalse(UnicodeSurrogate.isLowSurrogate('\uD7FF'));
         assertTrue(UnicodeSurrogate.isLowSurrogate('\uD83D'));
         assertFalse(UnicodeSurrogate.isLowSurrogate('\uDC00'));
     }
 
+    @Test
     public void testIsHighSurrogate() {
         assertFalse(UnicodeSurrogate.isHighSurrogate('\uDBFF'));
         assertTrue(UnicodeSurrogate.isHighSurrogate('\uDE25'));
diff --git a/tests/src/com/android/inputmethod/latin/makedict/BinaryDictDecoderEncoderTests.java b/tests/src/com/android/inputmethod/latin/makedict/BinaryDictDecoderEncoderTests.java
new file mode 100644
index 0000000..39da9fc
--- /dev/null
+++ b/tests/src/com/android/inputmethod/latin/makedict/BinaryDictDecoderEncoderTests.java
@@ -0,0 +1,677 @@
+/*
+ * 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.makedict;
+
+import android.test.AndroidTestCase;
+import android.test.suitebuilder.annotation.LargeTest;
+import android.util.Log;
+import android.util.Pair;
+import android.util.SparseArray;
+
+import com.android.inputmethod.latin.BinaryDictionary;
+import com.android.inputmethod.latin.common.CodePointUtils;
+import com.android.inputmethod.latin.makedict.BinaryDictDecoderUtils.CharEncoding;
+import com.android.inputmethod.latin.makedict.BinaryDictDecoderUtils.DictBuffer;
+import com.android.inputmethod.latin.makedict.FormatSpec.FormatOptions;
+import com.android.inputmethod.latin.makedict.FusionDictionary.PtNode;
+import com.android.inputmethod.latin.makedict.FusionDictionary.PtNodeArray;
+import com.android.inputmethod.latin.utils.BinaryDictionaryUtils;
+import com.android.inputmethod.latin.utils.ByteArrayDictBuffer;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map.Entry;
+import java.util.Random;
+import java.util.Set;
+import java.util.TreeMap;
+
+/**
+ * Unit tests for BinaryDictDecoderUtils and BinaryDictEncoderUtils.
+ */
+@LargeTest
+public class BinaryDictDecoderEncoderTests extends AndroidTestCase {
+    private static final String TAG = BinaryDictDecoderEncoderTests.class.getSimpleName();
+    private static final int DEFAULT_MAX_UNIGRAMS = 300;
+    private static final int DEFAULT_CODE_POINT_SET_SIZE = 50;
+    private static final int LARGE_CODE_POINT_SET_SIZE = 300;
+    private static final int UNIGRAM_FREQ = 10;
+    private static final int BIGRAM_FREQ = 50;
+    private static final int TOLERANCE_OF_BIGRAM_FREQ = 5;
+
+    private static final ArrayList<String> sWords = new ArrayList<>();
+    private static final ArrayList<String> sWordsWithVariousCodePoints = new ArrayList<>();
+    private static final SparseArray<List<Integer>> sEmptyBigrams = new SparseArray<>();
+    private static final SparseArray<List<Integer>> sStarBigrams = new SparseArray<>();
+    private static final SparseArray<List<Integer>> sChainBigrams = new SparseArray<>();
+
+    final Random mRandom;
+
+    public BinaryDictDecoderEncoderTests() {
+        this(System.currentTimeMillis(), DEFAULT_MAX_UNIGRAMS);
+    }
+
+    public BinaryDictDecoderEncoderTests(final long seed, final int maxUnigrams) {
+        super();
+        BinaryDictionaryUtils.setCurrentTimeForTest(0);
+        Log.e(TAG, "Testing dictionary: seed is " + seed);
+        mRandom = new Random(seed);
+        sWords.clear();
+        sWordsWithVariousCodePoints.clear();
+        generateWords(maxUnigrams, mRandom);
+
+        for (int i = 0; i < sWords.size(); ++i) {
+            sChainBigrams.put(i, new ArrayList<Integer>());
+            if (i > 0) {
+                sChainBigrams.get(i - 1).add(i);
+            }
+        }
+
+        sStarBigrams.put(0, new ArrayList<Integer>());
+        // MAX - 1 because we added one above already
+        final int maxBigrams = Math.min(sWords.size(), FormatSpec.MAX_BIGRAMS_IN_A_PTNODE - 1);
+        for (int i = 1; i < maxBigrams; ++i) {
+            sStarBigrams.get(0).add(i);
+        }
+    }
+
+    @Override
+    protected void setUp() throws Exception {
+        super.setUp();
+        BinaryDictionaryUtils.setCurrentTimeForTest(0);
+    }
+
+    @Override
+    protected void tearDown() throws Exception {
+        // Quit test mode.
+        BinaryDictionaryUtils.setCurrentTimeForTest(-1);
+        super.tearDown();
+    }
+
+    private static void generateWords(final int number, final Random random) {
+        final int[] codePointSet = CodePointUtils.generateCodePointSet(DEFAULT_CODE_POINT_SET_SIZE,
+                random);
+        final Set<String> wordSet = new HashSet<>();
+        while (wordSet.size() < number) {
+            wordSet.add(CodePointUtils.generateWord(random, codePointSet));
+        }
+        sWords.addAll(wordSet);
+
+        final int[] largeCodePointSet = CodePointUtils.generateCodePointSet(
+                LARGE_CODE_POINT_SET_SIZE, random);
+        wordSet.clear();
+        while (wordSet.size() < number) {
+            wordSet.add(CodePointUtils.generateWord(random, largeCodePointSet));
+        }
+        sWordsWithVariousCodePoints.addAll(wordSet);
+    }
+
+    /**
+     * Adds unigrams to the dictionary.
+     */
+    private static void addUnigrams(final int number, final FusionDictionary dict,
+            final List<String> words) {
+        for (int i = 0; i < number; ++i) {
+            final String word = words.get(i);
+            final ArrayList<WeightedString> shortcuts = new ArrayList<>();
+            dict.add(word, new ProbabilityInfo(UNIGRAM_FREQ), false /* isNotAWord */,
+                    false /* isPossiblyOffensive */);
+        }
+    }
+
+    private static void addBigrams(final FusionDictionary dict,
+            final List<String> words,
+            final SparseArray<List<Integer>> bigrams) {
+        for (int i = 0; i < bigrams.size(); ++i) {
+            final int w1 = bigrams.keyAt(i);
+            for (int w2 : bigrams.valueAt(i)) {
+                dict.setBigram(words.get(w1), words.get(w2), new ProbabilityInfo(BIGRAM_FREQ));
+            }
+        }
+    }
+
+//    The following is useful to dump the dictionary into a textual file, but it can't compile
+//    on-device, so it's commented out.
+//    private void dumpToCombinedFileForDebug(final FusionDictionary dict, final String filename)
+//            throws IOException {
+//        com.android.inputmethod.latin.dicttool.CombinedInputOutput.writeDictionaryCombined(
+//                new java.io.FileWriter(new File(filename)), dict);
+//    }
+
+    private static long timeWritingDictToFile(final File file, final FusionDictionary dict,
+            final FormatSpec.FormatOptions formatOptions) {
+
+        long now = -1, diff = -1;
+
+        try {
+            final DictEncoder dictEncoder = BinaryDictUtils.getDictEncoder(file, formatOptions);
+
+            now = System.currentTimeMillis();
+            // If you need to dump the dict to a textual file, uncomment the line below and the
+            // function above
+            // dumpToCombinedFileForDebug(file, "/tmp/foo");
+            dictEncoder.writeDictionary(dict, formatOptions);
+            diff = System.currentTimeMillis() - now;
+        } catch (IOException e) {
+            Log.e(TAG, "IO exception while writing file", e);
+        } catch (UnsupportedFormatException e) {
+            Log.e(TAG, "UnsupportedFormatException", e);
+        }
+
+        return diff;
+    }
+
+    private static void checkDictionary(final FusionDictionary dict, final List<String> words,
+            final SparseArray<List<Integer>> bigrams) {
+        assertNotNull(dict);
+
+        // check unigram
+        for (final String word : words) {
+            final PtNode ptNode = FusionDictionary.findWordInTree(dict.mRootNodeArray, word);
+            assertNotNull(ptNode);
+        }
+
+        // check bigram
+        for (int i = 0; i < bigrams.size(); ++i) {
+            final int w1 = bigrams.keyAt(i);
+            for (final int w2 : bigrams.valueAt(i)) {
+                final PtNode ptNode = FusionDictionary.findWordInTree(dict.mRootNodeArray,
+                        words.get(w1));
+                assertNotNull(words.get(w1) + "," + words.get(w2), ptNode.getBigram(words.get(w2)));
+            }
+        }
+    }
+
+    private static String outputOptions(final int bufferType,
+            final FormatSpec.FormatOptions formatOptions) {
+        final String result = " : buffer type = "
+                + ((bufferType == BinaryDictUtils.USE_BYTE_BUFFER) ? "byte buffer" : "byte array");
+        return result + " : version = " + formatOptions.mVersion;
+    }
+
+    // Tests for readDictionaryBinary and writeDictionaryBinary
+
+    private static long timeReadingAndCheckDict(final File file, final List<String> words,
+            final SparseArray<List<Integer>> bigrams, final int bufferType) {
+        long now, diff = -1;
+
+        FusionDictionary dict = null;
+        try {
+            final DictDecoder dictDecoder = BinaryDictIOUtils.getDictDecoder(file, 0, file.length(),
+                    bufferType);
+            now = System.currentTimeMillis();
+            dict = dictDecoder.readDictionaryBinary(false /* deleteDictIfBroken */);
+            diff  = System.currentTimeMillis() - now;
+        } catch (IOException e) {
+            Log.e(TAG, "IOException while reading dictionary", e);
+        } catch (UnsupportedFormatException e) {
+            Log.e(TAG, "Unsupported format", e);
+        }
+
+        checkDictionary(dict, words, bigrams);
+        return diff;
+    }
+
+    // Tests for readDictionaryBinary and writeDictionaryBinary
+    private String runReadAndWrite(final List<String> words,
+            final SparseArray<List<Integer>> bigrams,
+            final int bufferType, final FormatSpec.FormatOptions formatOptions,
+            final String message) {
+
+        final String dictName = "runReadAndWrite";
+        final String dictVersion = Long.toString(System.currentTimeMillis());
+        final File file = BinaryDictUtils.getDictFile(dictName, dictVersion, formatOptions,
+                getContext().getCacheDir());
+
+        final FusionDictionary dict = new FusionDictionary(new PtNodeArray(),
+                BinaryDictUtils.makeDictionaryOptions(dictName, dictVersion, formatOptions));
+        addUnigrams(words.size(), dict, words);
+        addBigrams(dict, words, bigrams);
+        checkDictionary(dict, words, bigrams);
+
+        final long write = timeWritingDictToFile(file, dict, formatOptions);
+        final long read = timeReadingAndCheckDict(file, words, bigrams, bufferType);
+
+        return "PROF: read=" + read + "ms, write=" + write + "ms :" + message
+                + " : " + outputOptions(bufferType, formatOptions);
+    }
+
+    private void runReadAndWriteTests(final List<String> results, final int bufferType,
+            final FormatSpec.FormatOptions formatOptions) {
+        results.add(runReadAndWrite(sWords, sEmptyBigrams, bufferType,
+                formatOptions, "unigram"));
+        results.add(runReadAndWrite(sWords, sChainBigrams, bufferType,
+                formatOptions, "chain"));
+        results.add(runReadAndWrite(sWords, sStarBigrams, bufferType,
+                formatOptions, "star"));
+        results.add(runReadAndWrite(sWords, sEmptyBigrams, bufferType, formatOptions,
+                "unigram with shortcuts"));
+        results.add(runReadAndWrite(sWords, sChainBigrams, bufferType, formatOptions,
+                "chain with shortcuts"));
+        results.add(runReadAndWrite(sWords, sStarBigrams, bufferType, formatOptions,
+                "star with shortcuts"));
+        results.add(runReadAndWrite(sWordsWithVariousCodePoints, sEmptyBigrams,
+                bufferType, formatOptions,
+                "unigram with various code points"));
+    }
+
+    public void testCharacterTableIsPresent() throws IOException, UnsupportedFormatException {
+        final String[] wordSource = {"words", "used", "for", "testing", "a", "code point", "table"};
+        final List<String> words = Arrays.asList(wordSource);
+        final String correctCodePointTable = "toesdrniawuplgfcb ";
+        final String dictName = "codePointTableTest";
+        final String dictVersion = Long.toString(System.currentTimeMillis());
+        final String codePointTableAttribute = DictionaryHeader.CODE_POINT_TABLE_KEY;
+        final File file = BinaryDictUtils.getDictFile(dictName, dictVersion,
+                BinaryDictUtils.STATIC_OPTIONS, getContext().getCacheDir());
+
+        // Write a test dictionary
+        final DictEncoder dictEncoder = new Ver2DictEncoder(file,
+                Ver2DictEncoder.CODE_POINT_TABLE_ON);
+        final FormatSpec.FormatOptions formatOptions =
+                new FormatSpec.FormatOptions(
+                        FormatSpec.MINIMUM_SUPPORTED_STATIC_VERSION);
+        final FusionDictionary sourcedict = new FusionDictionary(new PtNodeArray(),
+                BinaryDictUtils.makeDictionaryOptions(dictName, dictVersion, formatOptions));
+        addUnigrams(words.size(), sourcedict, words);
+        dictEncoder.writeDictionary(sourcedict, formatOptions);
+
+        // Read the dictionary
+        final DictDecoder dictDecoder = BinaryDictIOUtils.getDictDecoder(file, 0, file.length(),
+                DictDecoder.USE_BYTEARRAY);
+        final DictionaryHeader fileHeader = dictDecoder.readHeader();
+        // Check if codePointTable is present
+        assertTrue("codePointTable is not present",
+                fileHeader.mDictionaryOptions.mAttributes.containsKey(codePointTableAttribute));
+        final String codePointTable =
+                fileHeader.mDictionaryOptions.mAttributes.get(codePointTableAttribute);
+        // Check if codePointTable is correct
+        assertEquals("codePointTable is incorrect", codePointTable, correctCodePointTable);
+    }
+
+    // Unit test for CharEncoding.readString and CharEncoding.writeString.
+    public void testCharEncoding() {
+        // the max length of a word in sWords is less than 50.
+        // See generateWords.
+        final byte[] buffer = new byte[50 * 3];
+        final DictBuffer dictBuffer = new ByteArrayDictBuffer(buffer);
+        for (final String word : sWords) {
+            Arrays.fill(buffer, (byte) 0);
+            CharEncoding.writeString(buffer, 0, word, null);
+            dictBuffer.position(0);
+            final String str = CharEncoding.readString(dictBuffer);
+            assertEquals(word, str);
+        }
+    }
+
+    public void testReadAndWriteWithByteBuffer() {
+        final List<String> results = new ArrayList<>();
+
+        runReadAndWriteTests(results, BinaryDictUtils.USE_BYTE_BUFFER,
+                BinaryDictUtils.STATIC_OPTIONS);
+        runReadAndWriteTests(results, BinaryDictUtils.USE_BYTE_BUFFER,
+                BinaryDictUtils.DYNAMIC_OPTIONS_WITHOUT_TIMESTAMP);
+        runReadAndWriteTests(results, BinaryDictUtils.USE_BYTE_BUFFER,
+                BinaryDictUtils.DYNAMIC_OPTIONS_WITH_TIMESTAMP);
+        for (final String result : results) {
+            Log.d(TAG, result);
+        }
+    }
+
+    public void testReadAndWriteWithByteArray() {
+        final List<String> results = new ArrayList<>();
+
+        runReadAndWriteTests(results, BinaryDictUtils.USE_BYTE_ARRAY,
+                BinaryDictUtils.STATIC_OPTIONS);
+        runReadAndWriteTests(results, BinaryDictUtils.USE_BYTE_ARRAY,
+                BinaryDictUtils.DYNAMIC_OPTIONS_WITHOUT_TIMESTAMP);
+        runReadAndWriteTests(results, BinaryDictUtils.USE_BYTE_ARRAY,
+                BinaryDictUtils.DYNAMIC_OPTIONS_WITH_TIMESTAMP);
+
+        for (final String result : results) {
+            Log.d(TAG, result);
+        }
+    }
+
+    // Tests for readUnigramsAndBigramsBinary
+
+    private static void checkWordMap(final List<String> expectedWords,
+            final SparseArray<List<Integer>> expectedBigrams,
+            final TreeMap<Integer, String> resultWords,
+            final TreeMap<Integer, Integer> resultFrequencies,
+            final TreeMap<Integer, ArrayList<PendingAttribute>> resultBigrams,
+            final boolean checkProbability) {
+        // check unigrams
+        final Set<String> actualWordsSet = new HashSet<>(resultWords.values());
+        final Set<String> expectedWordsSet = new HashSet<>(expectedWords);
+        assertEquals(actualWordsSet, expectedWordsSet);
+        if (checkProbability) {
+            for (int freq : resultFrequencies.values()) {
+                assertEquals(freq, UNIGRAM_FREQ);
+            }
+        }
+
+        // check bigrams
+        final HashMap<String, Set<String>> expBigrams = new HashMap<>();
+        for (int i = 0; i < expectedBigrams.size(); ++i) {
+            final String word1 = expectedWords.get(expectedBigrams.keyAt(i));
+            for (int w2 : expectedBigrams.valueAt(i)) {
+                if (expBigrams.get(word1) == null) {
+                    expBigrams.put(word1, new HashSet<String>());
+                }
+                expBigrams.get(word1).add(expectedWords.get(w2));
+            }
+        }
+
+        final HashMap<String, Set<String>> actBigrams = new HashMap<>();
+        for (Entry<Integer, ArrayList<PendingAttribute>> entry : resultBigrams.entrySet()) {
+            final String word1 = resultWords.get(entry.getKey());
+            final int unigramFreq = resultFrequencies.get(entry.getKey());
+            for (PendingAttribute attr : entry.getValue()) {
+                final String word2 = resultWords.get(attr.mAddress);
+                if (actBigrams.get(word1) == null) {
+                    actBigrams.put(word1, new HashSet<String>());
+                }
+                actBigrams.get(word1).add(word2);
+
+                if (checkProbability) {
+                    final int bigramFreq = BinaryDictIOUtils.reconstructBigramFrequency(
+                            unigramFreq, attr.mFrequency);
+                    assertTrue(Math.abs(bigramFreq - BIGRAM_FREQ) < TOLERANCE_OF_BIGRAM_FREQ);
+                }
+            }
+        }
+        assertEquals(actBigrams, expBigrams);
+    }
+
+    private static long timeAndCheckReadUnigramsAndBigramsBinary(final File file,
+            final List<String> words, final SparseArray<List<Integer>> bigrams,
+            final int bufferType, final boolean checkProbability) {
+        final TreeMap<Integer, String> resultWords = new TreeMap<>();
+        final TreeMap<Integer, ArrayList<PendingAttribute>> resultBigrams = new TreeMap<>();
+        final TreeMap<Integer, Integer> resultFreqs = new TreeMap<>();
+
+        long now = -1, diff = -1;
+        try {
+            final DictDecoder dictDecoder = BinaryDictIOUtils.getDictDecoder(file, 0, file.length(),
+                    bufferType);
+            now = System.currentTimeMillis();
+            dictDecoder.readUnigramsAndBigramsBinary(resultWords, resultFreqs, resultBigrams);
+            diff = System.currentTimeMillis() - now;
+        } catch (IOException e) {
+            Log.e(TAG, "IOException", e);
+        } catch (UnsupportedFormatException e) {
+            Log.e(TAG, "UnsupportedFormatException", e);
+        }
+
+        checkWordMap(words, bigrams, resultWords, resultFreqs, resultBigrams, checkProbability);
+        return diff;
+    }
+
+    private String runReadUnigramsAndBigramsBinary(final ArrayList<String> words,
+            final SparseArray<List<Integer>> bigrams, final int bufferType,
+            final FormatSpec.FormatOptions formatOptions, final String message) {
+        final String dictName = "runReadUnigrams";
+        final String dictVersion = Long.toString(System.currentTimeMillis());
+        final File file = BinaryDictUtils.getDictFile(dictName, dictVersion, formatOptions,
+                getContext().getCacheDir());
+
+        // making the dictionary from lists of words.
+        final FusionDictionary dict = new FusionDictionary(new PtNodeArray(),
+                BinaryDictUtils.makeDictionaryOptions(dictName, dictVersion, formatOptions));
+        addUnigrams(words.size(), dict, words);
+        addBigrams(dict, words, bigrams);
+
+        timeWritingDictToFile(file, dict, formatOptions);
+
+        // Caveat: Currently, the Java code to read a v4 dictionary doesn't calculate the
+        // probability when there's a timestamp for the entry.
+        // TODO: Abandon the Java code, and implement the v4 dictionary reading code in native.
+        long wordMap = timeAndCheckReadUnigramsAndBigramsBinary(file, words, bigrams, bufferType,
+                !formatOptions.mHasTimestamp /* checkProbability */);
+        long fullReading = timeReadingAndCheckDict(file, words, bigrams,
+                bufferType);
+
+        return "readDictionaryBinary=" + fullReading + ", readUnigramsAndBigramsBinary=" + wordMap
+                + " : " + message + " : " + outputOptions(bufferType, formatOptions);
+    }
+
+    private void runReadUnigramsAndBigramsTests(final ArrayList<String> results,
+            final int bufferType, final FormatSpec.FormatOptions formatOptions) {
+        results.add(runReadUnigramsAndBigramsBinary(sWords, sEmptyBigrams, bufferType,
+                formatOptions, "unigram"));
+        results.add(runReadUnigramsAndBigramsBinary(sWords, sChainBigrams, bufferType,
+                formatOptions, "chain"));
+        results.add(runReadUnigramsAndBigramsBinary(sWords, sStarBigrams, bufferType,
+                formatOptions, "star"));
+    }
+
+    public void testReadUnigramsAndBigramsBinaryWithByteBuffer() {
+        final ArrayList<String> results = new ArrayList<>();
+
+        runReadUnigramsAndBigramsTests(results, BinaryDictUtils.USE_BYTE_BUFFER,
+                BinaryDictUtils.STATIC_OPTIONS);
+
+        for (final String result : results) {
+            Log.d(TAG, result);
+        }
+    }
+
+    public void testReadUnigramsAndBigramsBinaryWithByteArray() {
+        final ArrayList<String> results = new ArrayList<>();
+
+        runReadUnigramsAndBigramsTests(results, BinaryDictUtils.USE_BYTE_ARRAY,
+                BinaryDictUtils.STATIC_OPTIONS);
+
+        for (final String result : results) {
+            Log.d(TAG, result);
+        }
+    }
+
+    // Tests for getTerminalPosition
+    private static String getWordFromBinary(final DictDecoder dictDecoder, final int address) {
+        if (dictDecoder.getPosition() != 0) dictDecoder.setPosition(0);
+
+        DictionaryHeader fileHeader = null;
+        try {
+            fileHeader = dictDecoder.readHeader();
+        } catch (IOException e) {
+            return null;
+        } catch (UnsupportedFormatException e) {
+            return null;
+        }
+        if (fileHeader == null) return null;
+        return BinaryDictDecoderUtils.getWordAtPosition(dictDecoder, fileHeader.mBodyOffset,
+                address).mWord;
+    }
+
+    private static long checkGetTerminalPosition(final DictDecoder dictDecoder, final String word,
+            final boolean contained) {
+        long diff = -1;
+        int position = -1;
+        try {
+            final long now = System.nanoTime();
+            position = dictDecoder.getTerminalPosition(word);
+            diff = System.nanoTime() - now;
+        } catch (IOException e) {
+            Log.e(TAG, "IOException while getTerminalPosition", e);
+        } catch (UnsupportedFormatException e) {
+            Log.e(TAG, "UnsupportedFormatException while getTerminalPosition", e);
+        }
+
+        assertEquals(FormatSpec.NOT_VALID_WORD != position, contained);
+        if (contained) assertEquals(getWordFromBinary(dictDecoder, position), word);
+        return diff;
+    }
+
+    private void runGetTerminalPosition(final ArrayList<String> words,
+            final SparseArray<List<Integer>> bigrams, final int bufferType,
+            final FormatOptions formatOptions, final String message) {
+        final String dictName = "testGetTerminalPosition";
+        final String dictVersion = Long.toString(System.currentTimeMillis());
+        final File file = BinaryDictUtils.getDictFile(dictName, dictVersion, formatOptions,
+                getContext().getCacheDir());
+
+        final FusionDictionary dict = new FusionDictionary(new PtNodeArray(),
+                BinaryDictUtils.makeDictionaryOptions(dictName, dictVersion, formatOptions));
+        addUnigrams(sWords.size(), dict, sWords);
+        addBigrams(dict, words, bigrams);
+        timeWritingDictToFile(file, dict, formatOptions);
+
+        final DictDecoder dictDecoder = BinaryDictIOUtils.getDictDecoder(file, 0, file.length(),
+                DictDecoder.USE_BYTEARRAY);
+        try {
+            dictDecoder.openDictBuffer();
+        } catch (IOException e) {
+            Log.e(TAG, "IOException while opening the buffer", e);
+        } catch (UnsupportedFormatException e) {
+            Log.e(TAG, "IOException while opening the buffer", e);
+        }
+        assertTrue("Can't get the buffer", dictDecoder.isDictBufferOpen());
+
+        try {
+            // too long word
+            final String longWord = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz";
+            assertEquals(FormatSpec.NOT_VALID_WORD, dictDecoder.getTerminalPosition(longWord));
+
+            // null
+            assertEquals(FormatSpec.NOT_VALID_WORD, dictDecoder.getTerminalPosition(null));
+
+            // empty string
+            assertEquals(FormatSpec.NOT_VALID_WORD, dictDecoder.getTerminalPosition(""));
+        } catch (IOException e) {
+        } catch (UnsupportedFormatException e) {
+        }
+
+        // Test a word that is contained within the dictionary.
+        long sum = 0;
+        for (int i = 0; i < sWords.size(); ++i) {
+            final long time = checkGetTerminalPosition(dictDecoder, sWords.get(i), true);
+            sum += time == -1 ? 0 : time;
+        }
+        Log.d(TAG, "per search : " + (((double)sum) / sWords.size() / 1000000) + " : " + message
+                + " : " + outputOptions(bufferType, formatOptions));
+
+        // Test a word that isn't contained within the dictionary.
+        final int[] codePointSet = CodePointUtils.generateCodePointSet(DEFAULT_CODE_POINT_SET_SIZE,
+                mRandom);
+        for (int i = 0; i < 1000; ++i) {
+            final String word = CodePointUtils.generateWord(mRandom, codePointSet);
+            if (sWords.indexOf(word) != -1) continue;
+            checkGetTerminalPosition(dictDecoder, word, false);
+        }
+    }
+
+    private void runGetTerminalPositionTests(final int bufferType,
+            final FormatOptions formatOptions) {
+        runGetTerminalPosition(sWords, sEmptyBigrams, bufferType, formatOptions, "unigram");
+    }
+
+    public void testGetTerminalPosition() {
+        final ArrayList<String> results = new ArrayList<>();
+
+        runGetTerminalPositionTests(BinaryDictUtils.USE_BYTE_ARRAY,
+                BinaryDictUtils.STATIC_OPTIONS);
+        runGetTerminalPositionTests(BinaryDictUtils.USE_BYTE_BUFFER,
+                BinaryDictUtils.STATIC_OPTIONS);
+
+        for (final String result : results) {
+            Log.d(TAG, result);
+        }
+    }
+
+    public void testVer2DictGetWordProperty() {
+        final FormatOptions formatOptions = BinaryDictUtils.STATIC_OPTIONS;
+        final ArrayList<String> words = sWords;
+        final String dictName = "testGetWordProperty";
+        final String dictVersion = Long.toString(System.currentTimeMillis());
+        final FusionDictionary dict = new FusionDictionary(new PtNodeArray(),
+                BinaryDictUtils.makeDictionaryOptions(dictName, dictVersion, formatOptions));
+        addUnigrams(words.size(), dict, words);
+        addBigrams(dict, words, sEmptyBigrams);
+        final File file = BinaryDictUtils.getDictFile(dictName, dictVersion, formatOptions,
+                getContext().getCacheDir());
+        file.delete();
+        timeWritingDictToFile(file, dict, formatOptions);
+        final BinaryDictionary binaryDictionary = new BinaryDictionary(file.getAbsolutePath(),
+                0 /* offset */, file.length(), true /* useFullEditDistance */,
+                Locale.ENGLISH, dictName, false /* isUpdatable */);
+        for (final String word : words) {
+            final WordProperty wordProperty = binaryDictionary.getWordProperty(word,
+                    false /* isBeginningOfSentence */);
+            assertEquals(word, wordProperty.mWord);
+            assertEquals(UNIGRAM_FREQ, wordProperty.getProbability());
+        }
+    }
+
+    public void testVer2DictIteration() {
+        final FormatOptions formatOptions = BinaryDictUtils.STATIC_OPTIONS;
+        final ArrayList<String> words = sWords;
+        final SparseArray<List<Integer>> bigrams = sEmptyBigrams;
+        final String dictName = "testGetWordProperty";
+        final String dictVersion = Long.toString(System.currentTimeMillis());
+        final FusionDictionary dict = new FusionDictionary(new PtNodeArray(),
+                BinaryDictUtils.makeDictionaryOptions(dictName, dictVersion, formatOptions));
+        addUnigrams(words.size(), dict, words);
+        addBigrams(dict, words, bigrams);
+        final File file = BinaryDictUtils.getDictFile(dictName, dictVersion, formatOptions,
+                getContext().getCacheDir());
+        timeWritingDictToFile(file, dict, formatOptions);
+        Log.d(TAG, file.getAbsolutePath());
+        final BinaryDictionary binaryDictionary = new BinaryDictionary(file.getAbsolutePath(),
+                0 /* offset */, file.length(), true /* useFullEditDistance */,
+                Locale.ENGLISH, dictName, false /* isUpdatable */);
+
+        final HashSet<String> wordSet = new HashSet<>(words);
+        final HashSet<Pair<String, String>> bigramSet = new HashSet<>();
+
+        for (int i = 0; i < words.size(); i++) {
+            final List<Integer> bigramList = bigrams.get(i);
+            if (bigramList != null) {
+                for (final Integer word1Index : bigramList) {
+                    final String word1 = words.get(word1Index);
+                    bigramSet.add(new Pair<>(words.get(i), word1));
+                }
+            }
+        }
+        int token = 0;
+        do {
+            final BinaryDictionary.GetNextWordPropertyResult result =
+                    binaryDictionary.getNextWordProperty(token);
+            final WordProperty wordProperty = result.mWordProperty;
+            final String word0 = wordProperty.mWord;
+            assertEquals(UNIGRAM_FREQ, wordProperty.mProbabilityInfo.mProbability);
+            wordSet.remove(word0);
+            if (wordProperty.mHasNgrams) {
+                for (final WeightedString bigramTarget : wordProperty.getBigrams()) {
+                    final String word1 = bigramTarget.mWord;
+                    final Pair<String, String> bigram = new Pair<>(word0, word1);
+                    assertTrue(bigramSet.contains(bigram));
+                    bigramSet.remove(bigram);
+                }
+            }
+            token = result.mNextToken;
+        } while (token != 0);
+        assertTrue(wordSet.isEmpty());
+        assertTrue(bigramSet.isEmpty());
+    }
+}
diff --git a/tests/src/com/android/inputmethod/latin/makedict/BinaryDictUtils.java b/tests/src/com/android/inputmethod/latin/makedict/BinaryDictUtils.java
new file mode 100644
index 0000000..9c1e4cf
--- /dev/null
+++ b/tests/src/com/android/inputmethod/latin/makedict/BinaryDictUtils.java
@@ -0,0 +1,80 @@
+/*
+ * Copyright (C) 2013 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.makedict;
+
+import com.android.inputmethod.latin.makedict.FormatSpec.DictionaryOptions;
+import com.android.inputmethod.latin.makedict.FormatSpec.FormatOptions;
+
+import java.io.File;
+import java.util.HashMap;
+
+public class BinaryDictUtils {
+    public static final int USE_BYTE_ARRAY = 1;
+    public static final int USE_BYTE_BUFFER = 2;
+
+    public static final String TEST_DICT_FILE_EXTENSION = ".testDict";
+
+    public static final FormatSpec.FormatOptions STATIC_OPTIONS =
+            new FormatSpec.FormatOptions(FormatSpec.VERSION202);
+    public static final FormatSpec.FormatOptions DYNAMIC_OPTIONS_WITHOUT_TIMESTAMP =
+            new FormatSpec.FormatOptions(FormatSpec.VERSION4, false /* hasTimestamp */);
+    public static final FormatSpec.FormatOptions DYNAMIC_OPTIONS_WITH_TIMESTAMP =
+            new FormatSpec.FormatOptions(FormatSpec.VERSION4, true /* hasTimestamp */);
+
+    public static DictionaryOptions makeDictionaryOptions(final String id, final String version,
+            final FormatSpec.FormatOptions formatOptions) {
+        final DictionaryOptions options = new DictionaryOptions(new HashMap<String, String>());
+        options.mAttributes.put(DictionaryHeader.DICTIONARY_LOCALE_KEY, "en_US");
+        options.mAttributes.put(DictionaryHeader.DICTIONARY_ID_KEY, id);
+        options.mAttributes.put(DictionaryHeader.DICTIONARY_VERSION_KEY, version);
+        if (formatOptions.mHasTimestamp) {
+            options.mAttributes.put(DictionaryHeader.HAS_HISTORICAL_INFO_KEY,
+                    DictionaryHeader.ATTRIBUTE_VALUE_TRUE);
+            options.mAttributes.put(DictionaryHeader.USES_FORGETTING_CURVE_KEY,
+                    DictionaryHeader.ATTRIBUTE_VALUE_TRUE);
+        }
+        return options;
+    }
+
+    public static File getDictFile(final String name, final String version,
+            final FormatOptions formatOptions, final File directory) {
+        if (formatOptions.mVersion == FormatSpec.VERSION2
+                || formatOptions.mVersion == FormatSpec.VERSION201
+                || formatOptions.mVersion == FormatSpec.VERSION202) {
+            return new File(directory, name + "." + version + TEST_DICT_FILE_EXTENSION);
+        } else if (formatOptions.mVersion == FormatSpec.VERSION4) {
+            return new File(directory, name + "." + version);
+        } else {
+            throw new RuntimeException("the format option has a wrong version : "
+                    + formatOptions.mVersion);
+        }
+    }
+
+    public static DictEncoder getDictEncoder(final File file, final FormatOptions formatOptions) {
+        if (formatOptions.mVersion == FormatSpec.VERSION4) {
+            if (!file.isDirectory()) {
+                file.mkdir();
+            }
+            return new Ver4DictEncoder(file);
+        } else if (formatOptions.mVersion == FormatSpec.VERSION202) {
+            return new Ver2DictEncoder(file, Ver2DictEncoder.CODE_POINT_TABLE_OFF);
+        } else {
+            throw new RuntimeException("The format option has a wrong version : "
+                    + formatOptions.mVersion);
+        }
+    }
+}
diff --git a/tests/src/com/android/inputmethod/latin/makedict/Ver2DictEncoder.java b/tests/src/com/android/inputmethod/latin/makedict/Ver2DictEncoder.java
new file mode 100644
index 0000000..c63b972
--- /dev/null
+++ b/tests/src/com/android/inputmethod/latin/makedict/Ver2DictEncoder.java
@@ -0,0 +1,279 @@
+/*
+ * Copyright (C) 2013 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.makedict;
+
+import com.android.inputmethod.annotations.UsedForTesting;
+import com.android.inputmethod.latin.makedict.BinaryDictDecoderUtils.CharEncoding;
+import com.android.inputmethod.latin.makedict.BinaryDictEncoderUtils.CodePointTable;
+import com.android.inputmethod.latin.makedict.FormatSpec.FormatOptions;
+import com.android.inputmethod.latin.makedict.FusionDictionary.PtNode;
+import com.android.inputmethod.latin.makedict.FusionDictionary.PtNodeArray;
+
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map.Entry;
+
+/**
+ * An implementation of DictEncoder for version 2 binary dictionary.
+ */
+@UsedForTesting
+public class Ver2DictEncoder implements DictEncoder {
+
+    private final File mDictFile;
+    private OutputStream mOutStream;
+    private byte[] mBuffer;
+    private int mPosition;
+    private final int mCodePointTableMode;
+    public static final int CODE_POINT_TABLE_OFF = 0;
+    public static final int CODE_POINT_TABLE_ON = 1;
+
+    @UsedForTesting
+    public Ver2DictEncoder(final File dictFile, final int codePointTableMode) {
+        mDictFile = dictFile;
+        mOutStream = null;
+        mBuffer = null;
+        mCodePointTableMode = codePointTableMode;
+    }
+
+    // This constructor is used only by BinaryDictOffdeviceUtilsTests.
+    // If you want to use this in the production code, you should consider keeping consistency of
+    // the interface of Ver3DictDecoder by using factory.
+    @UsedForTesting
+    public Ver2DictEncoder(final OutputStream outStream) {
+        mDictFile = null;
+        mOutStream = outStream;
+        mCodePointTableMode = CODE_POINT_TABLE_OFF;
+    }
+
+    private void openStream() throws FileNotFoundException {
+        mOutStream = new FileOutputStream(mDictFile);
+    }
+
+    private void close() throws IOException {
+        if (mOutStream != null) {
+            mOutStream.close();
+            mOutStream = null;
+        }
+    }
+
+    // Package for testing
+    static CodePointTable makeCodePointTable(final FusionDictionary dict) {
+        final HashMap<Integer, Integer> codePointOccurrenceCounts = new HashMap<>();
+        for (final WordProperty word : dict) {
+            // Store per code point occurrence
+            final String wordString = word.mWord;
+            for (int i = 0; i < wordString.length(); ++i) {
+                final int codePoint = Character.codePointAt(wordString, i);
+                if (codePointOccurrenceCounts.containsKey(codePoint)) {
+                    codePointOccurrenceCounts.put(codePoint,
+                            codePointOccurrenceCounts.get(codePoint) + 1);
+                } else {
+                    codePointOccurrenceCounts.put(codePoint, 1);
+                }
+            }
+        }
+        final ArrayList<Entry<Integer, Integer>> codePointOccurrenceArray =
+                new ArrayList<>(codePointOccurrenceCounts.entrySet());
+        // Descending order sort by occurrence (value side)
+        Collections.sort(codePointOccurrenceArray, new Comparator<Entry<Integer, Integer>>() {
+            @Override
+            public int compare(final Entry<Integer, Integer> a, final Entry<Integer, Integer> b) {
+                if (a.getValue() != b.getValue()) {
+                    return b.getValue().compareTo(a.getValue());
+                }
+                return b.getKey().compareTo(a.getKey());
+            }
+        });
+        int currentCodePointTableIndex = FormatSpec.MINIMAL_ONE_BYTE_CHARACTER_VALUE;
+        // Temporary map for writing of nodes
+        final HashMap<Integer, Integer> codePointToOneByteCodeMap = new HashMap<>();
+        for (final Entry<Integer, Integer> entry : codePointOccurrenceArray) {
+            // Put a relation from the original code point to the one byte code.
+            codePointToOneByteCodeMap.put(entry.getKey(), currentCodePointTableIndex);
+            if (FormatSpec.MAXIMAL_ONE_BYTE_CHARACTER_VALUE < ++currentCodePointTableIndex) {
+                break;
+            }
+        }
+        // codePointToOneByteCodeMap for writing the trie
+        // codePointOccurrenceArray for writing the header
+        return new CodePointTable(codePointToOneByteCodeMap, codePointOccurrenceArray);
+    }
+
+    @Override
+    public void writeDictionary(final FusionDictionary dict, final FormatOptions formatOptions)
+            throws IOException, UnsupportedFormatException {
+        // We no longer support anything but the latest version of v2.
+        if (formatOptions.mVersion != FormatSpec.VERSION202) {
+            throw new UnsupportedFormatException(
+                    "The given format options has wrong version number : "
+                    + formatOptions.mVersion);
+        }
+
+        if (mOutStream == null) {
+            openStream();
+        }
+
+        // Make code point conversion table ordered by occurrence of code points
+        // Version 201 or later have codePointTable
+        final CodePointTable codePointTable;
+        if (mCodePointTableMode == CODE_POINT_TABLE_OFF || formatOptions.mVersion
+                < FormatSpec.MINIMUM_SUPPORTED_VERSION_OF_CODE_POINT_TABLE) {
+            codePointTable = new CodePointTable();
+        } else {
+            codePointTable = makeCodePointTable(dict);
+        }
+
+        BinaryDictEncoderUtils.writeDictionaryHeader(mOutStream, dict, formatOptions,
+                codePointTable.mCodePointOccurrenceArray);
+
+        // Addresses are limited to 3 bytes, but since addresses can be relative to each node
+        // array, the structure itself is not limited to 16MB. However, if it is over 16MB deciding
+        // the order of the PtNode arrays becomes a quite complicated problem, because though the
+        // dictionary itself does not have a size limit, each node array must still be within 16MB
+        // of all its children and parents. As long as this is ensured, the dictionary file may
+        // grow to any size.
+
+        // Leave the choice of the optimal node order to the flattenTree function.
+        MakedictLog.i("Flattening the tree...");
+        ArrayList<PtNodeArray> flatNodes = BinaryDictEncoderUtils.flattenTree(dict.mRootNodeArray);
+
+        MakedictLog.i("Computing addresses...");
+        BinaryDictEncoderUtils.computeAddresses(dict, flatNodes,
+                codePointTable.mCodePointToOneByteCodeMap);
+        MakedictLog.i("Checking PtNode array...");
+        if (MakedictLog.DBG) BinaryDictEncoderUtils.checkFlatPtNodeArrayList(flatNodes);
+
+        // Create a buffer that matches the final dictionary size.
+        final PtNodeArray lastNodeArray = flatNodes.get(flatNodes.size() - 1);
+        final int bufferSize = lastNodeArray.mCachedAddressAfterUpdate + lastNodeArray.mCachedSize;
+        mBuffer = new byte[bufferSize];
+
+        MakedictLog.i("Writing file...");
+
+        for (PtNodeArray nodeArray : flatNodes) {
+            BinaryDictEncoderUtils.writePlacedPtNodeArray(dict, this, nodeArray,
+                    codePointTable.mCodePointToOneByteCodeMap);
+        }
+        if (MakedictLog.DBG) BinaryDictEncoderUtils.showStatistics(flatNodes);
+        mOutStream.write(mBuffer, 0, mPosition);
+
+        MakedictLog.i("Done");
+        close();
+    }
+
+    @Override
+    public void setPosition(final int position) {
+        if (mBuffer == null || position < 0 || position >= mBuffer.length) return;
+        mPosition = position;
+    }
+
+    @Override
+    public int getPosition() {
+        return mPosition;
+    }
+
+    @Override
+    public void writePtNodeCount(final int ptNodeCount) {
+        final int countSize = BinaryDictIOUtils.getPtNodeCountSize(ptNodeCount);
+        if (countSize != 1 && countSize != 2) {
+            throw new RuntimeException("Strange size from getGroupCountSize : " + countSize);
+        }
+        final int encodedPtNodeCount = (countSize == 2) ?
+                (ptNodeCount | FormatSpec.LARGE_PTNODE_ARRAY_SIZE_FIELD_SIZE_FLAG) : ptNodeCount;
+        mPosition = BinaryDictEncoderUtils.writeUIntToBuffer(mBuffer, mPosition, encodedPtNodeCount,
+                countSize);
+    }
+
+    private void writePtNodeFlags(final PtNode ptNode,
+            final HashMap<Integer, Integer> codePointToOneByteCodeMap) {
+        final int childrenPos = BinaryDictEncoderUtils.getChildrenPosition(ptNode,
+                codePointToOneByteCodeMap);
+        mPosition = BinaryDictEncoderUtils.writeUIntToBuffer(mBuffer, mPosition,
+                BinaryDictEncoderUtils.makePtNodeFlags(ptNode, childrenPos),
+                FormatSpec.PTNODE_FLAGS_SIZE);
+    }
+
+    private void writeCharacters(final int[] codePoints, final boolean hasSeveralChars,
+            final HashMap<Integer, Integer> codePointToOneByteCodeMap) {
+        mPosition = CharEncoding.writeCharArray(codePoints, mBuffer, mPosition,
+                codePointToOneByteCodeMap);
+        if (hasSeveralChars) {
+            mBuffer[mPosition++] = FormatSpec.PTNODE_CHARACTERS_TERMINATOR;
+        }
+    }
+
+    private void writeFrequency(final int frequency) {
+        if (frequency >= 0) {
+            mPosition = BinaryDictEncoderUtils.writeUIntToBuffer(mBuffer, mPosition, frequency,
+                    FormatSpec.PTNODE_FREQUENCY_SIZE);
+        }
+    }
+
+    private void writeChildrenPosition(final PtNode ptNode,
+            final HashMap<Integer, Integer> codePointToOneByteCodeMap) {
+        final int childrenPos = BinaryDictEncoderUtils.getChildrenPosition(ptNode,
+                codePointToOneByteCodeMap);
+        mPosition += BinaryDictEncoderUtils.writeChildrenPosition(mBuffer, mPosition,
+                childrenPos);
+    }
+
+    /**
+     * Write a bigram attributes list to mBuffer.
+     *
+     * @param bigrams the bigram attributes list.
+     * @param dict the dictionary the node array is a part of (for relative offsets).
+     */
+    private void writeBigrams(final ArrayList<WeightedString> bigrams,
+            final FusionDictionary dict) {
+        if (bigrams == null) return;
+
+        final Iterator<WeightedString> bigramIterator = bigrams.iterator();
+        while (bigramIterator.hasNext()) {
+            final WeightedString bigram = bigramIterator.next();
+            final PtNode target =
+                    FusionDictionary.findWordInTree(dict.mRootNodeArray, bigram.mWord);
+            final int addressOfBigram = target.mCachedAddressAfterUpdate;
+            final int unigramFrequencyForThisWord = target.getProbability();
+            final int offset = addressOfBigram
+                    - (mPosition + FormatSpec.PTNODE_ATTRIBUTE_FLAGS_SIZE);
+            final int bigramFlags = BinaryDictEncoderUtils.makeBigramFlags(bigramIterator.hasNext(),
+                    offset, bigram.getProbability(), unigramFrequencyForThisWord, bigram.mWord);
+            mPosition = BinaryDictEncoderUtils.writeUIntToBuffer(mBuffer, mPosition, bigramFlags,
+                    FormatSpec.PTNODE_ATTRIBUTE_FLAGS_SIZE);
+            mPosition += BinaryDictEncoderUtils.writeChildrenPosition(mBuffer, mPosition,
+                    Math.abs(offset));
+        }
+    }
+
+    @Override
+    public void writePtNode(final PtNode ptNode, final FusionDictionary dict,
+            final HashMap<Integer, Integer> codePointToOneByteCodeMap) {
+        writePtNodeFlags(ptNode, codePointToOneByteCodeMap);
+        writeCharacters(ptNode.mChars, ptNode.hasSeveralChars(), codePointToOneByteCodeMap);
+        writeFrequency(ptNode.getProbability());
+        writeChildrenPosition(ptNode, codePointToOneByteCodeMap);
+        writeBigrams(ptNode.mBigrams, dict);
+    }
+}
diff --git a/tests/src/com/android/inputmethod/latin/makedict/Ver4DictEncoder.java b/tests/src/com/android/inputmethod/latin/makedict/Ver4DictEncoder.java
new file mode 100644
index 0000000..6e7b37d
--- /dev/null
+++ b/tests/src/com/android/inputmethod/latin/makedict/Ver4DictEncoder.java
@@ -0,0 +1,133 @@
+/*
+ * Copyright (C) 2013 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.makedict;
+
+import com.android.inputmethod.annotations.UsedForTesting;
+import com.android.inputmethod.latin.BinaryDictionary;
+import com.android.inputmethod.latin.Dictionary;
+import com.android.inputmethod.latin.NgramContext;
+import com.android.inputmethod.latin.common.LocaleUtils;
+import com.android.inputmethod.latin.makedict.FormatSpec.FormatOptions;
+import com.android.inputmethod.latin.makedict.FusionDictionary.PtNode;
+import com.android.inputmethod.latin.utils.BinaryDictionaryUtils;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.HashMap;
+
+/**
+ * An implementation of DictEncoder for version 4 binary dictionary.
+ */
+@UsedForTesting
+public class Ver4DictEncoder implements DictEncoder {
+    private final File mDictPlacedDir;
+
+    @UsedForTesting
+    public Ver4DictEncoder(final File dictPlacedDir) {
+        mDictPlacedDir = dictPlacedDir;
+    }
+
+    // TODO: This builds a FusionDictionary first and iterates it to add words to the binary
+    // dictionary. However, it is possible to just add words directly to the binary dictionary
+    // instead.
+    // In the long run, when we stop supporting version 2, FusionDictionary will become deprecated
+    // and we can remove it. Then we'll be able to just call BinaryDictionary directly.
+    @Override
+    public void writeDictionary(FusionDictionary dict, FormatOptions formatOptions)
+            throws IOException, UnsupportedFormatException {
+        if (formatOptions.mVersion != FormatSpec.VERSION4) {
+            throw new UnsupportedFormatException("File header has a wrong version number : "
+                    + formatOptions.mVersion);
+        }
+        if (!mDictPlacedDir.isDirectory()) {
+            throw new UnsupportedFormatException("Given path is not a directory.");
+        }
+        if (!BinaryDictionaryUtils.createEmptyDictFile(mDictPlacedDir.getAbsolutePath(),
+                FormatSpec.VERSION4, LocaleUtils.constructLocaleFromString(
+                dict.mOptions.mAttributes.get(DictionaryHeader.DICTIONARY_LOCALE_KEY)),
+                dict.mOptions.mAttributes)) {
+            throw new IOException("Cannot create dictionary file : "
+                + mDictPlacedDir.getAbsolutePath());
+        }
+        final BinaryDictionary binaryDict = new BinaryDictionary(mDictPlacedDir.getAbsolutePath(),
+                0l, mDictPlacedDir.length(), true /* useFullEditDistance */,
+                LocaleUtils.constructLocaleFromString(dict.mOptions.mAttributes.get(
+                        DictionaryHeader.DICTIONARY_LOCALE_KEY)),
+                Dictionary.TYPE_USER /* Dictionary type. Does not matter for us */,
+                true /* isUpdatable */);
+        if (!binaryDict.isValidDictionary()) {
+            // Somehow createEmptyDictFile returned true, but the file was not created correctly
+            throw new IOException("Cannot create dictionary file");
+        }
+        for (final WordProperty wordProperty : dict) {
+            if (!binaryDict.addUnigramEntry(wordProperty.mWord, wordProperty.getProbability(),
+                    wordProperty.mIsBeginningOfSentence, wordProperty.mIsNotAWord,
+                    wordProperty.mIsPossiblyOffensive, 0 /* timestamp */)) {
+                MakedictLog.e("Cannot add unigram entry for " + wordProperty.mWord);
+            }
+            if (binaryDict.needsToRunGC(true /* mindsBlockByGC */)) {
+                if (!binaryDict.flushWithGC()) {
+                    MakedictLog.e("Cannot flush dict with GC.");
+                    return;
+                }
+            }
+        }
+        for (final WordProperty word0Property : dict) {
+            if (!word0Property.mHasNgrams) continue;
+            // TODO: Support ngram.
+            for (final WeightedString word1 : word0Property.getBigrams()) {
+                final NgramContext ngramContext =
+                        new NgramContext(new NgramContext.WordInfo(word0Property.mWord));
+                if (!binaryDict.addNgramEntry(ngramContext, word1.mWord,
+                        word1.getProbability(), 0 /* timestamp */)) {
+                    MakedictLog.e("Cannot add n-gram entry for "
+                            + ngramContext + " -> " + word1.mWord);
+                    return;
+                }
+                if (binaryDict.needsToRunGC(true /* mindsBlockByGC */)) {
+                    if (!binaryDict.flushWithGC()) {
+                        MakedictLog.e("Cannot flush dict with GC.");
+                        return;
+                    }
+                }
+            }
+        }
+        if (!binaryDict.flushWithGC()) {
+            MakedictLog.e("Cannot flush dict with GC.");
+            return;
+        }
+        binaryDict.close();
+    }
+
+    @Override
+    public void setPosition(int position) {
+    }
+
+    @Override
+    public int getPosition() {
+        return 0;
+    }
+
+    @Override
+    public void writePtNodeCount(int ptNodeCount) {
+    }
+
+    @Override
+    public void writePtNode(PtNode ptNode, FusionDictionary dict,
+            HashMap<Integer, Integer> codePointToOneByteCodeMap) {
+    }
+}
diff --git a/tests/src/com/android/inputmethod/latin/network/BlockingHttpClientTests.java b/tests/src/com/android/inputmethod/latin/network/BlockingHttpClientTests.java
index 8f24cdb..f6f54eb 100644
--- a/tests/src/com/android/inputmethod/latin/network/BlockingHttpClientTests.java
+++ b/tests/src/com/android/inputmethod/latin/network/BlockingHttpClientTests.java
@@ -16,16 +16,22 @@
 
 package com.android.inputmethod.latin.network;
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
 import static org.mockito.Matchers.any;
 import static org.mockito.Matchers.eq;
 import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
 
-import android.test.AndroidTestCase;
-import android.test.suitebuilder.annotation.SmallTest;
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
 
 import com.android.inputmethod.latin.network.BlockingHttpClient.ResponseProcessor;
 
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
 import org.mockito.Mock;
 import org.mockito.Mockito;
 import org.mockito.MockitoAnnotations;
@@ -44,15 +50,16 @@
  * Tests for {@link BlockingHttpClient}.
  */
 @SmallTest
-public class BlockingHttpClientTests extends AndroidTestCase {
+@RunWith(AndroidJUnit4.class)
+public class BlockingHttpClientTests {
     @Mock HttpURLConnection mMockHttpConnection;
 
-    @Override
-    protected void setUp() throws Exception {
-        super.setUp();
+    @Before
+    public void setUp() throws Exception {
         MockitoAnnotations.initMocks(this);
     }
 
+    @Test
     public void testError_badGateway() throws IOException, AuthException {
         when(mMockHttpConnection.getResponseCode()).thenReturn(HttpURLConnection.HTTP_BAD_GATEWAY);
         final BlockingHttpClient client = new BlockingHttpClient(mMockHttpConnection);
@@ -67,6 +74,7 @@
         }
     }
 
+    @Test
     public void testError_clientTimeout() throws Exception {
         when(mMockHttpConnection.getResponseCode()).thenReturn(
                 HttpURLConnection.HTTP_CLIENT_TIMEOUT);
@@ -82,6 +90,7 @@
         }
     }
 
+    @Test
     public void testError_forbiddenWithRequest() throws Exception {
         final OutputStream mockOutputStream = Mockito.mock(OutputStream.class);
         when(mMockHttpConnection.getResponseCode()).thenReturn(HttpURLConnection.HTTP_FORBIDDEN);
@@ -98,6 +107,7 @@
         verify(mockOutputStream).write(any(byte[].class), eq(0), eq(100));
     }
 
+    @Test
     public void testSuccess_emptyRequest() throws Exception {
         final Random rand = new Random();
         byte[] response = new byte[100];
@@ -112,6 +122,7 @@
         assertTrue("ResponseProcessor was not invoked", processor.mInvoked);
     }
 
+    @Test
     public void testSuccess() throws Exception {
         final OutputStream mockOutputStream = Mockito.mock(OutputStream.class);
         final Random rand = new Random();
diff --git a/tests/src/com/android/inputmethod/latin/network/HttpUrlConnectionBuilderTests.java b/tests/src/com/android/inputmethod/latin/network/HttpUrlConnectionBuilderTests.java
index 5b3e78e..1aa4040 100644
--- a/tests/src/com/android/inputmethod/latin/network/HttpUrlConnectionBuilderTests.java
+++ b/tests/src/com/android/inputmethod/latin/network/HttpUrlConnectionBuilderTests.java
@@ -20,25 +20,28 @@
 import static com.android.inputmethod.latin.network.HttpUrlConnectionBuilder.MODE_DOWNLOAD_ONLY;
 import static com.android.inputmethod.latin.network.HttpUrlConnectionBuilder.MODE_UPLOAD_ONLY;
 
-import android.test.AndroidTestCase;
-import android.test.suitebuilder.annotation.SmallTest;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
 
 import java.io.IOException;
 import java.net.HttpURLConnection;
 import java.net.MalformedURLException;
 
-
 /**
  * Tests for {@link HttpUrlConnectionBuilder}.
  */
 @SmallTest
-public class HttpUrlConnectionBuilderTests extends AndroidTestCase {
-
-    @Override
-    protected void setUp() throws Exception {
-        super.setUp();
-    }
-
+@RunWith(AndroidJUnit4.class)
+public class HttpUrlConnectionBuilderTests {
+    @Test
     public void testSetUrl_malformed() {
         HttpUrlConnectionBuilder builder = new HttpUrlConnectionBuilder();
         try {
@@ -49,6 +52,7 @@
         }
     }
 
+    @Test
     public void testSetConnectTimeout_invalid() {
         HttpUrlConnectionBuilder builder = new HttpUrlConnectionBuilder();
         try {
@@ -59,6 +63,7 @@
         }
     }
 
+    @Test
     public void testSetConnectTimeout() throws IOException {
         HttpUrlConnectionBuilder builder = new HttpUrlConnectionBuilder();
         builder.setUrl("https://www.example.com");
@@ -67,6 +72,7 @@
         assertEquals(8765, connection.getConnectTimeout());
     }
 
+    @Test
     public void testSetReadTimeout_invalid() {
         HttpUrlConnectionBuilder builder = new HttpUrlConnectionBuilder();
         try {
@@ -77,6 +83,7 @@
         }
     }
 
+    @Test
     public void testSetReadTimeout() throws IOException {
         HttpUrlConnectionBuilder builder = new HttpUrlConnectionBuilder();
         builder.setUrl("https://www.example.com");
@@ -85,6 +92,7 @@
         assertEquals(8765, connection.getReadTimeout());
     }
 
+    @Test
     public void testAddHeader() throws IOException {
         HttpUrlConnectionBuilder builder = new HttpUrlConnectionBuilder();
         builder.setUrl("http://www.example.com");
@@ -93,6 +101,7 @@
         assertEquals("some-random-value", connection.getRequestProperty("some-random-key"));
     }
 
+    @Test
     public void testSetUseCache_notSet() throws IOException {
         HttpUrlConnectionBuilder builder = new HttpUrlConnectionBuilder();
         builder.setUrl("http://www.example.com");
@@ -100,6 +109,7 @@
         assertFalse(connection.getUseCaches());
     }
 
+    @Test
     public void testSetUseCache_false() throws IOException {
         HttpUrlConnectionBuilder builder = new HttpUrlConnectionBuilder();
         builder.setUrl("http://www.example.com");
@@ -108,6 +118,7 @@
         assertFalse(connection.getUseCaches());
     }
 
+    @Test
     public void testSetUseCache_true() throws IOException {
         HttpUrlConnectionBuilder builder = new HttpUrlConnectionBuilder();
         builder.setUrl("http://www.example.com");
@@ -116,6 +127,7 @@
         assertTrue(connection.getUseCaches());
     }
 
+    @Test
     public void testSetMode_uploadOnly() throws IOException {
         HttpUrlConnectionBuilder builder = new HttpUrlConnectionBuilder();
         builder.setUrl("http://www.example.com");
@@ -125,6 +137,7 @@
         assertFalse(connection.getDoOutput());
     }
 
+    @Test
     public void testSetMode_downloadOnly() throws IOException {
         HttpUrlConnectionBuilder builder = new HttpUrlConnectionBuilder();
         builder.setUrl("https://www.example.com");
@@ -134,6 +147,7 @@
         assertTrue(connection.getDoOutput());
     }
 
+    @Test
     public void testSetMode_bidirectional() throws IOException {
         HttpUrlConnectionBuilder builder = new HttpUrlConnectionBuilder();
         builder.setUrl("https://www.example.com");
@@ -143,6 +157,7 @@
         assertTrue(connection.getDoOutput());
     }
 
+    @Test
     public void testSetAuthToken() throws IOException {
         HttpUrlConnectionBuilder builder = new HttpUrlConnectionBuilder();
         builder.setUrl("https://www.example.com");
diff --git a/tests/src/com/android/inputmethod/latin/personalization/UserHistoryDictionaryTests.java b/tests/src/com/android/inputmethod/latin/personalization/UserHistoryDictionaryTests.java
index 559f286..68f0415 100644
--- a/tests/src/com/android/inputmethod/latin/personalization/UserHistoryDictionaryTests.java
+++ b/tests/src/com/android/inputmethod/latin/personalization/UserHistoryDictionaryTests.java
@@ -16,13 +16,23 @@
 
 package com.android.inputmethod.latin.personalization;
 
-import android.test.AndroidTestCase;
-import android.test.suitebuilder.annotation.LargeTest;
+import static org.junit.Assert.assertTrue;
+
+import android.content.Context;
 import android.util.Log;
 
+import androidx.test.InstrumentationRegistry;
+import androidx.test.filters.LargeTest;
+import androidx.test.runner.AndroidJUnit4;
+
 import com.android.inputmethod.latin.ExpandableBinaryDictionary;
 import com.android.inputmethod.latin.utils.BinaryDictionaryUtils;
 
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
 import java.io.File;
 import java.util.Locale;
 import java.util.Random;
@@ -31,13 +41,18 @@
  * Unit tests for UserHistoryDictionary
  */
 @LargeTest
-public class UserHistoryDictionaryTests extends AndroidTestCase {
+@RunWith(AndroidJUnit4.class)
+public class UserHistoryDictionaryTests {
     private static final String TAG = UserHistoryDictionaryTests.class.getSimpleName();
     private static final int WAIT_FOR_WRITING_FILE_IN_MILLISECONDS = 3000;
     private static final String TEST_ACCOUNT = "account@example.com";
 
     private int mCurrentTime = 0;
 
+    private Context getContext() {
+        return InstrumentationRegistry.getTargetContext();
+    }
+
     private static void printAllFiles(final File dir) {
         Log.d(TAG, dir.getAbsolutePath());
         for (final File file : dir.listFiles()) {
@@ -62,20 +77,18 @@
         assertTrue("Following dictionary file doesn't exist: " + dictFile, dictFile.exists());
     }
 
-    @Override
-    protected void setUp() throws Exception {
-        super.setUp();
+    @Before
+    public void setUp() throws Exception {
         resetCurrentTimeForTestMode();
         UserHistoryDictionaryTestsHelper.removeAllTestDictFiles(
-                UserHistoryDictionaryTestsHelper.TEST_LOCALE_PREFIX, mContext);
+                UserHistoryDictionaryTestsHelper.TEST_LOCALE_PREFIX, getContext());
     }
 
-    @Override
-    protected void tearDown() throws Exception {
+    @After
+    public void tearDown() throws Exception {
         UserHistoryDictionaryTestsHelper.removeAllTestDictFiles(
-                UserHistoryDictionaryTestsHelper.TEST_LOCALE_PREFIX, mContext);
+                UserHistoryDictionaryTestsHelper.TEST_LOCALE_PREFIX, getContext());
         stopTestModeInNativeCode();
-        super.tearDown();
     }
 
     private void resetCurrentTimeForTestMode() {
@@ -111,7 +124,7 @@
                 null /* dictFile */,
                 testAccount /* account */);
         final File dictFile = ExpandableBinaryDictionary.getDictFile(
-                mContext, dictName, null /* dictFile */);
+                getContext(), dictName, null /* dictFile */);
         final UserHistoryDictionary dict = PersonalizationHelper.getUserHistoryDictionary(
                 getContext(), dummyLocale, testAccount);
         clearHistory(dict);
@@ -123,18 +136,22 @@
         assertDictionaryExists(dict, dictFile);
     }
 
+    @Test
     public void testRandomWords_NullAccount() {
         doTestRandomWords(null /* testAccount */);
     }
 
+    @Test
     public void testRandomWords() {
         doTestRandomWords(TEST_ACCOUNT);
     }
 
+    @Test
     public void testStressTestForSwitchingLanguagesAndAddingWords() {
         doTestStressTestForSwitchingLanguagesAndAddingWords(TEST_ACCOUNT);
     }
 
+    @Test
     public void testStressTestForSwitchingLanguagesAndAddingWords_NullAccount() {
         doTestStressTestForSwitchingLanguagesAndAddingWords(null /* testAccount */);
     }
@@ -158,7 +175,7 @@
                         UserHistoryDictionary.NAME, dummyLocale, null /* dictFile */,
                         testAccount /* account */);
                 dictFiles[i] = ExpandableBinaryDictionary.getDictFile(
-                        mContext, dictName, null /* dictFile */);
+                        getContext(), dictName, null /* dictFile */);
                 dicts[i] = PersonalizationHelper.getUserHistoryDictionary(getContext(),
                         dummyLocale, testAccount);
                 clearHistory(dicts[i]);
@@ -186,10 +203,12 @@
         }
     }
 
+    @Test
     public void testAddManyWords() {
         doTestAddManyWords(TEST_ACCOUNT);
     }
 
+    @Test
     public void testAddManyWords_NullAccount() {
         doTestAddManyWords(null /* testAccount */);
     }
@@ -200,7 +219,7 @@
         final String dictName = UserHistoryDictionary.getUserHistoryDictName(
                 UserHistoryDictionary.NAME, dummyLocale, null /* dictFile */, testAccount);
         final File dictFile = ExpandableBinaryDictionary.getDictFile(
-                mContext, dictName, null /* dictFile */);
+                getContext(), dictName, null /* dictFile */);
         final int numberOfWords = 10000;
         final Random random = new Random(123456);
         final UserHistoryDictionary dict = PersonalizationHelper.getUserHistoryDictionary(
diff --git a/tests/src/com/android/inputmethod/latin/settings/AccountsSettingsFragmentTests.java b/tests/src/com/android/inputmethod/latin/settings/AccountsSettingsFragmentTests.java
index f2d8973..667ffd1 100644
--- a/tests/src/com/android/inputmethod/latin/settings/AccountsSettingsFragmentTests.java
+++ b/tests/src/com/android/inputmethod/latin/settings/AccountsSettingsFragmentTests.java
@@ -16,6 +16,9 @@
 
 package com.android.inputmethod.latin.settings;
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.fail;
 import static org.mockito.Matchers.any;
 import static org.mockito.Mockito.when;
 
@@ -23,13 +26,19 @@
 import android.content.Context;
 import android.content.DialogInterface;
 import android.content.Intent;
-import android.test.ActivityInstrumentationTestCase2;
-import android.test.suitebuilder.annotation.MediumTest;
 import android.view.View;
 import android.widget.ListView;
 
+import androidx.test.InstrumentationRegistry;
+import androidx.test.filters.MediumTest;
+import androidx.test.runner.AndroidJUnit4;
+
 import com.android.inputmethod.latin.utils.ManagedProfileUtils;
 
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
 import org.mockito.Mock;
 import org.mockito.MockitoAnnotations;
 
@@ -37,36 +46,41 @@
 import java.util.concurrent.TimeUnit;
 
 @MediumTest
-public class AccountsSettingsFragmentTests
-        extends ActivityInstrumentationTestCase2<TestFragmentActivity> {
+@RunWith(AndroidJUnit4.class)
+public class AccountsSettingsFragmentTests {
     private static final String FRAG_NAME = AccountsSettingsFragment.class.getName();
     private static final long TEST_TIMEOUT_MILLIS = 5000;
 
     @Mock private ManagedProfileUtils mManagedProfileUtils;
 
-    public AccountsSettingsFragmentTests() {
-        super(TestFragmentActivity.class);
+    private TestFragmentActivity mActivity;
+    private TestFragmentActivity getActivity() {
+        return mActivity;
     }
 
-    @Override
-    protected void setUp() throws Exception {
-        super.setUp();
-
+    @Before
+    public void setUp() throws Exception {
         // Initialize the mocks.
         MockitoAnnotations.initMocks(this);
         ManagedProfileUtils.setTestInstance(mManagedProfileUtils);
 
-        Intent intent = new Intent();
-        intent.putExtra(TestFragmentActivity.EXTRA_SHOW_FRAGMENT, FRAG_NAME);
-        setActivityIntent(intent);
+        final Intent intent = new Intent()
+                .setAction(Intent.ACTION_MAIN)
+                .setClass(InstrumentationRegistry.getTargetContext(), TestFragmentActivity.class)
+                .addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
+                .addFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION)
+                .putExtra(TestFragmentActivity.EXTRA_SHOW_FRAGMENT, FRAG_NAME);
+        mActivity = (TestFragmentActivity) InstrumentationRegistry.getInstrumentation()
+                .startActivitySync(intent);
     }
 
-    @Override
+    @After
     public void tearDown() throws Exception {
         ManagedProfileUtils.setTestInstance(null);
-        super.tearDown();
+        mActivity = null;
     }
 
+    @Test
     public void testEmptyAccounts() {
         final AccountsSettingsFragment fragment =
                 (AccountsSettingsFragment) getActivity().mFragment;
@@ -83,6 +97,7 @@
         DialogHolder() {}
     }
 
+    @Test
     public void testMultipleAccounts_noSettingsForManagedProfile() {
         when(mManagedProfileUtils.hasWorkProfile(any(Context.class))).thenReturn(true);
 
@@ -95,6 +110,7 @@
         assertNull(fragment.findPreference(AccountsSettingsFragment.PREF_ACCCOUNT_SWITCHER));
     }
 
+    @Test
     public void testMultipleAccounts_noCurrentAccount() {
         when(mManagedProfileUtils.hasWorkProfile(any(Context.class))).thenReturn(false);
 
@@ -116,6 +132,7 @@
                 dialog.getButton(DialogInterface.BUTTON_POSITIVE).getVisibility());
     }
 
+    @Test
     public void testMultipleAccounts_currentAccount() {
         when(mManagedProfileUtils.hasWorkProfile(any(Context.class))).thenReturn(false);
 
@@ -164,7 +181,7 @@
         } catch (InterruptedException ex) {
             fail();
         }
-        getInstrumentation().waitForIdleSync();
+        InstrumentationRegistry.getInstrumentation().waitForIdleSync();
         return dialogHolder;
     }
 }
diff --git a/tests/src/com/android/inputmethod/latin/settings/SpacingAndPunctuationsTests.java b/tests/src/com/android/inputmethod/latin/settings/SpacingAndPunctuationsTests.java
index ed632db..df44fba 100644
--- a/tests/src/com/android/inputmethod/latin/settings/SpacingAndPunctuationsTests.java
+++ b/tests/src/com/android/inputmethod/latin/settings/SpacingAndPunctuationsTests.java
@@ -16,9 +16,17 @@
 
 package com.android.inputmethod.latin.settings;
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
+import android.content.Context;
 import android.content.res.Resources;
-import android.test.AndroidTestCase;
-import android.test.suitebuilder.annotation.SmallTest;
+
+import androidx.test.InstrumentationRegistry;
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
 
 import com.android.inputmethod.latin.SuggestedWords;
 import com.android.inputmethod.latin.common.Constants;
@@ -26,15 +34,24 @@
 
 import junit.framework.AssertionFailedError;
 
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
 import java.util.Locale;
 
 @SmallTest
-public class SpacingAndPunctuationsTests extends AndroidTestCase {
+@RunWith(AndroidJUnit4.class)
+public class SpacingAndPunctuationsTests {
     private static final int ARMENIAN_FULL_STOP = '\u0589';
     private static final int ARMENIAN_COMMA = '\u055D';
 
     private int mScreenMetrics;
 
+    private Context getContext() {
+        return InstrumentationRegistry.getTargetContext();
+    }
+
     private boolean isPhone() {
         return Constants.isPhone(mScreenMetrics);
     }
@@ -63,10 +80,8 @@
     private SpacingAndPunctuations CAMBODIA_KHMER;
     private SpacingAndPunctuations LAOS_LAO;
 
-    @Override
-    protected void setUp() throws Exception {
-        super.setUp();
-
+    @Before
+    public void setUp() throws Exception {
         mScreenMetrics = Settings.readScreenMetrics(getContext().getResources());
 
         // Language only
@@ -140,6 +155,7 @@
         assertFalse("Tilde",      sp.isWordSeparator('~'));
     }
 
+    @Test
     public void testWordSeparator() {
         testingStandardWordSeparator(ENGLISH);
         testingStandardWordSeparator(FRENCH);
@@ -192,6 +208,7 @@
 
     }
 
+    @Test
     public void testWordConnector() {
         testingStandardWordConnector(ENGLISH);
         testingStandardWordConnector(FRENCH);
@@ -245,6 +262,7 @@
         assertFalse("Question",    sp.isUsuallyPrecededBySpace('?'));
     }
 
+    @Test
     public void testIsUsuallyPrecededBySpace() {
         testingStandardPrecededBySpace(ENGLISH);
         testingCommonPrecededBySpace(FRENCH);
@@ -298,6 +316,7 @@
         assertFalse("Tilde",       sp.isUsuallyFollowedBySpace('~'));
     }
 
+    @Test
     public void testIsUsuallyFollowedBySpace() {
         testingStandardFollowedBySpace(ENGLISH);
         testingStandardFollowedBySpace(FRENCH);
@@ -345,7 +364,8 @@
         assertFalse("Tilde",       sp.isUsuallyFollowedBySpace('~'));
     }
 
-    public void isSentenceSeparator() {
+    @Test
+    public void testIsSentenceSeparator() {
         testingStandardSentenceSeparator(ENGLISH);
         try {
             testingStandardSentenceSeparator(ARMENIA_ARMENIAN);
@@ -357,6 +377,7 @@
         assertFalse(ARMENIA_ARMENIAN.isSentenceSeparator(ARMENIAN_COMMA));
     }
 
+    @Test
     public void testLanguageHasSpace() {
         assertTrue(ENGLISH.mCurrentLanguageHasSpaces);
         assertTrue(FRENCH.mCurrentLanguageHasSpaces);
@@ -369,6 +390,7 @@
         assertTrue(LAO.mCurrentLanguageHasSpaces);
     }
 
+    @Test
     public void testUsesAmericanTypography() {
         assertTrue(ENGLISH.mUsesAmericanTypography);
         assertTrue(UNITED_STATES.mUsesAmericanTypography);
@@ -379,6 +401,7 @@
         assertFalse(SWISS_GERMAN.mUsesAmericanTypography);
     }
 
+    @Test
     public void testUsesGermanRules() {
         assertFalse(ENGLISH.mUsesGermanRules);
         assertFalse(FRENCH.mUsesGermanRules);
@@ -436,6 +459,7 @@
         }
     }
 
+    @Test
     public void testPhonePunctuationSuggestions() {
         if (!isPhone()) {
             return;
@@ -454,6 +478,7 @@
                 PUNCTUATION_LABELS_PHONE, PUNCTUATION_WORDS_PHONE_HEBREW);
     }
 
+    @Test
     public void testTabletPunctuationSuggestions() {
         if (!isTablet()) {
             return;
diff --git a/tests/src/com/android/inputmethod/latin/suggestions/SuggestionStripLayoutHelperTests.java b/tests/src/com/android/inputmethod/latin/suggestions/SuggestionStripLayoutHelperTests.java
index f3273a2..3706574 100644
--- a/tests/src/com/android/inputmethod/latin/suggestions/SuggestionStripLayoutHelperTests.java
+++ b/tests/src/com/android/inputmethod/latin/suggestions/SuggestionStripLayoutHelperTests.java
@@ -16,13 +16,22 @@
 
 package com.android.inputmethod.latin.suggestions;
 
-import android.test.AndroidTestCase;
-import android.test.suitebuilder.annotation.SmallTest;
+import static junit.framework.TestCase.assertEquals;
+
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
 
 import com.android.inputmethod.latin.SuggestedWords;
 
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
 @SmallTest
-public class SuggestionStripLayoutHelperTests extends AndroidTestCase {
+@RunWith(AndroidJUnit4.class)
+public class SuggestionStripLayoutHelperTests {
     private static void confirmShowTypedWord(final String message, final int inputType) {
         assertFalse(message, SuggestionStripLayoutHelper.shouldOmitTypedWord(
                 inputType,
@@ -42,6 +51,7 @@
                 true /* shouldShowUiToAcceptTypedWord */));
     }
 
+    @Test
     public void testShouldShowTypedWord() {
         confirmShowTypedWord("no input style",
                 SuggestedWords.INPUT_STYLE_NONE);
@@ -51,7 +61,8 @@
                 SuggestedWords.INPUT_STYLE_RECORRECTION);
     }
 
-    public void testshouldOmitTypedWordWhileTyping() {
+    @Test
+    public void testShouldOmitTypedWordWhileTyping() {
         assertFalse("typing", SuggestionStripLayoutHelper.shouldOmitTypedWord(
                 SuggestedWords.INPUT_STYLE_TYPING,
                 false /* gestureFloatingPreviewTextEnabled */,
@@ -70,7 +81,8 @@
                 true /* shouldShowUiToAcceptTypedWord */));
     }
 
-    public void testshouldOmitTypedWordWhileGesturing() {
+    @Test
+    public void testShouldOmitTypedWordWhileGesturing() {
         assertFalse("gesturing", SuggestionStripLayoutHelper.shouldOmitTypedWord(
                 SuggestedWords.INPUT_STYLE_UPDATE_BATCH,
                 false /* gestureFloatingPreviewTextEnabled */,
@@ -89,7 +101,8 @@
                 true /* shouldShowUiToAcceptTypedWord */));
     }
 
-    public void testshouldOmitTypedWordWhenGestured() {
+    @Test
+    public void testShouldOmitTypedWordWhenGestured() {
         assertFalse("gestured", SuggestionStripLayoutHelper.shouldOmitTypedWord(
                 SuggestedWords.INPUT_STYLE_TAIL_BATCH,
                 false /* gestureFloatingPreviewTextEnabled */,
@@ -115,6 +128,7 @@
     private static final int POSITION_CENTER = 1;
     private static final int POSITION_RIGHT = 2;
 
+    @Test
     public void testGetPositionInSuggestionStrip() {
         assertEquals("1st word without auto correction", POSITION_CENTER,
                 SuggestionStripLayoutHelper.getPositionInSuggestionStrip(
diff --git a/tests/src/com/android/inputmethod/latin/touchinputconsumer/NullGestureConsumerTests.java b/tests/src/com/android/inputmethod/latin/touchinputconsumer/NullGestureConsumerTests.java
index ad6bcc3..986c8e3 100644
--- a/tests/src/com/android/inputmethod/latin/touchinputconsumer/NullGestureConsumerTests.java
+++ b/tests/src/com/android/inputmethod/latin/touchinputconsumer/NullGestureConsumerTests.java
@@ -16,18 +16,26 @@
 
 package com.android.inputmethod.latin.touchinputconsumer;
 
-import android.test.AndroidTestCase;
-import android.test.suitebuilder.annotation.SmallTest;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertSame;
+
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
 
 /**
  * Tests for GestureConsumer.NULL_GESTURE_CONSUMER.
  */
 @SmallTest
-public class NullGestureConsumerTests extends AndroidTestCase {
+@RunWith(AndroidJUnit4.class)
+public class NullGestureConsumerTests {
     /**
      * Tests that GestureConsumer.NULL_GESTURE_CONSUMER indicates that it won't consume gesture data
      * and that its methods don't raise exceptions even for invalid data.
      */
+    @Test
     public void testNullGestureConsumer() {
         assertFalse(GestureConsumer.NULL_GESTURE_CONSUMER.willConsume());
         GestureConsumer.NULL_GESTURE_CONSUMER.onInit(null, null);
@@ -40,6 +48,7 @@
     /**
      * Tests that newInstance returns NULL_GESTURE_CONSUMER for invalid input.
      */
+    @Test
     public void testNewInstanceGivesNullGestureConsumerForInvalidInputs() {
         assertSame(GestureConsumer.NULL_GESTURE_CONSUMER,
                 GestureConsumer.newInstance(null, null, null, null));
diff --git a/tests/src/com/android/inputmethod/latin/utils/AdditionalSubtypeUtilsTests.java b/tests/src/com/android/inputmethod/latin/utils/AdditionalSubtypeUtilsTests.java
index 1db8395..08c404e 100644
--- a/tests/src/com/android/inputmethod/latin/utils/AdditionalSubtypeUtilsTests.java
+++ b/tests/src/com/android/inputmethod/latin/utils/AdditionalSubtypeUtilsTests.java
@@ -16,25 +16,36 @@
 
 package com.android.inputmethod.latin.utils;
 
-import static com.android.inputmethod.latin.common.Constants.Subtype.KEYBOARD_MODE;
 import static com.android.inputmethod.latin.common.Constants.Subtype.ExtraValue.ASCII_CAPABLE;
 import static com.android.inputmethod.latin.common.Constants.Subtype.ExtraValue.EMOJI_CAPABLE;
 import static com.android.inputmethod.latin.common.Constants.Subtype.ExtraValue.IS_ADDITIONAL_SUBTYPE;
 import static com.android.inputmethod.latin.common.Constants.Subtype.ExtraValue.KEYBOARD_LAYOUT_SET;
 import static com.android.inputmethod.latin.common.Constants.Subtype.ExtraValue.UNTRANSLATABLE_STRING_IN_SUBTYPE_NAME;
+import static com.android.inputmethod.latin.common.Constants.Subtype.KEYBOARD_MODE;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
 
 import android.content.Context;
 import android.os.Build;
-import android.test.AndroidTestCase;
-import android.test.suitebuilder.annotation.SmallTest;
 import android.view.inputmethod.InputMethodSubtype;
 
+import androidx.test.InstrumentationRegistry;
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
+
 import com.android.inputmethod.compat.InputMethodSubtypeCompatUtils;
 
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
 import java.util.Locale;
 
 @SmallTest
-public class AdditionalSubtypeUtilsTests extends AndroidTestCase {
+@RunWith(AndroidJUnit4.class)
+public class AdditionalSubtypeUtilsTests {
 
     /**
      * Predictable subtype ID for en_US dvorak layout. This is actually a hash code calculated as
@@ -98,10 +109,9 @@
             ",EmojiCapable" +
             ",isAdditionalSubtype";
 
-    @Override
-    protected void setUp() throws Exception {
-        super.setUp();
-        final Context context = getContext();
+    @Before
+    public void setUp() throws Exception {
+        final Context context = InstrumentationRegistry.getTargetContext();
         SubtypeLocaleUtils.init(context);
     }
 
@@ -149,6 +159,7 @@
         assertEquals(SUBTYPE_ID_ZZ_AZERTY, subtype.hashCode());
     }
 
+    @Test
     public void testRestorable() {
         final InputMethodSubtype EN_US_DVORAK =
                 AdditionalSubtypeUtils.createAsciiEmojiCapableAdditionalSubtype(
diff --git a/tests/src/com/android/inputmethod/latin/utils/AsyncResultHolderTests.java b/tests/src/com/android/inputmethod/latin/utils/AsyncResultHolderTests.java
index c214b5f..f537805 100644
--- a/tests/src/com/android/inputmethod/latin/utils/AsyncResultHolderTests.java
+++ b/tests/src/com/android/inputmethod/latin/utils/AsyncResultHolderTests.java
@@ -16,12 +16,19 @@
 
 package com.android.inputmethod.latin.utils;
 
-import android.test.AndroidTestCase;
-import android.test.suitebuilder.annotation.MediumTest;
+import static org.junit.Assert.assertEquals;
+
 import android.util.Log;
 
+import androidx.test.filters.MediumTest;
+import androidx.test.runner.AndroidJUnit4;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
 @MediumTest
-public class AsyncResultHolderTests extends AndroidTestCase {
+@RunWith(AndroidJUnit4.class)
+public class AsyncResultHolderTests {
     static final String TAG = AsyncResultHolderTests.class.getSimpleName();
 
     private static final int TIMEOUT_IN_MILLISECONDS = 500;
@@ -44,12 +51,14 @@
         }).start();
     }
 
+    @Test
     public void testGetWithoutSet() {
         final AsyncResultHolder<Integer> holder = new AsyncResultHolder<>("Test");
         final int resultValue = holder.get(DEFAULT_VALUE, TIMEOUT_IN_MILLISECONDS);
         assertEquals(DEFAULT_VALUE, resultValue);
     }
 
+    @Test
     public void testGetBeforeSet() {
         final AsyncResultHolder<Integer> holder = new AsyncResultHolder<>("Test");
         setAfterGivenTime(holder, SET_VALUE, TIMEOUT_IN_MILLISECONDS + MARGIN_IN_MILLISECONDS);
@@ -57,6 +66,7 @@
         assertEquals(DEFAULT_VALUE, resultValue);
     }
 
+    @Test
     public void testGetAfterSet() {
         final AsyncResultHolder<Integer> holder = new AsyncResultHolder<>("Test");
         holder.set(SET_VALUE);
@@ -64,6 +74,7 @@
         assertEquals(SET_VALUE, resultValue);
     }
 
+    @Test
     public void testGetBeforeTimeout() {
         final AsyncResultHolder<Integer> holder = new AsyncResultHolder<>("Test");
         setAfterGivenTime(holder, SET_VALUE, TIMEOUT_IN_MILLISECONDS - MARGIN_IN_MILLISECONDS);
diff --git a/tests/src/com/android/inputmethod/latin/utils/CapsModeUtilsTests.java b/tests/src/com/android/inputmethod/latin/utils/CapsModeUtilsTests.java
index 9680d85..4aac7fc 100644
--- a/tests/src/com/android/inputmethod/latin/utils/CapsModeUtilsTests.java
+++ b/tests/src/com/android/inputmethod/latin/utils/CapsModeUtilsTests.java
@@ -16,18 +16,27 @@
 
 package com.android.inputmethod.latin.utils;
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
 import android.content.res.Resources;
-import android.test.AndroidTestCase;
-import android.test.suitebuilder.annotation.SmallTest;
 import android.text.TextUtils;
 
+import androidx.test.InstrumentationRegistry;
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
+
 import com.android.inputmethod.latin.common.LocaleUtils;
 import com.android.inputmethod.latin.settings.SpacingAndPunctuations;
 
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
 import java.util.Locale;
 
 @SmallTest
-public class CapsModeUtilsTests extends AndroidTestCase {
+@RunWith(AndroidJUnit4.class)
+public class CapsModeUtilsTests {
     private static void onePathForCaps(final CharSequence cs, final int expectedResult,
             final int mask, final SpacingAndPunctuations sp, final boolean hasSpaceBefore) {
         final int oneTimeResult = expectedResult & mask;
@@ -49,6 +58,7 @@
         onePathForCaps(cs, expectedResult, s, sp, hasSpaceBefore);
     }
 
+    @Test
     public void testGetCapsMode() {
         final int c = TextUtils.CAP_MODE_CHARACTERS;
         final int w = TextUtils.CAP_MODE_WORDS;
@@ -59,7 +69,7 @@
                 return new SpacingAndPunctuations(res);
             }
         };
-        final Resources res = getContext().getResources();
+        final Resources res = InstrumentationRegistry.getTargetContext().getResources();
         SpacingAndPunctuations sp = job.runInLocale(res, Locale.ENGLISH);
         allPathsForCaps("", c | w | s, sp, false);
         allPathsForCaps("Word", c, sp, false);
diff --git a/tests/src/com/android/inputmethod/latin/utils/CollectionUtilsTests.java b/tests/src/com/android/inputmethod/latin/utils/CollectionUtilsTests.java
index 0cbb02c..da23c9c 100644
--- a/tests/src/com/android/inputmethod/latin/utils/CollectionUtilsTests.java
+++ b/tests/src/com/android/inputmethod/latin/utils/CollectionUtilsTests.java
@@ -16,11 +16,19 @@
 
 package com.android.inputmethod.latin.utils;
 
-import android.test.AndroidTestCase;
-import android.test.suitebuilder.annotation.SmallTest;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
 
 import com.android.inputmethod.latin.common.CollectionUtils;
 
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collections;
@@ -32,11 +40,13 @@
  * Tests for {@link CollectionUtils}.
  */
 @SmallTest
-public class CollectionUtilsTests extends AndroidTestCase {
+@RunWith(AndroidJUnit4.class)
+public class CollectionUtilsTests {
     /**
      * Tests that {@link CollectionUtils#arrayAsList(Object[],int,int)} fails as expected
      * with some invalid inputs.
      */
+    @Test
     public void testArrayAsListFailure() {
         final String[] array = { "0", "1" };
         // Negative start
@@ -66,6 +76,7 @@
      * Tests that {@link CollectionUtils#arrayAsList(Object[],int,int)} gives the expected
      * results for a few valid inputs.
      */
+    @Test
     public void testArrayAsList() {
         final ArrayList<String> empty = new ArrayList<>();
         assertEquals(empty, CollectionUtils.arrayAsList(new String[] {}, 0, 0));
@@ -81,6 +92,7 @@
      * Tests that {@link CollectionUtils#isNullOrEmpty(java.util.Collection)} gives the expected
      * results for a few cases.
      */
+    @Test
     public void testIsNullOrEmpty() {
         assertTrue(CollectionUtils.isNullOrEmpty((List<String>) null));
         assertTrue(CollectionUtils.isNullOrEmpty((Map<String, String>) null));
diff --git a/tests/src/com/android/inputmethod/latin/utils/DictionaryInfoUtilsTests.java b/tests/src/com/android/inputmethod/latin/utils/DictionaryInfoUtilsTests.java
index 812353c..2112f98 100644
--- a/tests/src/com/android/inputmethod/latin/utils/DictionaryInfoUtilsTests.java
+++ b/tests/src/com/android/inputmethod/latin/utils/DictionaryInfoUtilsTests.java
@@ -16,17 +16,28 @@
 
 package com.android.inputmethod.latin.utils;
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
 import android.content.res.Resources;
-import android.test.AndroidTestCase;
-import android.test.suitebuilder.annotation.SmallTest;
+
+import androidx.test.InstrumentationRegistry;
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
 
 import com.android.inputmethod.latin.common.LocaleUtils;
 import com.android.inputmethod.latin.settings.SpacingAndPunctuations;
 
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
 import java.util.Locale;
 
 @SmallTest
-public class DictionaryInfoUtilsTests extends AndroidTestCase {
+@RunWith(AndroidJUnit4.class)
+public class DictionaryInfoUtilsTests {
+    @Test
     public void testLooksValidForDictionaryInsertion() {
         final RunInLocale<SpacingAndPunctuations> job = new RunInLocale<SpacingAndPunctuations>() {
             @Override
@@ -34,7 +45,7 @@
                 return new SpacingAndPunctuations(res);
             }
         };
-        final Resources res = getContext().getResources();
+        final Resources res = InstrumentationRegistry.getTargetContext().getResources();
         final SpacingAndPunctuations sp = job.runInLocale(res, Locale.ENGLISH);
         assertTrue(DictionaryInfoUtils.looksValidForDictionaryInsertion("aochaueo", sp));
         assertFalse(DictionaryInfoUtils.looksValidForDictionaryInsertion("", sp));
@@ -46,6 +57,7 @@
         assertFalse(DictionaryInfoUtils.looksValidForDictionaryInsertion("!!!", sp));
     }
 
+    @Test
     public void testGetMainDictId() {
         assertEquals("main:en",
                 DictionaryInfoUtils.getMainDictId(LocaleUtils.constructLocaleFromString("en")));
diff --git a/tests/src/com/android/inputmethod/latin/utils/ExecutorUtilsTests.java b/tests/src/com/android/inputmethod/latin/utils/ExecutorUtilsTests.java
index 8692305..7c9b3e6 100644
--- a/tests/src/com/android/inputmethod/latin/utils/ExecutorUtilsTests.java
+++ b/tests/src/com/android/inputmethod/latin/utils/ExecutorUtilsTests.java
@@ -16,10 +16,16 @@
 
 package com.android.inputmethod.latin.utils;
 
-import android.test.AndroidTestCase;
-import android.test.suitebuilder.annotation.MediumTest;
+import static org.junit.Assert.assertEquals;
+
 import android.util.Log;
 
+import androidx.test.filters.MediumTest;
+import androidx.test.runner.AndroidJUnit4;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.atomic.AtomicInteger;
@@ -28,12 +34,14 @@
  * Unit tests for {@link ExecutorUtils}.
  */
 @MediumTest
-public class ExecutorUtilsTests extends AndroidTestCase {
+@RunWith(AndroidJUnit4.class)
+public class ExecutorUtilsTests {
     private static final String TAG = ExecutorUtilsTests.class.getSimpleName();
 
     private static final int NUM_OF_TASKS = 10;
     private static final int DELAY_FOR_WAITING_TASKS_MILLISECONDS = 500;
 
+    @Test
     public void testExecute() {
         final ExecutorService executor =
                 ExecutorUtils.getBackgroundExecutor(ExecutorUtils.KEYBOARD);
diff --git a/tests/src/com/android/inputmethod/latin/utils/ImportantNoticeUtilsTests.java b/tests/src/com/android/inputmethod/latin/utils/ImportantNoticeUtilsTests.java
index df01807..9d9a541 100644
--- a/tests/src/com/android/inputmethod/latin/utils/ImportantNoticeUtilsTests.java
+++ b/tests/src/com/android/inputmethod/latin/utils/ImportantNoticeUtilsTests.java
@@ -17,32 +17,41 @@
 package com.android.inputmethod.latin.utils;
 
 import static com.android.inputmethod.latin.utils.ImportantNoticeUtils.KEY_TIMESTAMP_OF_CONTACTS_NOTICE;
+
+import static org.junit.Assert.assertEquals;
 import static org.mockito.Mockito.when;
 
 import android.content.Context;
 import android.content.SharedPreferences;
-import android.test.AndroidTestCase;
-import android.test.suitebuilder.annotation.MediumTest;
-import android.text.TextUtils;
+
+import androidx.test.InstrumentationRegistry;
+import androidx.test.filters.MediumTest;
+import androidx.test.runner.AndroidJUnit4;
 
 import com.android.inputmethod.latin.settings.SettingsValues;
 
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
 import org.mockito.Mock;
 import org.mockito.MockitoAnnotations;
 
-import java.util.concurrent.TimeUnit;
-
 @MediumTest
-public class ImportantNoticeUtilsTests extends AndroidTestCase {
+@RunWith(AndroidJUnit4.class)
+public class ImportantNoticeUtilsTests {
 
     private ImportantNoticePreferences mImportantNoticePreferences;
 
     @Mock private SettingsValues mMockSettingsValues;
 
+    private Context getContext() {
+        return InstrumentationRegistry.getTargetContext();
+    }
+
     private static class ImportantNoticePreferences {
         private final SharedPreferences mPref;
 
-        private Integer mVersion;
         private Long mLastTime;
 
         public ImportantNoticePreferences(final Context context) {
@@ -96,21 +105,20 @@
         }
     }
 
-    @Override
-    protected void setUp() throws Exception {
-        super.setUp();
+    @Before
+    public void setUp() throws Exception {
         MockitoAnnotations.initMocks(this);
         mImportantNoticePreferences = new ImportantNoticePreferences(getContext());
         mImportantNoticePreferences.save();
         when(mMockSettingsValues.isPersonalizationEnabled()).thenReturn(true);
     }
 
-    @Override
-    protected void tearDown() throws Exception {
-        super.tearDown();
+    @After
+    public void tearDown() throws Exception {
         mImportantNoticePreferences.restore();
     }
 
+    @Test
     public void testPersonalizationSetting() {
         mImportantNoticePreferences.clear();
 
diff --git a/tests/src/com/android/inputmethod/latin/utils/JsonUtilsTests.java b/tests/src/com/android/inputmethod/latin/utils/JsonUtilsTests.java
index 1941120..fd5e0a4 100644
--- a/tests/src/com/android/inputmethod/latin/utils/JsonUtilsTests.java
+++ b/tests/src/com/android/inputmethod/latin/utils/JsonUtilsTests.java
@@ -16,14 +16,21 @@
 
 package com.android.inputmethod.latin.utils;
 
-import android.test.AndroidTestCase;
-import android.test.suitebuilder.annotation.SmallTest;
+import static org.junit.Assert.assertEquals;
+
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
 
 import java.util.Arrays;
 import java.util.List;
 
 @SmallTest
-public class JsonUtilsTests extends AndroidTestCase {
+@RunWith(AndroidJUnit4.class)
+public class JsonUtilsTests {
+    @Test
     public void testJsonUtils() {
         final Object[] objs = new Object[] { 1, "aaa", "bbb", 3 };
         final List<Object> objArray = Arrays.asList(objs);
diff --git a/tests/src/com/android/inputmethod/latin/utils/LanguageOnSpacebarUtilsTests.java b/tests/src/com/android/inputmethod/latin/utils/LanguageOnSpacebarUtilsTests.java
index e4b6a66..58e26e8 100644
--- a/tests/src/com/android/inputmethod/latin/utils/LanguageOnSpacebarUtilsTests.java
+++ b/tests/src/com/android/inputmethod/latin/utils/LanguageOnSpacebarUtilsTests.java
@@ -20,24 +20,33 @@
 import static com.android.inputmethod.latin.utils.LanguageOnSpacebarUtils.FORMAT_TYPE_LANGUAGE_ONLY;
 import static com.android.inputmethod.latin.utils.LanguageOnSpacebarUtils.FORMAT_TYPE_NONE;
 
+import static org.junit.Assert.assertEquals;
+
 import android.content.Context;
-import android.test.AndroidTestCase;
-import android.test.suitebuilder.annotation.SmallTest;
 import android.view.inputmethod.InputMethodSubtype;
 
+import androidx.test.InstrumentationRegistry;
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
+
 import com.android.inputmethod.latin.RichInputMethodManager;
 import com.android.inputmethod.latin.RichInputMethodSubtype;
 import com.android.inputmethod.latin.utils.AdditionalSubtypeUtils;
 import com.android.inputmethod.latin.utils.LanguageOnSpacebarUtils;
 import com.android.inputmethod.latin.utils.SubtypeLocaleUtils;
 
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
 import java.util.ArrayList;
 import java.util.Locale;
 
 import javax.annotation.Nonnull;
 
 @SmallTest
-public class LanguageOnSpacebarUtilsTests extends AndroidTestCase {
+@RunWith(AndroidJUnit4.class)
+public class LanguageOnSpacebarUtilsTests {
     private RichInputMethodManager mRichImm;
 
     RichInputMethodSubtype EN_US_QWERTY;
@@ -50,10 +59,9 @@
     RichInputMethodSubtype IW_HEBREW;
     RichInputMethodSubtype ZZ_QWERTY;
 
-    @Override
-    protected void setUp() throws Exception {
-        super.setUp();
-        final Context context = getContext();
+    @Before
+    public void setUp() throws Exception {
+        final Context context = InstrumentationRegistry.getTargetContext();
         RichInputMethodManager.init(context);
         mRichImm = RichInputMethodManager.getInstance();
 
@@ -99,6 +107,7 @@
                 LanguageOnSpacebarUtils.getLanguageOnSpacebarFormatType(subtype));
     }
 
+    @Test
     public void testOneSubtypeImplicitlyEnabled() {
         enableSubtypes(EN_US_QWERTY);
         assertFormatType(EN_US_QWERTY, true, Locale.US,            FORMAT_TYPE_NONE);
@@ -113,6 +122,7 @@
         assertFormatType(FR_CA_QWERTY, true, Locale.CANADA_FRENCH, FORMAT_TYPE_NONE);
     }
 
+    @Test
     public void testOneSubtypeExplicitlyEnabled() {
         enableSubtypes(EN_US_QWERTY);
         assertFormatType(EN_US_QWERTY, false, Locale.UK,     FORMAT_TYPE_LANGUAGE_ONLY);
@@ -131,6 +141,7 @@
         assertFormatType(FR_CA_QWERTY, false, Locale.FRANCE,        FORMAT_TYPE_LANGUAGE_ONLY);
     }
 
+    @Test
     public void testOneSubtypeImplicitlyEnabledWithNoLanguageSubtype() {
         final Locale Locale_IW = new Locale("iw");
         enableSubtypes(IW_HEBREW, ZZ_QWERTY);
@@ -140,6 +151,7 @@
         assertFormatType(ZZ_QWERTY,    true, Locale_IW, FORMAT_TYPE_FULL_LOCALE);
     }
 
+    @Test
     public void testTwoSubtypesExplicitlyEnabled() {
         enableSubtypes(EN_US_QWERTY, FR_AZERTY);
         assertFormatType(EN_US_QWERTY, false, Locale.US,     FORMAT_TYPE_LANGUAGE_ONLY);
@@ -157,6 +169,7 @@
 
     }
 
+    @Test
     public void testMultiSubtypeWithSameLanuageAndSameLayout() {
         // Explicitly enable en_US, en_GB, fr_FR, and no language keyboards.
         enableSubtypes(EN_US_QWERTY, EN_GB_QWERTY, FR_CA_QWERTY, ZZ_QWERTY);
@@ -172,6 +185,7 @@
         assertFormatType(ZZ_QWERTY,    false, Locale.JAPAN, FORMAT_TYPE_FULL_LOCALE);
     }
 
+    @Test
     public void testMultiSubtypesWithSameLanguageButHaveDifferentLayout() {
         enableSubtypes(FR_AZERTY, FR_CA_QWERTY, FR_CH_SWISS, FR_CH_QWERTZ);
 
@@ -191,6 +205,7 @@
         assertFormatType(FR_CH_QWERTZ, false, Locale.JAPAN, FORMAT_TYPE_LANGUAGE_ONLY);
     }
 
+    @Test
     public void testMultiSubtypesWithSameLanguageAndMayHaveSameLayout() {
         enableSubtypes(FR_AZERTY, FR_CA_QWERTY, FR_CH_SWISS, FR_CH_QWERTY, FR_CH_QWERTZ);
 
diff --git a/tests/src/com/android/inputmethod/latin/utils/RecapitalizeStatusTests.java b/tests/src/com/android/inputmethod/latin/utils/RecapitalizeStatusTests.java
index 9b82683..0908f2b 100644
--- a/tests/src/com/android/inputmethod/latin/utils/RecapitalizeStatusTests.java
+++ b/tests/src/com/android/inputmethod/latin/utils/RecapitalizeStatusTests.java
@@ -16,17 +16,24 @@
 
 package com.android.inputmethod.latin.utils;
 
-import android.test.AndroidTestCase;
-import android.test.suitebuilder.annotation.SmallTest;
+import static org.junit.Assert.assertEquals;
+
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
 
 import com.android.inputmethod.latin.common.Constants;
 
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
 import java.util.Locale;
 
 @SmallTest
-public class RecapitalizeStatusTests extends AndroidTestCase {
+@RunWith(AndroidJUnit4.class)
+public class RecapitalizeStatusTests {
     private static final int[] SPACE = { Constants.CODE_SPACE };
 
+    @Test
     public void testTrim() {
         final RecapitalizeStatus status = new RecapitalizeStatus();
         status.start(30, 40, "abcdefghij", Locale.ENGLISH, SPACE);
@@ -54,6 +61,7 @@
         assertEquals(43, status.getNewCursorEnd());
     }
 
+    @Test
     public void testRotate() {
         final RecapitalizeStatus status = new RecapitalizeStatus();
         status.start(29, 40, "abcd efghij", Locale.ENGLISH, SPACE);
diff --git a/tests/src/com/android/inputmethod/latin/utils/ResourceUtilsTests.java b/tests/src/com/android/inputmethod/latin/utils/ResourceUtilsTests.java
index 8e764e4..4aab96a 100644
--- a/tests/src/com/android/inputmethod/latin/utils/ResourceUtilsTests.java
+++ b/tests/src/com/android/inputmethod/latin/utils/ResourceUtilsTests.java
@@ -16,13 +16,21 @@
 
 package com.android.inputmethod.latin.utils;
 
-import android.test.AndroidTestCase;
-import android.test.suitebuilder.annotation.SmallTest;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
+
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
 
 import java.util.HashMap;
 
 @SmallTest
-public class ResourceUtilsTests extends AndroidTestCase {
+@RunWith(AndroidJUnit4.class)
+public class ResourceUtilsTests {
+    @Test
     public void testFindConstantForKeyValuePairsSimple() {
         final HashMap<String,String> anyKeyValue = new HashMap<>();
         anyKeyValue.put("anyKey", "anyValue");
@@ -69,6 +77,7 @@
         assertNull(ResourceUtils.findConstantForKeyValuePairs(emptyKeyValue, array));
     }
 
+    @Test
     public void testFindConstantForKeyValuePairsCombined() {
         final String HARDWARE_KEY = "HARDWARE";
         final String MODEL_KEY = "MODEL";
@@ -113,6 +122,7 @@
         assertEquals("0.2", ResourceUtils.findConstantForKeyValuePairs(keyValues, failArray));
     }
 
+    @Test
     public void testFindConstantForKeyValuePairsRegexp() {
         final String HARDWARE_KEY = "HARDWARE";
         final String MODEL_KEY = "MODEL";
diff --git a/tests/src/com/android/inputmethod/latin/utils/SpannableStringUtilsTests.java b/tests/src/com/android/inputmethod/latin/utils/SpannableStringUtilsTests.java
index 665d81c..a5987cf 100644
--- a/tests/src/com/android/inputmethod/latin/utils/SpannableStringUtilsTests.java
+++ b/tests/src/com/android/inputmethod/latin/utils/SpannableStringUtilsTests.java
@@ -16,17 +16,33 @@
 
 package com.android.inputmethod.latin.utils;
 
-import android.test.AndroidTestCase;
-import android.test.suitebuilder.annotation.SmallTest;
-import android.text.style.SuggestionSpan;
-import android.text.style.URLSpan;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import android.content.Context;
 import android.text.SpannableString;
 import android.text.SpannableStringBuilder;
 import android.text.Spanned;
 import android.text.SpannedString;
+import android.text.style.SuggestionSpan;
+import android.text.style.URLSpan;
+
+import androidx.test.InstrumentationRegistry;
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
 
 @SmallTest
-public class SpannableStringUtilsTests extends AndroidTestCase {
+@RunWith(AndroidJUnit4.class)
+public class SpannableStringUtilsTests {
+
+    private Context getContext() {
+        return InstrumentationRegistry.getTargetContext();
+    }
+
+    @Test
     public void testConcatWithSuggestionSpansOnly() {
         SpannableStringBuilder s = new SpannableStringBuilder("test string\ntest string\n"
                 + "test string\ntest string\ntest string\ntest string\ntest string\ntest string\n"
@@ -87,6 +103,7 @@
         assertTrue(false);
     }
 
+    @Test
     public void testSplitCharSequenceWithSpan() {
         // text:  " a bcd efg hij  "
         // span1:  ^^^^^^^
@@ -182,6 +199,7 @@
         assertSpanCount(0, charSequencesFromSpanned[6]);
     }
 
+    @Test
     public void testSplitCharSequencePreserveTrailingEmptySegmengs() {
         assertEquals(1, SpannableStringUtils.split("", " ",
                 false /* preserveTrailingEmptySegmengs */).length);
diff --git a/tests/src/com/android/inputmethod/latin/utils/SubtypeLocaleUtilsTests.java b/tests/src/com/android/inputmethod/latin/utils/SubtypeLocaleUtilsTests.java
index 2297cac..6764fd8 100644
--- a/tests/src/com/android/inputmethod/latin/utils/SubtypeLocaleUtilsTests.java
+++ b/tests/src/com/android/inputmethod/latin/utils/SubtypeLocaleUtilsTests.java
@@ -16,22 +16,35 @@
 
 package com.android.inputmethod.latin.utils;
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
 import android.content.Context;
 import android.content.res.Resources;
-import android.test.AndroidTestCase;
-import android.test.suitebuilder.annotation.SmallTest;
 import android.view.inputmethod.InputMethodInfo;
 import android.view.inputmethod.InputMethodSubtype;
 
+import androidx.test.InstrumentationRegistry;
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
+
 import com.android.inputmethod.latin.R;
 import com.android.inputmethod.latin.RichInputMethodManager;
 import com.android.inputmethod.latin.RichInputMethodSubtype;
 
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
 import java.util.ArrayList;
 import java.util.Locale;
 
 @SmallTest
-public class SubtypeLocaleUtilsTests extends AndroidTestCase {
+@RunWith(AndroidJUnit4.class)
+public class SubtypeLocaleUtilsTests {
     // All input method subtypes of LatinIME.
     private final ArrayList<RichInputMethodSubtype> mSubtypesList = new ArrayList<>();
 
@@ -64,10 +77,9 @@
     InputMethodSubtype HI_LATN_DVORAK; // Hinglis Dvorak
     InputMethodSubtype SR_LATN_QWERTY; // Serbian Latin Qwerty
 
-    @Override
-    protected void setUp() throws Exception {
-        super.setUp();
-        final Context context = getContext();
+    @Before
+    public void setUp() throws Exception {
+        final Context context = InstrumentationRegistry.getTargetContext();
         mRes = context.getResources();
         RichInputMethodManager.init(context);
         mRichImm = RichInputMethodManager.getInstance();
@@ -136,13 +148,13 @@
         }
     }
 
-    @Override
-    protected void tearDown() throws Exception {
+    @After
+    public void tearDown() throws Exception {
         // Restore additional subtypes.
         mRichImm.setAdditionalInputMethodSubtypes(mSavedAddtionalSubtypes);
-        super.tearDown();
     }
 
+    @Test
     public void testAllFullDisplayName() {
         for (final RichInputMethodSubtype subtype : mSubtypesList) {
             final String subtypeName = SubtypeLocaleUtils
@@ -159,6 +171,7 @@
         }
     }
 
+    @Test
     public void testKeyboardLayoutSetName() {
         assertEquals("en_US", "qwerty", SubtypeLocaleUtils.getKeyboardLayoutSetName(EN_US));
         assertEquals("en_GB", "qwerty", SubtypeLocaleUtils.getKeyboardLayoutSetName(EN_GB));
@@ -223,6 +236,7 @@
     //  sr_ZZ qwerty         T  Serbian (QWERTY)        exception
     //  zz    pc             T  Alphabet (PC)
 
+    @Test
     public void testPredefinedSubtypesInEnglishSystemLocale() {
         final RunInLocale<Void> tests = new RunInLocale<Void>() {
             @Override
@@ -264,6 +278,7 @@
         tests.runInLocale(mRes, Locale.ENGLISH);
     }
 
+    @Test
     public void testAdditionalSubtypesInEnglishSystemLocale() {
         final RunInLocale<Void> tests = new RunInLocale<Void>() {
             @Override
@@ -323,6 +338,7 @@
     //  sr_ZZ qwerty         T  Serbe (QWERTY)                   exception
     //  zz    pc             T  Alphabet latin (PC)
 
+    @Test
     public void testPredefinedSubtypesInFrenchSystemLocale() {
         final RunInLocale<Void> tests = new RunInLocale<Void>() {
             @Override
@@ -364,6 +380,7 @@
         tests.runInLocale(mRes, Locale.FRENCH);
     }
 
+    @Test
     public void testAdditionalSubtypesInFrenchSystemLocale() {
         final RunInLocale<Void> tests = new RunInLocale<Void>() {
             @Override
@@ -405,6 +422,7 @@
     //  hi_ZZ qwerty  F  हिंग्लिश
     //  hi_ZZ dvorak  T  हिंग्लिश (Dvorak)
 
+    @Test
     public void testHinglishSubtypesInHindiSystemLocale() {
         final RunInLocale<Void> tests = new RunInLocale<Void>() {
             @Override
@@ -432,6 +450,7 @@
     //  sr_ZZ serbian_qwertz F  Српски (латиница)
     //  sr_ZZ qwerty         T  Српски (QWERTY)
 
+    @Test
     public void testSerbianLatinSubtypesInSerbianSystemLocale() {
         final RunInLocale<Void> tests = new RunInLocale<Void>() {
             @Override
@@ -451,6 +470,7 @@
         tests.runInLocale(mRes, new Locale("sr"));
     }
 
+    @Test
     public void testIsRtlLanguage() {
         // Known Right-to-Left language subtypes.
         final InputMethodSubtype ARABIC = mRichImm
diff --git a/tools/Android.mk b/tools/Android.mk
deleted file mode 100644
index 91b2fbb..0000000
--- a/tools/Android.mk
+++ /dev/null
@@ -1,15 +0,0 @@
-# Copyright (C) 2010 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.
-
-include $(call all-subdir-makefiles)
diff --git a/tools/EditTextVariations/Android.bp b/tools/EditTextVariations/Android.bp
new file mode 100644
index 0000000..94b4951
--- /dev/null
+++ b/tools/EditTextVariations/Android.bp
@@ -0,0 +1,22 @@
+// Copyright (C) 2013 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.
+
+android_test {
+    name: "EditTextVariations",
+
+    srcs: ["src/**/*.java"],
+
+    sdk_version: "current",
+    min_sdk_version: "11",
+}
diff --git a/tools/EditTextVariations/AndroidManifest.xml b/tools/EditTextVariations/AndroidManifest.xml
new file mode 100644
index 0000000..96c244b
--- /dev/null
+++ b/tools/EditTextVariations/AndroidManifest.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2010 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.
+-->
+
+<manifest
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    package="com.android.inputmethod.tools.edittextvariations"
+    android:versionName="0.67"
+    android:versionCode="67"
+>
+    <supports-screens android:resizeable="true" />
+    <uses-sdk
+        android:targetSdkVersion="27"
+        android:minSdkVersion="11" />
+    <application
+        android:icon="@drawable/ic_launcher"
+        android:label="@string/app_name"
+        android:allowBackup="false"
+    >
+        <activity
+            android:name=".EditTextVariations"
+            android:windowSoftInputMode="stateHidden|adjustPan"
+            android:theme="@style/defaultActivityTheme"
+            android:label="@string/app_name"
+        >
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+        <receiver
+            android:name=".NotificationBroadcastReceiver"
+            android:exported="false" />
+    </application>
+</manifest>
diff --git a/tools/EditTextVariations/assets/Theme.css b/tools/EditTextVariations/assets/Theme.css
new file mode 100644
index 0000000..b7aa514
--- /dev/null
+++ b/tools/EditTextVariations/assets/Theme.css
@@ -0,0 +1,56 @@
+<!--
+/*
+**
+** Copyright 2014, 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.
+*/
+-->
+
+body {
+    background-color: black;
+}
+div.placeholder {
+    color: #a0a0a0;
+    font-size: 18px;
+    margin: 0px 0px -34px 0px;
+    padding: 4px 0px 4px 0px
+}
+div.input {
+    border: none;
+    margin: 4px 0px 4px -8px;
+}
+input {
+    color: black;
+    background-color: white;
+    font-size: 18px;
+    line-height: 200%;
+    vertical-align: center;
+    padding-left: 8px;
+    border-top: none;
+    border-right: none;
+    border-bottom: none;
+    border-left: none;
+}
+textarea {
+    color: black;
+    background-color: white;
+    font-size: 18px;
+    line-height: 150%;
+    vertical-align: center;
+    padding-left: 8px;
+    border-top: none;
+    border-right: none;
+    border-bottom: none;
+    border-left: none;
+}
diff --git a/tools/EditTextVariations/assets/Theme_Black.css b/tools/EditTextVariations/assets/Theme_Black.css
new file mode 100644
index 0000000..ce663a1
--- /dev/null
+++ b/tools/EditTextVariations/assets/Theme_Black.css
@@ -0,0 +1,56 @@
+<!--
+/*
+**
+** Copyright 2011, 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.
+*/
+-->
+
+body {
+    background-color: black;
+}
+div.placeholder {
+    color: #a0a0a0;
+    font-size: 18px;
+    margin: 0px 0px -34px 0px;
+    padding: 4px 0px 4px 0px
+}
+div.input {
+    border: none;
+    margin: 4px 0px 4px -8px;
+}
+input {
+    color: black;
+    background-color: white;
+    font-size: 18px;
+    line-height: 200%;
+    vertical-align: center;
+    padding-left: 8px;
+    border-top: none;
+    border-right: none;
+    border-bottom: none;
+    border-left: none;
+}
+textarea {
+    color: black;
+    background-color: white;
+    font-size: 18px;
+    line-height: 150%;
+    vertical-align: center;
+    padding-left: 8px;
+    border-top: none;
+    border-right: none;
+    border-bottom: none;
+    border-left: none;
+}
diff --git a/tools/EditTextVariations/assets/Theme_Holo.css b/tools/EditTextVariations/assets/Theme_Holo.css
new file mode 100644
index 0000000..a3afe2e
--- /dev/null
+++ b/tools/EditTextVariations/assets/Theme_Holo.css
@@ -0,0 +1,56 @@
+<!--
+/*
+**
+** Copyright 2011, 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.
+*/
+-->
+
+body {
+    background-color: #16191C;
+}
+div.placeholder {
+    color: #808080;
+    font-size: 18px;
+    margin: 0px 0px -34px 0px;
+    padding: 4px 0px 4px 0px
+}
+div.input {
+    border: none;
+    margin: 4px 0px 4px -8px;
+}
+input {
+    color: white;
+    background-color: rgba(0, 0, 0, 0.0);
+    font-size: 18px;
+    line-height: 180%;
+    vertical-align: center;
+    padding-left: 8px;
+    border-top: none;
+    border-right: none;
+    border-bottom: 1px solid #5E6063;
+    border-left: none;
+}
+textarea {
+    color: white;
+    background-color: rgba(0, 0, 0, 0.0);
+    font-size: 18px;
+    line-height: 150%;
+    vertical-align: center;
+    padding-left: 8px;
+    border-top: none;
+    border-right: none;
+    border-bottom: 1px solid #5E6063;
+    border-left: none;
+}
diff --git a/tools/EditTextVariations/assets/Theme_Holo_Light.css b/tools/EditTextVariations/assets/Theme_Holo_Light.css
new file mode 100644
index 0000000..fb3a83c
--- /dev/null
+++ b/tools/EditTextVariations/assets/Theme_Holo_Light.css
@@ -0,0 +1,56 @@
+<!--
+/*
+**
+** Copyright 2011, 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.
+*/
+-->
+
+body {
+    background-color: #F2F2F2;
+}
+div.placeholder {
+    color: #808080;
+    font-size: 18px;
+    margin: 0px 0px -34px 0px;
+    padding: 4px 0px 4px 0px
+}
+div.input {
+    border: none;
+    margin: 4px 0px 4px -8px;
+}
+input {
+    color: black;
+    background-color: rgba(0, 0, 0, 0.0);
+    font-size: 18px;
+    line-height: 150%;
+    vertical-align: center;
+    padding-left: 8px;
+    border-top: none;
+    border-right: none;
+    border-bottom: 1px solid #808080;
+    border-left: none;
+}
+textarea {
+    color: black;
+    background-color: rgba(0, 0, 0, 0.0);
+    font-size: 18px;
+    line-height: 150%;
+    vertical-align: center;
+    padding-left: 8px;
+    border-top: none;
+    border-right: none;
+    border-bottom: 1px solid #808080;
+    border-left: none;
+}
diff --git a/tools/EditTextVariations/assets/Theme_Light.css b/tools/EditTextVariations/assets/Theme_Light.css
new file mode 100644
index 0000000..4cce0a0
--- /dev/null
+++ b/tools/EditTextVariations/assets/Theme_Light.css
@@ -0,0 +1,56 @@
+<!--
+/*
+**
+** Copyright 2011, 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.
+*/
+-->
+
+body {
+    background-color: #f3f3f3;
+}
+div.placeholder {
+    color: #a0a0a0;
+    font-size: 18px;
+    margin: 0px 0px -34px 0px;
+    padding: 4px 0px 4px 0px
+}
+div.input {
+    border: none;
+    margin: 4px 0px 4px -8px;
+}
+input {
+    color: black;
+    background-color: rgba(0, 0, 0, 0.0);
+    font-size: 18px;
+    line-height: 200%;
+    vertical-align: center;
+    padding-left: 8px;
+    border-top: 1px solid #808080;
+    border-right: 1px solid rgba(0, 0, 0, 0.5);
+    border-bottom: 1px solid #808080;
+    border-left: 1px solid rgba(0, 0, 0, 0.5);
+}
+textarea {
+    color: black;
+    background-color: rgba(0, 0, 0, 0.0);
+    font-size: 18px;
+    line-height: 150%;
+    vertical-align: center;
+    padding-left: 8px;
+    border-top: 1px solid #808080;
+    border-right: 1px solid rgba(0, 0, 0, 0.5);
+    border-bottom: 1px solid #808080;
+    border-left: 1px solid rgba(0, 0, 0, 0.5);
+}
diff --git a/tools/EditTextVariations/assets/Theme_Material.css b/tools/EditTextVariations/assets/Theme_Material.css
new file mode 100644
index 0000000..3581a88
--- /dev/null
+++ b/tools/EditTextVariations/assets/Theme_Material.css
@@ -0,0 +1,56 @@
+<!--
+/*
+**
+** Copyright 2014, 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.
+*/
+-->
+
+body {
+    background-color: #212121;
+}
+div.placeholder {
+    color: #909090;
+    font-size: 18px;
+    margin: 0px 0px -34px 0px;
+    padding: 4px 0px 4px 0px
+}
+div.input {
+    border: none;
+    margin: 4px 0px 4px -8px;
+}
+input {
+    color: white;
+    background-color: rgba(0, 0, 0, 0.0);
+    font-size: 18px;
+    line-height: 180%;
+    vertical-align: center;
+    padding-left: 8px;
+    border-top: none;
+    border-right: none;
+    border-bottom: 1px solid #757575;
+    border-left: none;
+}
+textarea {
+    color: white;
+    background-color: rgba(0, 0, 0, 0.0);
+    font-size: 18px;
+    line-height: 150%;
+    vertical-align: center;
+    padding-left: 8px;
+    border-top: none;
+    border-right: none;
+    border-bottom: 1px solid #757575;
+    border-left: none;
+}
diff --git a/tools/EditTextVariations/assets/Theme_Material_Light.css b/tools/EditTextVariations/assets/Theme_Material_Light.css
new file mode 100644
index 0000000..1a78a2d
--- /dev/null
+++ b/tools/EditTextVariations/assets/Theme_Material_Light.css
@@ -0,0 +1,56 @@
+<!--
+/*
+**
+** Copyright 2014, 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.
+*/
+-->
+
+body {
+    background-color: #FAFAFA;
+}
+div.placeholder {
+    color: #7D7D7D;
+    font-size: 18px;
+    margin: 0px 0px -34px 0px;
+    padding: 4px 0px 4px 0px
+}
+div.input {
+    border: none;
+    margin: 4px 0px 4px -8px;
+}
+input {
+    color: white;
+    background-color: rgba(0, 0, 0, 0.0);
+    font-size: 18px;
+    line-height: 180%;
+    vertical-align: center;
+    padding-left: 8px;
+    border-top: none;
+    border-right: none;
+    border-bottom: 1px solid #737373;
+    border-left: none;
+}
+textarea {
+    color: white;
+    background-color: rgba(0, 0, 0, 0.0);
+    font-size: 18px;
+    line-height: 150%;
+    vertical-align: center;
+    padding-left: 8px;
+    border-top: none;
+    border-right: none;
+    border-bottom: 1px solid #737373;
+    border-left: none;
+}
diff --git a/tools/EditTextVariations/assets/webview.html b/tools/EditTextVariations/assets/webview.html
new file mode 100644
index 0000000..daf0fdb
--- /dev/null
+++ b/tools/EditTextVariations/assets/webview.html
@@ -0,0 +1,96 @@
+<!--
+/*
+**
+** Copyright 2011, 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.
+*/
+-->
+
+<html>
+    <head>
+        <script type="text/javascript">
+            (function(d, name) {
+                var css = document.createElement('link');
+                css.rel = 'stylesheet';
+                css.href = name + ".css";
+                d.head.appendChild(css);
+            })(document, theme.name());
+        </script>
+    </head>
+    <body>
+    <div
+        class="input"
+        style="margin-top:-8px"
+    >
+        <input
+            type="text"
+            size="80%"
+            name="webtext"
+            placeholder="&lt;input type=&quot;text&quot;/&gt;" />
+    </div>
+    <div class="input">
+        <input
+            type="email"
+            size="80%"
+            name="webemail"
+            placeholder="&lt;input type=&quot;email&quot;/&gt;" />
+    </div>
+    <div class="input">
+        <input
+            type="password"
+            size="80%"
+            name="webpassword"
+            placeholder="&lt;input type=&quot;password&quot;/&gt;" />
+    </div>
+    <div class="input">
+        <input
+            type="url"
+            size="80%"
+            name="weburl"
+            placeholder="&lt;input type=&quot;url&quot;/&gt;" />
+    </div>
+    <div class="input">
+        <input
+            type="number"
+            size="80%"
+            name="webnumber"
+            placeholder="&lt;input type=&quot;number&quot;/&gt;" />
+    </div>
+    <div class="input">
+        <input
+            type="tel"
+            size="80%"
+            name="webtel"
+            placeholder="&lt;input type=&quot;tel&quot;/&gt;" />
+    </div>
+    <div class="input">
+        <input
+            type="search"
+            size="80%"
+            name="websearch"
+            placeholder="&lt;input type=&quot;search&quot;/&gt;" />
+    </div>
+    <div
+        class="input"
+        style="margin-bottom:-4px"
+    >
+        <textarea
+            rows="2"
+            cols="80%"
+            name="webtextarea"
+            placeholder="&lt;textarea&gt;&lt/textarea&gt;"
+        ></textarea>
+    </div>
+  </body>
+</html>
diff --git a/tools/EditTextVariations/res/drawable-hdpi/ic_launcher.png b/tools/EditTextVariations/res/drawable-hdpi/ic_launcher.png
new file mode 100644
index 0000000..e0923a6
--- /dev/null
+++ b/tools/EditTextVariations/res/drawable-hdpi/ic_launcher.png
Binary files differ
diff --git a/tools/EditTextVariations/res/drawable-mdpi/ic_launcher.png b/tools/EditTextVariations/res/drawable-mdpi/ic_launcher.png
new file mode 100644
index 0000000..9bc0914
--- /dev/null
+++ b/tools/EditTextVariations/res/drawable-mdpi/ic_launcher.png
Binary files differ
diff --git a/tools/EditTextVariations/res/drawable-xhdpi/ic_launcher.png b/tools/EditTextVariations/res/drawable-xhdpi/ic_launcher.png
new file mode 100644
index 0000000..d60ac3d
--- /dev/null
+++ b/tools/EditTextVariations/res/drawable-xhdpi/ic_launcher.png
Binary files differ
diff --git a/tools/EditTextVariations/res/drawable-xxhdpi/ic_launcher.png b/tools/EditTextVariations/res/drawable-xxhdpi/ic_launcher.png
new file mode 100644
index 0000000..f3069d7
--- /dev/null
+++ b/tools/EditTextVariations/res/drawable-xxhdpi/ic_launcher.png
Binary files differ
diff --git a/tools/EditTextVariations/res/layout/main.xml b/tools/EditTextVariations/res/layout/main.xml
new file mode 100644
index 0000000..99abfb0
--- /dev/null
+++ b/tools/EditTextVariations/res/layout/main.xml
@@ -0,0 +1,298 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2010, 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.
+*/
+-->
+
+<ScrollView
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="fill_parent"
+    android:layout_height="fill_parent"
+>
+    <LinearLayout
+        android:id="@+id/edit_text_list"
+        android:orientation="vertical"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+    >
+        <EditText
+            android:id="@+id/text_multi_lines_none"
+            android:layout_width="fill_parent"
+            android:layout_height="wrap_content"
+            android:inputType="textMultiLine|textAutoCorrect"
+            android:imeOptions="actionUnspecified" />
+        <EditText
+            android:id="@+id/text_multi_lines_send"
+            android:layout_width="fill_parent"
+            android:layout_height="wrap_content"
+            android:inputType="textMultiLine|textAutoCorrect"
+            android:imeOptions="actionSend" />
+        <view
+            class="com.android.inputmethod.tools.edittextvariations.MultiLineShortMessageEditText"
+            android:id="@+id/text_short_message_send_multi_lines"
+            android:layout_width="fill_parent"
+            android:layout_height="wrap_content"
+            android:inputType="textShortMessage|textMultiLine|textAutoCorrect|textCapSentences"
+            android:imeOptions="actionSend" />
+        <view
+            class="com.android.inputmethod.tools.edittextvariations.MultiLineShortMessageEditText"
+            android:id="@+id/text_multi_lines_search"
+            android:layout_width="fill_parent"
+            android:layout_height="wrap_content"
+            android:inputType="textMultiLine|textAutoCorrect|textCapSentences"
+            android:imeOptions="actionSearch" />
+        <EditText
+            android:id="@+id/text_short_message_send"
+            android:layout_width="fill_parent"
+            android:layout_height="wrap_content"
+            android:inputType="textShortMessage|textAutoCorrect|textCapSentences"
+            android:imeOptions="actionSend" />
+        <EditText
+            android:id="@+id/text_autocap_none"
+            android:layout_width="fill_parent"
+            android:layout_height="wrap_content"
+            android:inputType="textAutoCorrect|textCapSentences"
+            android:imeOptions="actionNone" />
+        <EditText
+            android:id="@+id/text_autocap_send"
+            android:layout_width="fill_parent"
+            android:layout_height="wrap_content"
+            android:inputType="textAutoCorrect|textCapSentences"
+            android:imeOptions="actionSend" />
+        <EditText
+            android:id="@+id/text_uri_go"
+            android:layout_width="fill_parent"
+            android:layout_height="wrap_content"
+            android:inputType="textUri"
+            android:imeOptions="actionGo" />
+        <EditText
+            android:id="@+id/text_email_address_done"
+            android:layout_width="fill_parent"
+            android:layout_height="wrap_content"
+            android:inputType="textEmailAddress"
+            android:imeOptions="actionDone" />
+        <EditText
+            android:id="@+id/text_auto_correct_search"
+            android:layout_width="fill_parent"
+            android:layout_height="wrap_content"
+            android:inputType="textAutoCorrect"
+            android:imeOptions="actionSearch" />
+        <EditText
+            android:id="@+id/text_auto_correct_next"
+            android:layout_width="fill_parent"
+            android:layout_height="wrap_content"
+            android:inputType="textAutoCorrect"
+            android:imeOptions="actionNext" />
+        <EditText
+            android:id="@+id/text_auto_correct_previous"
+            android:layout_width="fill_parent"
+            android:layout_height="wrap_content"
+            android:inputType="textAutoCorrect" />
+        <EditText
+            android:id="@+id/text_auto_correct_custom"
+            android:layout_width="fill_parent"
+            android:layout_height="wrap_content"
+            android:inputType="textAutoCorrect"
+            android:imeActionLabel="@string/custom_action_label"
+            android:imeActionId="100" />
+        <EditText
+            android:id="@+id/phone"
+            android:layout_width="fill_parent"
+            android:layout_height="wrap_content"
+            android:inputType="phone" />
+        <EditText
+            android:id="@+id/phone_no_action"
+            android:layout_width="fill_parent"
+            android:layout_height="wrap_content"
+            android:inputType="phone"
+            android:imeOptions="actionNone" />
+        <EditText
+            android:id="@+id/number_send"
+            android:layout_width="fill_parent"
+            android:layout_height="wrap_content"
+            android:inputType="number"
+            android:imeOptions="actionSend" />
+        <EditText
+            android:id="@+id/number_no_action"
+            android:layout_width="fill_parent"
+            android:layout_height="wrap_content"
+            android:inputType="number"
+            android:imeOptions="actionNone" />
+        <EditText
+            android:id="@+id/text_password_next"
+            android:layout_width="fill_parent"
+            android:layout_height="wrap_content"
+            android:inputType="textPassword"
+            android:imeOptions="actionNext" />
+        <EditText
+            android:id="@+id/text_visible_password_done"
+            android:layout_width="fill_parent"
+            android:layout_height="wrap_content"
+            android:inputType="textVisiblePassword"
+            android:imeOptions="actionDone" />
+        <EditText
+            android:id="@+id/number_password_send"
+            android:layout_width="fill_parent"
+            android:layout_height="wrap_content"
+            android:inputType="numberPassword"
+            android:imeOptions="actionDone" />
+        <EditText
+            android:id="@+id/text_no_suggestions"
+            android:layout_width="fill_parent"
+            android:layout_height="wrap_content"
+            android:inputType="textNoSuggestions"
+            android:imeOptions="actionGo" />
+        <EditText
+            android:id="@+id/text_no_auto_correction"
+            android:layout_width="fill_parent"
+            android:layout_height="wrap_content"
+            android:inputType="textShortMessage"
+            android:imeOptions="actionDone" />
+        <WebView
+            android:id="@+id/web_view"
+            android:layout_width="fill_parent"
+            android:layout_height="380sp"
+            android:focusable="true" />
+        <EditText
+            android:id="@+id/text_cap_characters_with_auto_correction"
+            android:layout_width="fill_parent"
+            android:layout_height="wrap_content"
+            android:inputType="textCapCharacters|textAutoCorrect" />
+        <EditText
+            android:id="@+id/text_cap_words_with_auto_correction"
+            android:layout_width="fill_parent"
+            android:layout_height="wrap_content"
+            android:inputType="textCapWords|textAutoCorrect" />
+        <EditText
+            android:id="@+id/text_cap_sentences_with_auto_correction"
+            android:layout_width="fill_parent"
+            android:layout_height="wrap_content"
+            android:inputType="textCapSentences|textAutoCorrect" />
+        <EditText
+            android:id="@+id/text_cap_characters"
+            android:layout_width="fill_parent"
+            android:layout_height="wrap_content"
+            android:inputType="textCapCharacters" />
+        <EditText
+            android:id="@+id/text_cap_words"
+            android:layout_width="fill_parent"
+            android:layout_height="wrap_content"
+            android:inputType="textCapWords" />
+        <EditText
+            android:id="@+id/text_cap_sentences"
+            android:layout_width="fill_parent"
+            android:layout_height="wrap_content"
+            android:inputType="textCapSentences" />
+        <EditText
+            android:id="@+id/text_email_subject"
+            android:layout_width="fill_parent"
+            android:layout_height="wrap_content"
+            android:inputType="textEmailSubject" />
+        <EditText
+            android:id="@+id/text_personal_name"
+            android:layout_width="fill_parent"
+            android:layout_height="wrap_content"
+            android:inputType="textPersonName" />
+        <EditText
+            android:id="@+id/text_postal_address"
+            android:layout_width="fill_parent"
+            android:layout_height="wrap_content"
+            android:inputType="textPostalAddress" />
+        <EditText
+            android:id="@+id/text_phonetic"
+            android:layout_width="fill_parent"
+            android:layout_height="wrap_content"
+            android:inputType="textPhonetic" />
+        <EditText
+            android:id="@+id/number_signed"
+            android:layout_width="fill_parent"
+            android:layout_height="wrap_content"
+            android:inputType="numberSigned" />
+        <EditText
+            android:id="@+id/number_decimal"
+            android:layout_width="fill_parent"
+            android:layout_height="wrap_content"
+            android:inputType="numberDecimal" />
+        <EditText
+            android:id="@+id/number_signed_decimal"
+            android:layout_width="fill_parent"
+            android:layout_height="wrap_content"
+            android:inputType="numberSigned|numberDecimal" />
+        <EditText
+            android:id="@+id/date_time"
+            android:layout_width="fill_parent"
+            android:layout_height="wrap_content"
+            android:inputType="datetime" />
+        <EditText
+            android:id="@+id/date"
+            android:layout_width="fill_parent"
+            android:layout_height="wrap_content"
+            android:inputType="date" />
+        <EditText
+            android:id="@+id/time"
+            android:layout_width="fill_parent"
+            android:layout_height="wrap_content"
+            android:inputType="time" />
+        <EditText
+            android:id="@+id/text_no_extract_ui"
+            android:layout_width="fill_parent"
+            android:layout_height="wrap_content"
+            android:inputType="text"
+            android:imeOptions="flagNoExtractUi" />
+        <EditText
+            android:id="@+id/text_no_fullscreen"
+            android:layout_width="fill_parent"
+            android:layout_height="wrap_content"
+            android:inputType="textCapSentences"
+            android:imeOptions="flagNoFullscreen" />
+        <EditText
+            android:id="@+id/text_nm"
+            android:layout_width="fill_parent"
+            android:layout_height="wrap_content"
+            android:inputType="text"
+            android:privateImeOptions="nm" />
+        <EditText
+            android:id="@+id/text_force_ascii_flag"
+            android:layout_width="fill_parent"
+            android:layout_height="wrap_content"
+            android:inputType="text" />
+        <AutoCompleteTextView
+            android:id="@+id/text_app_completion"
+            android:layout_width="fill_parent"
+            android:layout_height="wrap_content" />
+        <AutoCompleteTextView
+            android:id="@+id/text_app_completion_no_fullscreen"
+            android:layout_width="fill_parent"
+            android:layout_height="wrap_content"
+            android:imeOptions="flagNoFullscreen" />
+        <AutoCompleteTextView
+            android:id="@+id/text_app_compeletion_no_extract_ui"
+            android:layout_width="fill_parent"
+            android:layout_height="wrap_content"
+            android:imeOptions="flagNoExtractUi" />
+        <EditText
+            android:id="@+id/text_restarting"
+            android:layout_width="fill_parent"
+            android:layout_height="wrap_content"
+            android:inputType="text" />
+        <EditText
+            android:id="@+id/text_null"
+            android:layout_width="fill_parent"
+            android:layout_height="wrap_content"
+            android:inputType="none" />
+    </LinearLayout>
+</ScrollView>
diff --git a/tools/EditTextVariations/res/values-v11/donottranslate.xml b/tools/EditTextVariations/res/values-v11/donottranslate.xml
new file mode 100644
index 0000000..5b7eb23
--- /dev/null
+++ b/tools/EditTextVariations/res/values-v11/donottranslate.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2011, 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.
+*/
+-->
+
+<resources>
+    <string name="default_theme">Theme_Holo_Light</string>
+</resources>
diff --git a/tools/EditTextVariations/res/values-v14/themes.xml b/tools/EditTextVariations/res/values-v14/themes.xml
new file mode 100644
index 0000000..22c6016
--- /dev/null
+++ b/tools/EditTextVariations/res/values-v14/themes.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2017, 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.
+*/
+-->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android">
+    <style name="defaultActivityTheme" parent="@android:style/Theme.DeviceDefault.Light" />
+</resources>
diff --git a/tools/EditTextVariations/res/values-v27/themes.xml b/tools/EditTextVariations/res/values-v27/themes.xml
new file mode 100644
index 0000000..8fd3aae
--- /dev/null
+++ b/tools/EditTextVariations/res/values-v27/themes.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2017, 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.
+*/
+-->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android">
+    <style name="defaultActivityTheme" parent="@android:style/Theme.DeviceDefault.Light">
+        <item name="android:navigationBarColor">@android:color/white</item>
+        <item name="android:navigationBarDividerColor">#1f000000</item>
+        <item name="android:windowLightNavigationBar">true</item>
+    </style>
+</resources>
diff --git a/tools/EditTextVariations/res/values/countries.xml b/tools/EditTextVariations/res/values/countries.xml
new file mode 100644
index 0000000..6d7e5c1
--- /dev/null
+++ b/tools/EditTextVariations/res/values/countries.xml
@@ -0,0 +1,263 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 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.
+*/
+-->
+
+<resources>
+    <!-- The list of country names. [CHAR LIMIT=100] -->
+    <string-array name="countries_array">
+        <item>Afghanistan</item>
+        <item>Albania</item>
+        <item>Algeria</item>
+        <item>American Samoa</item>
+        <item>Andorra</item>
+        <item>Angola</item>
+        <item>Anguilla</item>
+        <item>Antarctica</item>
+        <item>Antigua and Barbuda</item>
+        <item>Argentina</item>
+        <item>Armenia</item>
+        <item>Aruba</item>
+        <item>Australia</item>
+        <item>Austria</item>
+        <item>Azerbaijan</item>
+        <item>Bahrain</item>
+        <item>Bangladesh</item>
+        <item>Barbados</item>
+        <item>Belarus</item>
+        <item>Belgium</item>
+        <item>Belize</item>
+        <item>Benin</item>
+        <item>Bermuda</item>
+        <item>Bhutan</item>
+        <item>Bolivia</item>
+        <item>Bosnia and Herzegovina</item>
+        <item>Botswana</item>
+        <item>Bouvet Island</item>
+        <item>Brazil</item>
+        <item>British Indian Ocean Territory</item>
+        <item>British Virgin Islands</item>
+        <item>Brunei</item>
+        <item>Bulgaria</item>
+        <item>Burkina Faso</item>
+        <item>Burundi</item>
+        <item>"Cote d'Ivoire"</item>
+        <item>Cambodia</item>
+        <item>Cameroon</item>
+        <item>Canada</item>
+        <item>Cape Verde</item>
+        <item>Cayman Islands</item>
+        <item>Central African Republic</item>
+        <item>Chad</item>
+        <item>Chile</item>
+        <item>China</item>
+        <item>Christmas Island</item>
+        <item>Cocos (Keeling) Islands</item>
+        <item>Colombia</item>
+        <item>Comoros</item>
+        <item>Congo</item>
+        <item>Cook Islands</item>
+        <item>Costa Rica</item>
+        <item>Croatia</item>
+        <item>Cuba</item>
+        <item>Cyprus</item>
+        <item>Czech Republic</item>
+        <item>Democratic Republic of the Congo</item>
+        <item>Denmark</item>
+        <item>Djibouti</item>
+        <item>Dominica</item>
+        <item>Dominican Republic</item>
+        <item>East Timor</item>
+        <item>Ecuador</item>
+        <item>Egypt</item>
+        <item>El Salvador</item>
+        <item>Equatorial Guinea</item>
+        <item>Eritrea</item>
+        <item>Estonia</item>
+        <item>Ethiopia</item>
+        <item>Faeroe Islands</item>
+        <item>Falkland Islands</item>
+        <item>Fiji</item>
+        <item>Finland</item>
+        <item>Republic of Macedonia</item>
+        <item>France</item>
+        <item>French Guiana</item>
+        <item>French Polynesia</item>
+        <item>French Southern Territories</item>
+        <item>Gabon</item>
+        <item>Georgia</item>
+        <item>Germany</item>
+        <item>Ghana</item>
+        <item>Gibraltar</item>
+        <item>Greece</item>
+        <item>Greenland</item>
+        <item>Grenada</item>
+        <item>Guadeloupe</item>
+        <item>Guam</item>
+        <item>Guatemala</item>
+        <item>Guinea</item>
+        <item>Guinea-Bissau</item>
+        <item>Guyana</item>
+        <item>Haiti</item>
+        <item>Heard Island and McDonald Islands</item>
+        <item>Honduras</item>
+        <item>Hong Kong</item>
+        <item>Hungary</item>
+        <item>Iceland</item>
+        <item>India</item>
+        <item>Indonesia</item>
+        <item>Iran</item>
+        <item>Iraq</item>
+        <item>Ireland</item>
+        <item>Israel</item>
+        <item>Italy</item>
+        <item>Jamaica</item>
+        <item>Japan</item>
+        <item>Jordan</item>
+        <item>Kazakhstan</item>
+        <item>Kenya</item>
+        <item>Kiribati</item>
+        <item>Kuwait</item>
+        <item>Kyrgyzstan</item>
+        <item>Laos</item>
+        <item>Latvia</item>
+        <item>Lebanon</item>
+        <item>Lesotho</item>
+        <item>Liberia</item>
+        <item>Libya</item>
+        <item>Liechtenstein</item>
+        <item>Lithuania</item>
+        <item>Luxembourg</item>
+        <item>Macau</item>
+        <item>Madagascar</item>
+        <item>Malawi</item>
+        <item>Malaysia</item>
+        <item>Maldives</item>
+        <item>Mali</item>
+        <item>Malta</item>
+        <item>Marshall Islands</item>
+        <item>Martinique</item>
+        <item>Mauritania</item>
+        <item>Mauritius</item>
+        <item>Mayotte</item>
+        <item>Mexico</item>
+        <item>Micronesia</item>
+        <item>Moldova</item>
+        <item>Monaco</item>
+        <item>Mongolia</item>
+        <item>Montserrat</item>
+        <item>Morocco</item>
+        <item>Mozambique</item>
+        <item>Myanmar</item>
+        <item>Namibia</item>
+        <item>Nauru</item>
+        <item>Nepal</item>
+        <item>Netherlands</item>
+        <item>Netherlands Antilles</item>
+        <item>New Caledonia</item>
+        <item>New Zealand</item>
+        <item>Nicaragua</item>
+        <item>Niger</item>
+        <item>Nigeria</item>
+        <item>Niue</item>
+        <item>Norfolk Island</item>
+        <item>North Korea</item>
+        <item>Northern Marianas</item>
+        <item>Norway</item>
+        <item>Oman</item>
+        <item>Pakistan</item>
+        <item>Palau</item>
+        <item>Panama</item>
+        <item>Papua New Guinea</item>
+        <item>Paraguay</item>
+        <item>Peru</item>
+        <item>Philippines</item>
+        <item>Pitcairn Islands</item>
+        <item>Poland</item>
+        <item>Portugal</item>
+        <item>Puerto Rico</item>
+        <item>Qatar</item>
+        <item>Reunion</item>
+        <item>Romania</item>
+        <item>Russia</item>
+        <item>Rwanda</item>
+        <item>Sao Tome and Principe</item>
+        <item>Saint Helena</item>
+        <item>Saint Kitts and Nevis</item>
+        <item>Saint Lucia</item>
+        <item>Saint Pierre and Miquelon</item>
+        <item>Saint Vincent and the Grenadines</item>
+        <item>Samoa</item>
+        <item>San Marino</item>
+        <item>Saudi Arabia</item>
+        <item>Senegal</item>
+        <item>Seychelles</item>
+        <item>Sierra Leone</item>
+        <item>Singapore</item>
+        <item>Slovakia</item>
+        <item>Slovenia</item>
+        <item>Solomon Islands</item>
+        <item>Somalia</item>
+        <item>South Africa</item>
+        <item>South Georgia and the South Sandwich Islands</item>
+        <item>South Korea</item>
+        <item>Spain</item>
+        <item>Sri Lanka</item>
+        <item>Sudan</item>
+        <item>Suriname</item>
+        <item>Svalbard and Jan Mayen</item>
+        <item>Swaziland</item>
+        <item>Sweden</item>
+        <item>Switzerland</item>
+        <item>Syria</item>
+        <item>Taiwan</item>
+        <item>Tajikistan</item>
+        <item>Tanzania</item>
+        <item>Thailand</item>
+        <item>The Bahamas</item>
+        <item>The Gambia</item>
+        <item>Togo</item>
+        <item>Tokelau</item>
+        <item>Tonga</item>
+        <item>Trinidad and Tobago</item>
+        <item>Tunisia</item>
+        <item>Turkey</item>
+        <item>Turkmenistan</item>
+        <item>Turks and Caicos Islands</item>
+        <item>Tuvalu</item>
+        <item>Virgin Islands</item>
+        <item>Uganda</item>
+        <item>Ukraine</item>
+        <item>United Arab Emirates</item>
+        <item>United Kingdom</item>
+        <item>United States</item>
+        <item>United States Minor Outlying Islands</item>
+        <item>Uruguay</item>
+        <item>Uzbekistan</item>
+        <item>Vanuatu</item>
+        <item>Vatican City</item>
+        <item>Venezuela</item>
+        <item>Vietnam</item>
+        <item>Wallis and Futuna</item>
+        <item>Western Sahara</item>
+        <item>Yemen</item>
+        <item>Zambia</item>
+        <item>Zimbabwe</item>
+        <item>Yemen</item>
+    </string-array>
+</resources>
diff --git a/tools/EditTextVariations/res/values/strings.xml b/tools/EditTextVariations/res/values/strings.xml
new file mode 100644
index 0000000..cb896e8
--- /dev/null
+++ b/tools/EditTextVariations/res/values/strings.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2010, 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.
+*/
+-->
+
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <!-- This test application name. -->
+    <string name="app_name" translatable="false">EditTextVariations</string>
+    <!-- The menu title to change color theme of this application. [CHAR LIMIT=20] -->
+    <string name="menu_change_theme">Change Theme</string>
+    <!-- The menu title to display the version name of this application. [CHAR LIMIT=20] -->
+    <string name="menu_version">Version <xliff:g id="VERSION_NAME" example="0.56">%s</xliff:g></string>
+    <!-- The menu title to turn on the text field focus navigation. [CHAR LIMIT=20] -->
+    <string name="menu_navigate_on" translatable="false">Navigate On</string>
+    <!-- The menu title to turn off the text field focus navigation. [CHAR LIMIT=20] -->
+    <string name="menu_navigate_off" translatable="false">Navigate Off</string>
+    <!-- The menu title to show software keyboard when the application is launched. [CHAR LIMIT=20] -->
+    <string name="menu_softinput_visible" translatable="false">Keyboard Visible</string>
+    <!-- The menu title to stay hidden software keyboard when the application is launched. [CHAR LIMIT=20] -->
+    <string name="menu_softinput_hidden" translatable="false">Keyboard Hidden</string>
+    <!-- The menu title to send a notification to test direct reply. [CHAR LIMIT=20] -->
+    <string name="menu_direct_reply">Direct Reply</string>
+    <!-- The example of custom action key label. Must be short to fit on key. 5 chars or less is preferable.  [CHAR LIMIT=7] -->
+    <string name="custom_action_label">Custom</string>
+</resources>
diff --git a/tools/EditTextVariations/res/values/themes.xml b/tools/EditTextVariations/res/values/themes.xml
new file mode 100644
index 0000000..036a711
--- /dev/null
+++ b/tools/EditTextVariations/res/values/themes.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2017, 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.
+*/
+-->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android">
+    <style name="defaultActivityTheme" parent="@android:style/Theme.Holo" />
+</resources>
diff --git a/tools/EditTextVariations/src/com/android/inputmethod/tools/edittextvariations/EchoingTextWatcher.java b/tools/EditTextVariations/src/com/android/inputmethod/tools/edittextvariations/EchoingTextWatcher.java
new file mode 100644
index 0000000..1c652c2
--- /dev/null
+++ b/tools/EditTextVariations/src/com/android/inputmethod/tools/edittextvariations/EchoingTextWatcher.java
@@ -0,0 +1,86 @@
+/*
+ * 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.tools.edittextvariations;
+
+import android.annotation.SuppressLint;
+import android.os.Handler;
+import android.os.Message;
+import android.text.Editable;
+import android.text.TextUtils;
+import android.text.TextWatcher;
+import android.widget.EditText;
+
+import java.util.Locale;
+
+final class EchoingTextWatcher implements TextWatcher {
+    private static final int SET_TEXT_DELAY = 500;
+
+    final EditText mEditText;
+    CharSequence mExpected;
+
+    @SuppressLint("HandlerLeak")
+    private Handler mHandler = new Handler() {
+        @Override
+        public void handleMessage(final Message msg) {
+            final String toBeappended = (String) msg.obj;
+            final CharSequence current = mEditText.getText();
+            final CharSequence newText = TextUtils.concat(current, toBeappended);
+            mExpected = newText;
+            mEditText.setText(newText);
+            mEditText.setSelection(newText.length());
+        }
+    };
+
+    @SuppressWarnings("unused")
+    public static void attachTo(final EditText editText) {
+        final EchoingTextWatcher watcher = new EchoingTextWatcher(editText);
+    }
+
+    public EchoingTextWatcher(final EditText editText) {
+        mEditText = editText;
+        editText.addTextChangedListener(this);
+    }
+
+    @Override
+    public void afterTextChanged(final Editable ss) {
+    }
+
+    @Override
+    public void beforeTextChanged(final CharSequence s, final int start, final int count,
+            final int after) {
+    }
+
+    @Override
+    public void onTextChanged(final CharSequence s, final int start, final int before,
+            final int count) {
+        if (count == 0 || before > 0 || TextUtils.equals(s, mExpected)) {
+            return;
+        }
+        final int len = s.length();
+        if (len > 0) {
+            final String last = s.subSequence(len - 1, len).toString();
+            final char lastChar = last.charAt(0);
+            if (Character.isUpperCase(lastChar)) {
+                final String lowerCase = last.toLowerCase(Locale.getDefault());
+                mHandler.sendMessageDelayed(mHandler.obtainMessage(0, lowerCase), SET_TEXT_DELAY);
+            } else if (Character.isLowerCase(lastChar)) {
+                final String upperCase = last.toUpperCase(Locale.getDefault());
+                mHandler.sendMessageDelayed(mHandler.obtainMessage(0, upperCase), SET_TEXT_DELAY);
+            }
+        }
+    }
+}
diff --git a/tools/EditTextVariations/src/com/android/inputmethod/tools/edittextvariations/EditTextVariations.java b/tools/EditTextVariations/src/com/android/inputmethod/tools/edittextvariations/EditTextVariations.java
new file mode 100644
index 0000000..6eb85a5
--- /dev/null
+++ b/tools/EditTextVariations/src/com/android/inputmethod/tools/edittextvariations/EditTextVariations.java
@@ -0,0 +1,479 @@
+/*
+ * Copyright (C) 2010 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.tools.edittextvariations;
+
+import android.annotation.SuppressLint;
+import android.app.Activity;
+import android.app.AlertDialog;
+import android.content.DialogInterface;
+import android.content.Intent;
+import android.content.SharedPreferences;
+import android.content.pm.ApplicationInfo;
+import android.content.pm.PackageInfo;
+import android.content.pm.PackageManager.NameNotFoundException;
+import android.os.Build;
+import android.os.Bundle;
+import android.preference.PreferenceManager;
+import android.text.InputType;
+import android.text.TextUtils;
+import android.util.Log;
+import android.view.KeyEvent;
+import android.view.Menu;
+import android.view.MenuItem;
+import android.view.View;
+import android.view.ViewGroup;
+import android.view.Window;
+import android.view.WindowManager;
+import android.view.inputmethod.EditorInfo;
+import android.webkit.JavascriptInterface;
+import android.webkit.WebView;
+import android.widget.ArrayAdapter;
+import android.widget.AutoCompleteTextView;
+import android.widget.EditText;
+import android.widget.TextView;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public final class EditTextVariations extends Activity implements TextView.OnEditorActionListener,
+        DialogInterface.OnClickListener {
+    private static final String TAG = EditTextVariations.class.getSimpleName();
+    private static final boolean DEBUG_INPUT_TEXT = false;
+
+    private static final int MENU_CHANGE_THEME = 0;
+    private static final int MENU_VERSION = 1;
+    private static final int MENU_NAVIGATE_ON = 2;
+    private static final int MENU_NAVIGATE_OFF = 3;
+    private static final int MENU_SOFTINPUT_VISIBLE = 4;
+    private static final int MENU_SOFTINPUT_HIDDEN = 5;
+    private static final int MENU_DIRECT_REPLY = 6;
+    private static final String PREF_THEME = "theme";
+    private static final String PREF_NAVIGATE = "navigate";
+    private static final String PREF_SOFTINPUT = "softinput";
+
+    private SharedPreferences prefs;
+    private View[] fields;
+
+    private static final FinalClassField<Integer> ApplicationInfo_FLAG_SUPPORTS_RTL =
+            FinalClassField.newInstance(ApplicationInfo.class, "FLAG_SUPPORTS_RTL", 1 << 22);
+
+    // This flag should be defined IceCreamSandwich and later.
+    // Note that Froyo and Gingerbread have hidden IME_FLAG_NO_FULLSCREEN as
+    // value 0x80000000.
+    private static final FinalClassField<Integer> EditorInfo_IME_FLAG_FORCE_ASCII =
+            FinalClassField.newInstance(EditorInfo.class, "IME_FLAG_FORCE_ASCII",
+                    Build.VERSION.SDK_INT >= /* ICE_CREAM_SANDWICH */14 ? 0x80000000 : 0);
+
+    private ArrayAdapter<String> mAutoCompleteAdapter;
+
+    /** Called when the activity is first created. */
+    @SuppressLint("SetJavaScriptEnabled")
+    @Override
+    public void onCreate(final Bundle savedInstanceState) {
+        getApplicationInfo().flags |= ApplicationInfo_FLAG_SUPPORTS_RTL.value;
+        prefs = PreferenceManager.getDefaultSharedPreferences(this);
+        loadTheme();
+        loadSoftInputMode();
+
+        super.onCreate(savedInstanceState);
+        setContentView(R.layout.main);
+
+        final String[] countries = getResources().getStringArray(R.array.countries_array);
+        mAutoCompleteAdapter = new ArrayAdapter<>(
+                this, android.R.layout.simple_dropdown_item_1line, countries);
+
+        final boolean navigateMode = getNavigateMode();
+        final ViewGroup vg = (ViewGroup) findViewById(R.id.edit_text_list);
+        final int n = vg.getChildCount();
+        fields = new View[n];
+        for (int i = 0; i < n; i++) {
+            final View v = vg.getChildAt(i);
+            if (v instanceof EditText) {
+                final int id = v.getId();
+                final EditText e = (EditText) v;
+                int inputType = e.getInputType();
+                int imeOptions = e.getImeOptions();
+                if (id == R.id.text_auto_correct_previous) {
+                    imeOptions &= ~EditorInfo.IME_MASK_ACTION;
+                    imeOptions |= EditorInfo.IME_ACTION_PREVIOUS;
+                }
+                if (id == R.id.text_force_ascii_flag) {
+                    imeOptions |= EditorInfo_IME_FLAG_FORCE_ASCII.value;
+                }
+                if (id == R.id.text_null) {
+                    inputType = InputType.TYPE_NULL;
+                }
+                if (id == R.id.text_restarting) {
+                    EchoingTextWatcher.attachTo(e);
+                }
+                if (navigateMode && i > 0) {
+                    imeOptions |= EditorInfo.IME_FLAG_NAVIGATE_PREVIOUS;
+                }
+                if (navigateMode && i < n - 1) {
+                    imeOptions |= EditorInfo.IME_FLAG_NAVIGATE_NEXT;
+                }
+
+                e.setInputType(inputType);
+                e.setImeOptions(imeOptions);
+                setupHintText(e);
+                if (navigateMode) {
+                    e.setOnEditorActionListener(this);
+                }
+            }
+            if (v instanceof AutoCompleteTextView) {
+                final AutoCompleteTextView e = (AutoCompleteTextView) v;
+                e.setAdapter(mAutoCompleteAdapter);
+                e.setThreshold(1);
+            }
+            if (v instanceof WebView) {
+                final WebView wv = (WebView) v;
+                wv.getSettings().setJavaScriptEnabled(true);
+                wv.addJavascriptInterface(new Object() {
+                    @JavascriptInterface
+                    public String name() {
+                        return getThemeName();
+                    }
+                }, "theme");
+                wv.loadUrl("file:///android_asset/webview.html");
+            }
+            fields[i] = v;
+        }
+    }
+
+    @Override
+    public boolean onCreateOptionsMenu(final Menu menu) {
+        super.onCreateOptionsMenu(menu);
+
+        menu.add(Menu.NONE, MENU_NAVIGATE_ON, 0, getString(R.string.menu_navigate_on));
+        menu.add(Menu.NONE, MENU_NAVIGATE_OFF, 1, getString(R.string.menu_navigate_off));
+        menu.add(Menu.NONE, MENU_SOFTINPUT_VISIBLE, 2, getString(R.string.menu_softinput_visible));
+        menu.add(Menu.NONE, MENU_SOFTINPUT_HIDDEN, 3, getString(R.string.menu_softinput_hidden));
+        menu.add(Menu.NONE, MENU_CHANGE_THEME, 4, R.string.menu_change_theme);
+        if (NotificationUtils.DIRECT_REPLY_SUPPORTED) {
+            menu.add(Menu.NONE, MENU_DIRECT_REPLY, 5, R.string.menu_direct_reply);
+        }
+        try {
+            final PackageInfo pinfo = getPackageManager().getPackageInfo(getPackageName(), 0);
+            menu.add(Menu.NONE, MENU_VERSION, 6,
+                    getString(R.string.menu_version, pinfo.versionName))
+                    .setEnabled(false);
+        } catch (NameNotFoundException e) {
+            return false;
+        }
+
+        return true;
+    }
+
+    @Override
+    public boolean onOptionsItemSelected(final MenuItem item) {
+        final int itemId = item.getItemId();
+        if (itemId == MENU_CHANGE_THEME) {
+            final List<CharSequence> items = new ArrayList<>();
+            for (final ThemeItem theme : ThemeItem.THEME_LIST) {
+                items.add(theme.name);
+            }
+            final AlertDialog.Builder builder = new AlertDialog.Builder(this);
+            builder.setTitle(R.string.menu_change_theme);
+            builder.setCancelable(true);
+            builder.setNegativeButton(android.R.string.cancel, null);
+            builder.setItems(items.toArray(new CharSequence[items.size()]), this);
+            builder.show();
+        } else if (itemId == MENU_NAVIGATE_ON || itemId == MENU_NAVIGATE_OFF) {
+            saveNavigateMode(itemId == MENU_NAVIGATE_ON);
+            restartActivity();
+        } else if (itemId == MENU_SOFTINPUT_VISIBLE || itemId == MENU_SOFTINPUT_HIDDEN) {
+            saveSoftInputMode(itemId == MENU_SOFTINPUT_VISIBLE);
+            restartActivity();
+        } else if (itemId == MENU_DIRECT_REPLY) {
+            NotificationUtils.sendDirectReplyNotification(this);
+        }
+        return true;
+    }
+
+    @Override
+    public void onClick(final DialogInterface dialog, final int which) {
+        saveTheme(ThemeItem.THEME_LIST.get(which));
+        restartActivity();
+    }
+
+    private void restartActivity() {
+        final Intent intent = getIntent();
+        finish();
+        startActivity(intent);
+    }
+
+    private static void setupHintText(final EditText e) {
+        final int imeOptions = e.getImeOptions();
+        String hint = (e instanceof MultiLineShortMessageEditText) ? "*" : "";
+        hint += inputTypeToString(e.getInputType());
+        String text;
+        if (e.getImeActionLabel() != null) {
+            text = "actionLabel<" + e.getImeActionLabel() + ":" + e.getImeActionId() + ">";
+        } else {
+            text = actionName(imeOptions & EditorInfo.IME_MASK_ACTION);
+        }
+        text = appendFlagText(text,
+                (imeOptions & EditorInfo.IME_FLAG_NO_EXTRACT_UI) != 0, "flagNoExtractUi");
+        text = appendFlagText(text,
+                (imeOptions & EditorInfo.IME_FLAG_NO_FULLSCREEN) != 0, "flagNoFullscreen");
+        text = appendFlagText(text,
+                (imeOptions & EditorInfo_IME_FLAG_FORCE_ASCII.value) != 0, "flagForceAscii");
+        text = appendFlagText(text,
+                (imeOptions & EditorInfo.IME_FLAG_NAVIGATE_NEXT) != 0, ">");
+        text = appendFlagText(text,
+                (imeOptions & EditorInfo.IME_FLAG_NAVIGATE_PREVIOUS) != 0, "<");
+        if (text.length() > 0)
+            hint += " " + text;
+        final String privateOptions = e.getPrivateImeOptions();
+        if (!TextUtils.isEmpty(privateOptions)) {
+            hint += " (";
+            String sep = "";
+            for (final String opt : privateOptions.trim().split(",")) {
+                final String[] elem = opt.trim().split("\\.");
+                hint += sep + elem[elem.length - 1];
+                sep = ",";
+            }
+            hint += ")";
+        }
+        if (DEBUG_INPUT_TEXT) {
+            Log.d(TAG, String.format("class=0x%08x variation=0x%08x flags=0x%08x hint=%s",
+                    e.getInputType() & InputType.TYPE_MASK_CLASS,
+                    e.getInputType() & InputType.TYPE_MASK_VARIATION,
+                    e.getInputType() & InputType.TYPE_MASK_FLAGS, hint));
+        }
+        if (e.getId() == R.id.text_restarting) {
+            hint += " restarting";
+        }
+        e.setHint(hint);
+    }
+
+    private void saveBooleanPreference(final String key, final boolean value) {
+        final SharedPreferences.Editor editor = prefs.edit();
+        editor.putBoolean(key, value);
+        editor.apply();
+    }
+
+    private void saveStringPreference(final String key, final String value) {
+        final SharedPreferences.Editor editor = prefs.edit();
+        editor.putString(key, value);
+        editor.apply();
+    }
+
+    private void saveNavigateMode(final boolean enabled) {
+        saveBooleanPreference(PREF_NAVIGATE, enabled);
+    }
+
+    private boolean getNavigateMode() {
+        return prefs.getBoolean(PREF_NAVIGATE, false);
+    }
+
+    private void saveSoftInputMode(final boolean visible) {
+        saveBooleanPreference(PREF_SOFTINPUT, visible);
+    }
+
+    private void loadSoftInputMode() {
+        final boolean visible = prefs.getBoolean(PREF_SOFTINPUT, false);
+        final Window w = getWindow();
+        w.setSoftInputMode(visible
+                ? WindowManager.LayoutParams.SOFT_INPUT_STATE_VISIBLE
+                : WindowManager.LayoutParams.SOFT_INPUT_STATE_HIDDEN);
+    }
+
+    private void saveTheme(final ThemeItem theme) {
+        saveStringPreference(PREF_THEME, theme.name);
+    }
+
+    String getThemeName() {
+        return prefs.getString(PREF_THEME, ThemeItem.getDefaultThemeName());
+    }
+
+    private void loadTheme() {
+        final String themeName = getThemeName();
+        for (final ThemeItem theme : ThemeItem.THEME_LIST) {
+            if (themeName.equals(theme.name)) {
+                setTheme(theme.id);
+                return;
+            }
+        }
+    }
+
+    @Override
+    public boolean onEditorAction(final TextView v, final int action, final KeyEvent event) {
+        for (int i = 0; i < fields.length; i++) {
+            if (v == fields[i]) {
+                final int direction;
+                if (action == EditorInfo.IME_ACTION_PREVIOUS) {
+                    direction = -1;
+                } else {
+                    direction = +1;
+                }
+
+                final int target = i + direction;
+                if (target < 0 || target >= fields.length)
+                    return false;
+
+                final View targetView = fields[target];
+                targetView.requestFocus();
+                return true;
+            }
+        }
+        return false;
+    }
+
+    private static String actionName(final int action) {
+        switch (action & EditorInfo.IME_MASK_ACTION) {
+        case EditorInfo.IME_ACTION_UNSPECIFIED:
+            return "actionUnspecified";
+        case EditorInfo.IME_ACTION_NONE:
+            return "actionNone";
+        case EditorInfo.IME_ACTION_GO:
+            return "actionGo";
+        case EditorInfo.IME_ACTION_SEARCH:
+            return "actionSearch";
+        case EditorInfo.IME_ACTION_SEND:
+            return "actionSend";
+        case EditorInfo.IME_ACTION_NEXT:
+            return "actionNext";
+        case EditorInfo.IME_ACTION_DONE:
+            return "actionDone";
+        case EditorInfo.IME_ACTION_PREVIOUS:
+            return "actionPrevious";
+        default:
+            return "actionUnknown(" + action + ")";
+        }
+    }
+
+    private static String inputTypeToString(final int inputType) {
+        if (inputType == InputType.TYPE_NULL) {
+            return "TYPE_NULL";
+        }
+        final int clazz = inputType & InputType.TYPE_MASK_CLASS;
+        final int variation = inputType & InputType.TYPE_MASK_VARIATION;
+        final int flags = inputType & InputType.TYPE_MASK_FLAGS;
+        String base = "unknown(class=" + clazz + " variation=" + variation + " flag=0x"
+                + Integer.toHexString(flags);
+
+        switch (clazz) {
+        case InputType.TYPE_CLASS_TEXT:
+            switch (variation) {
+            case InputType.TYPE_TEXT_VARIATION_NORMAL:
+                base = "text";
+                break;
+            case InputType.TYPE_TEXT_VARIATION_URI:
+                base = "textUri";
+                break;
+            case InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS:
+                base = "textEmailAddress";
+                break;
+            case InputType.TYPE_TEXT_VARIATION_EMAIL_SUBJECT:
+                base = "textEmailSubject";
+                break;
+            case InputType.TYPE_TEXT_VARIATION_SHORT_MESSAGE:
+                base = "textShortMessage";
+                break;
+            case InputType.TYPE_TEXT_VARIATION_LONG_MESSAGE:
+                base = "textLongMessage";
+                break;
+            case InputType.TYPE_TEXT_VARIATION_PERSON_NAME:
+                base = "textPersonName";
+                break;
+            case InputType.TYPE_TEXT_VARIATION_POSTAL_ADDRESS:
+                base = "textPostalAddress";
+                break;
+            case InputType.TYPE_TEXT_VARIATION_PASSWORD:
+                base = "textPassword";
+                break;
+            case InputType.TYPE_TEXT_VARIATION_VISIBLE_PASSWORD:
+                base = "textVisiblePassword";
+                break;
+            case InputType.TYPE_TEXT_VARIATION_WEB_EDIT_TEXT:
+                base = "textWebEditText";
+                break;
+            case InputType.TYPE_TEXT_VARIATION_FILTER:
+                base = "textFilter";
+                break;
+            case InputType.TYPE_TEXT_VARIATION_PHONETIC:
+                base = "textPhonetic";
+                break;
+            case InputType.TYPE_TEXT_VARIATION_WEB_EMAIL_ADDRESS:
+                base = "textWebEmailAddress";
+                break;
+            case InputType.TYPE_TEXT_VARIATION_WEB_PASSWORD:
+                base = "textWebPassword";
+                break;
+            }
+            base = appendFlagText(base, (flags & InputType.TYPE_TEXT_FLAG_CAP_CHARACTERS) != 0,
+                    "textCapCharacters");
+            base = appendFlagText(base, (flags & InputType.TYPE_TEXT_FLAG_CAP_WORDS) != 0,
+                    "textCapWords");
+            base = appendFlagText(base, (flags & InputType.TYPE_TEXT_FLAG_CAP_SENTENCES) != 0,
+                    "textCapSentences");
+            base = appendFlagText(base, (flags & InputType.TYPE_TEXT_FLAG_AUTO_CORRECT) != 0,
+                    "textAutoCorrect");
+            base = appendFlagText(base, (flags & InputType.TYPE_TEXT_FLAG_AUTO_COMPLETE) != 0,
+                    "textAutoComplete");
+            base = appendFlagText(base, (flags & InputType.TYPE_TEXT_FLAG_MULTI_LINE) != 0,
+                    "textMultiLine");
+            base = appendFlagText(base, (flags & InputType.TYPE_TEXT_FLAG_IME_MULTI_LINE) != 0,
+                    "textImeMultiLine");
+            base = appendFlagText(base, (flags & InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS) != 0,
+                    "textNoSuggestions");
+            break;
+
+        case InputType.TYPE_CLASS_NUMBER:
+            if (variation == InputType.TYPE_NUMBER_VARIATION_NORMAL) {
+                base = "number";
+            } else if (variation == InputType.TYPE_NUMBER_VARIATION_PASSWORD) {
+                base = "numberPassword";
+            }
+            base = appendFlagText(base, (flags & InputType.TYPE_NUMBER_FLAG_SIGNED) != 0,
+                    "numberSigned");
+            base = appendFlagText(base, (flags & InputType.TYPE_NUMBER_FLAG_DECIMAL) != 0,
+                    "numberDecimal");
+            break;
+
+        case InputType.TYPE_CLASS_PHONE:
+            base = "phone";
+            break;
+
+        case InputType.TYPE_CLASS_DATETIME:
+            switch (variation) {
+            case InputType.TYPE_DATETIME_VARIATION_NORMAL:
+                base = "datetime";
+                break;
+            case InputType.TYPE_DATETIME_VARIATION_DATE:
+                base = "date";
+                break;
+            case InputType.TYPE_DATETIME_VARIATION_TIME:
+                base = "time";
+                break;
+            }
+            break;
+        }
+
+        return base;
+    }
+
+    private static String appendFlagText(final String text, final boolean flag, final String name) {
+        if (flag) {
+            if (text.length() == 0 || name.startsWith(text))
+                return name;
+            return text + "|" + name;
+        }
+        return text;
+    }
+}
diff --git a/tools/EditTextVariations/src/com/android/inputmethod/tools/edittextvariations/FinalClassField.java b/tools/EditTextVariations/src/com/android/inputmethod/tools/edittextvariations/FinalClassField.java
new file mode 100644
index 0000000..14c556a
--- /dev/null
+++ b/tools/EditTextVariations/src/com/android/inputmethod/tools/edittextvariations/FinalClassField.java
@@ -0,0 +1,64 @@
+/*
+ * 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.tools.edittextvariations;
+
+import java.lang.reflect.Field;
+
+public final class FinalClassField<T> {
+    public final boolean defined;
+    public final String name;
+    public final String className;
+    public final T value;
+
+    @SuppressWarnings("unchecked")
+    private FinalClassField(final Field field, final String className, final String fieldName,
+            final T compatValue) {
+        this.defined = field != null;
+        this.name = fieldName;
+        this.className = className;
+        T v = null;
+        try {
+            final Object obj = field.get(null);
+            v = (T) obj;
+        } catch (final Exception e) {
+            v = compatValue;
+        }
+        this.value = v;
+    }
+
+    public static <T> FinalClassField<T> newInstance(final Class<?> definedClass, final String name,
+            final T compatValue) {
+        if (definedClass == null)
+            throw new NullPointerException("defined class");
+        String className = definedClass.getCanonicalName();
+        try {
+            return new FinalClassField<>(
+                    definedClass.getField(name), className, name, compatValue);
+        } catch (Exception e) {
+            return new FinalClassField<>(null, className, name, compatValue);
+        }
+    }
+
+    public static <T> FinalClassField<T> newInstance(final String className, final String fieldName,
+            final T compatValue) {
+        try {
+            return newInstance(Class.forName(className), fieldName, compatValue);
+        } catch (ClassNotFoundException e) {
+            return new FinalClassField<>(null, className, fieldName, compatValue);
+        }
+    }
+}
diff --git a/tools/EditTextVariations/src/com/android/inputmethod/tools/edittextvariations/InstanceMethod.java b/tools/EditTextVariations/src/com/android/inputmethod/tools/edittextvariations/InstanceMethod.java
new file mode 100644
index 0000000..05dc0d6
--- /dev/null
+++ b/tools/EditTextVariations/src/com/android/inputmethod/tools/edittextvariations/InstanceMethod.java
@@ -0,0 +1,83 @@
+/*
+ * Copyright (C) 2011 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.tools.edittextvariations;
+
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+
+public final class InstanceMethod {
+    public final boolean defined;
+    public final String name;
+    public final String className;
+
+    private final Class<?> clazz;
+    private final Method method;
+
+    private InstanceMethod(final Class<?> receiverClass, final Method instanceMethod,
+            final String receiverName, final String methodName) {
+        this.defined = instanceMethod != null;
+        this.clazz = receiverClass;
+        this.method = instanceMethod;
+        this.name = methodName;
+        this.className = receiverName;
+    }
+
+    public Object invoke(final Object receiverObject, final Object... args) {
+        if (!defined)
+            throw new RuntimeException("method " + name + " not defined");
+        if (receiverObject == null)
+            throw new NullPointerException("receiver object");
+        if (clazz.isInstance(receiverObject)) {
+            try {
+                if (args.length == 0) {
+                    return method.invoke(receiverObject);
+                }
+                return method.invoke(clazz, args);
+            } catch (IllegalArgumentException e) {
+                throw new RuntimeException("IllegalArgumentException");
+            } catch (IllegalAccessException e) {
+                throw new RuntimeException("IllegalAccessException");
+            } catch (InvocationTargetException e) {
+                throw new RuntimeException("InvocationTargetException");
+            }
+        }
+        throw new RuntimeException("receiver type not matched: method=" + name
+                + " actual receiver=" + receiverObject.getClass().getCanonicalName());
+    }
+
+    public static InstanceMethod newInstance(final Class<?> receiverClass, final String methodName,
+            final Class<?>... parameterTypes) {
+        if (receiverClass == null)
+            throw new NullPointerException("receiver class");
+        final String className = receiverClass.getCanonicalName();
+        try {
+            return new InstanceMethod(receiverClass,
+                    receiverClass.getMethod(methodName, parameterTypes), className, methodName);
+        } catch (Exception e) {
+            return new InstanceMethod(receiverClass, null, className, methodName);
+        }
+    }
+
+    public static InstanceMethod newInstance(final String className, final String methodName,
+            final Class<?>... parameterTypes) {
+        try {
+            return newInstance(Class.forName(className), methodName, parameterTypes);
+        } catch (ClassNotFoundException e) {
+            return new InstanceMethod(null, null, className, methodName);
+        }
+    }
+}
diff --git a/tools/EditTextVariations/src/com/android/inputmethod/tools/edittextvariations/MultiLineShortMessageEditText.java b/tools/EditTextVariations/src/com/android/inputmethod/tools/edittextvariations/MultiLineShortMessageEditText.java
new file mode 100644
index 0000000..7ab7007
--- /dev/null
+++ b/tools/EditTextVariations/src/com/android/inputmethod/tools/edittextvariations/MultiLineShortMessageEditText.java
@@ -0,0 +1,46 @@
+/*
+ * 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.tools.edittextvariations;
+
+import android.content.Context;
+import android.util.AttributeSet;
+import android.view.inputmethod.EditorInfo;
+import android.view.inputmethod.InputConnection;
+import android.widget.EditText;
+
+public final class MultiLineShortMessageEditText extends EditText {
+
+    public MultiLineShortMessageEditText(final Context context) {
+        super(context);
+    }
+
+    public MultiLineShortMessageEditText(final Context context, final AttributeSet attrs) {
+        super(context, attrs);
+    }
+
+    public MultiLineShortMessageEditText(final Context context, final AttributeSet attrs,
+            final int defStyle) {
+        super(context, attrs, defStyle);
+    }
+
+    @Override
+    public InputConnection onCreateInputConnection(final EditorInfo outAttrs) {
+        final InputConnection ic = super.onCreateInputConnection(outAttrs);
+        outAttrs.imeOptions &= ~EditorInfo.IME_FLAG_NO_ENTER_ACTION;
+        return ic;
+    }
+}
diff --git a/tools/EditTextVariations/src/com/android/inputmethod/tools/edittextvariations/NotificationBroadcastReceiver.java b/tools/EditTextVariations/src/com/android/inputmethod/tools/edittextvariations/NotificationBroadcastReceiver.java
new file mode 100644
index 0000000..97db49b
--- /dev/null
+++ b/tools/EditTextVariations/src/com/android/inputmethod/tools/edittextvariations/NotificationBroadcastReceiver.java
@@ -0,0 +1,31 @@
+/*
+ * Copyright (C) 2019 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.tools.edittextvariations;
+
+import android.content.BroadcastReceiver;
+import android.content.Context;
+import android.content.Intent;
+
+/**
+ * A non-exported {@link BroadcastReceiver} to receive {@link Intent} from notifications.
+ */
+public final class NotificationBroadcastReceiver extends BroadcastReceiver {
+    @Override
+    public void onReceive(Context context, Intent intent) {
+        NotificationUtils.onReceiveDirectReply(context, intent);
+    }
+}
diff --git a/tools/EditTextVariations/src/com/android/inputmethod/tools/edittextvariations/NotificationUtils.java b/tools/EditTextVariations/src/com/android/inputmethod/tools/edittextvariations/NotificationUtils.java
new file mode 100644
index 0000000..a9b7132
--- /dev/null
+++ b/tools/EditTextVariations/src/com/android/inputmethod/tools/edittextvariations/NotificationUtils.java
@@ -0,0 +1,122 @@
+/*
+ * Copyright (C) 2019 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.tools.edittextvariations;
+
+import android.app.Notification;
+import android.app.NotificationChannel;
+import android.app.NotificationManager;
+import android.app.PendingIntent;
+import android.app.RemoteInput;
+import android.content.Context;
+import android.content.Intent;
+import android.os.Build;
+import android.os.Bundle;
+import android.os.Process;
+import android.os.UserHandle;
+
+import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.concurrent.atomic.AtomicInteger;
+
+final class NotificationUtils {
+    private static final String REPLY_ACTION = "REPLY_ACTION";
+    private static final String KEY_REPLY = "KEY_REPLY";
+    private static final String KEY_NOTIFICATION_ID = "KEY_NOTIFICATION_ID";
+    private static final String CHANNEL_NAME = "Channel Name";
+    private static final String CHANNEL_DESCRIPTION = "Channel Description";
+    private static final String CHANNEL_ID = "Channel ID";
+    private static final AtomicInteger sNextNotificationId = new AtomicInteger(1);
+
+    private static final Object sLock = new Object();
+    private static boolean sNotificationChannelInitialized = false;
+
+    static final boolean NOTIFICATION_CHANNEL_REQUIRED =
+            Build.VERSION.SDK_INT >= Build.VERSION_CODES.O;
+    static final boolean DIRECT_REPLY_SUPPORTED = Build.VERSION.SDK_INT >= Build.VERSION_CODES.N;
+
+    private static Notification.Builder createNotificationBuilder(Context context) {
+        if (!NOTIFICATION_CHANNEL_REQUIRED) {
+            // NotificationChannel is not implemented.  No need to set up notification channel.
+            return new Notification.Builder(context);
+        }
+
+        // Make sure that a notification channel is created *before* we send a notification.
+        synchronized (sLock) {
+            if (!sNotificationChannelInitialized) {
+                final NotificationChannel channel = new NotificationChannel(CHANNEL_ID,
+                        CHANNEL_NAME, NotificationManager.IMPORTANCE_DEFAULT);
+                channel.setDescription(CHANNEL_DESCRIPTION);
+                context.getSystemService(NotificationManager.class)
+                        .createNotificationChannel(channel);
+                sNotificationChannelInitialized = true;
+            }
+        }
+        return new Notification.Builder(context, CHANNEL_ID);
+    }
+
+    static void sendDirectReplyNotification(Context context) {
+        if (!DIRECT_REPLY_SUPPORTED) {
+            // DirectReply is not supported.
+            return;
+        }
+
+        RemoteInput remoteInput = new RemoteInput.Builder(KEY_REPLY)
+                .setLabel("Reply Label")
+                .build();
+
+        final int notificationId = sNextNotificationId.getAndIncrement();
+        final PendingIntent pendingIntent = getReplyPendingIntent(context, notificationId);
+        final Notification.Action action =
+                new Notification.Action.Builder(null, "Direct Reply Test", pendingIntent)
+                        .addRemoteInput(remoteInput)
+                        .build();
+        final Notification notification = createNotificationBuilder(context)
+                .setContentText("Content Title")
+                .setSmallIcon(R.drawable.ic_launcher)
+                .setContentText("Message from " + UserHandle.getUserHandleForUid(Process.myUid()))
+                .setShowWhen(true)
+                .addAction(action)
+                .build();
+        context.getSystemService(NotificationManager.class).notify(notificationId, notification);
+    }
+
+    static void onReceiveDirectReply(Context context, Intent intent) {
+        final Bundle remoteInput = RemoteInput.getResultsFromIntent(intent);
+        if (remoteInput == null) {
+            return;
+        }
+        final CharSequence reply = remoteInput.getCharSequence(KEY_REPLY);
+        final int notificationId = intent.getIntExtra(KEY_NOTIFICATION_ID, 0);
+        final Notification.Builder notificationBuilder =
+                new Notification.Builder(context, CHANNEL_ID);
+        notificationBuilder.setContentText("Content Title")
+                .setSmallIcon(R.drawable.ic_launcher)
+                .setContentText(String.format("Sent \"%s\" to %s", reply,
+                        UserHandle.getUserHandleForUid(Process.myUid())));
+        context.getSystemService(NotificationManager.class)
+                .notify(notificationId, notificationBuilder.build());
+    }
+
+    private static PendingIntent getReplyPendingIntent(Context context, int notificationId) {
+        final Intent intent = new Intent(context, NotificationBroadcastReceiver.class);
+        intent.setAction(REPLY_ACTION);
+        intent.putExtra(KEY_NOTIFICATION_ID, notificationId);
+        // Pass notificationId as the result code to get a new PendingIntent rather than an existing
+        // one.
+        return PendingIntent.getBroadcast(context.getApplicationContext(), notificationId, intent,
+                PendingIntent.FLAG_ONE_SHOT);
+    }
+}
diff --git a/tools/EditTextVariations/src/com/android/inputmethod/tools/edittextvariations/ThemeItem.java b/tools/EditTextVariations/src/com/android/inputmethod/tools/edittextvariations/ThemeItem.java
new file mode 100644
index 0000000..f3c6d4f
--- /dev/null
+++ b/tools/EditTextVariations/src/com/android/inputmethod/tools/edittextvariations/ThemeItem.java
@@ -0,0 +1,68 @@
+/*
+ * Copyright (C) 2011 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.tools.edittextvariations;
+
+import android.os.Build;
+
+import com.android.inputmethod.tools.edittextvariations.R;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+public final class ThemeItem {
+    public final int id;
+    public final String name;
+
+    private ThemeItem(final String name, final int resId) {
+        this.id = resId;
+        this.name = name;
+    }
+
+    private static final String THEME_DEFAULT = "Default";
+    private static final String THEME_HOLO = "Theme_Holo";
+    private static final String THEME_HOLO_LIGHT = "Theme_Holo_Light";
+    private static final String THEME_DEVICE_DEFAULT = "Theme_DeviceDefault";
+    private static final String THEME_DEVICE_DEFAULT_LIGHT = "Theme_DeviceDefault_Light";
+    private static final String THEME_MATERIAL = "Theme_Material";
+    private static final String THEME_MATERIAL_LIGHT = "Theme_Material_Light";
+
+    public static String getDefaultThemeName() {
+        return THEME_DEFAULT;
+    }
+
+    public static final List<ThemeItem> THEME_LIST = createThemeList(
+            THEME_HOLO, THEME_HOLO_LIGHT, THEME_DEVICE_DEFAULT, THEME_DEVICE_DEFAULT_LIGHT,
+            THEME_MATERIAL, THEME_MATERIAL_LIGHT);
+
+    private static List<ThemeItem> createThemeList(final String... candidateList) {
+        final ArrayList<ThemeItem> list = new ArrayList<>();
+
+        // Default theme is always available as it's defined in our resource.
+        list.add(new ThemeItem(THEME_DEFAULT, R.style.defaultActivityTheme));
+
+        for (final String name : candidateList) {
+            final FinalClassField<Integer> constant =
+                    FinalClassField.newInstance(android.R.style.class, name, 0);
+            if (constant.defined) {
+                list.add(new ThemeItem(name, constant.value));
+            }
+        }
+
+        return Collections.unmodifiableList(list);
+    }
+}
diff --git a/tools/dicttool/Android.bp b/tools/dicttool/Android.bp
new file mode 100644
index 0000000..83b4ed3
--- /dev/null
+++ b/tools/dicttool/Android.bp
@@ -0,0 +1,32 @@
+// 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.
+
+java_binary_host {
+    name: "dicttool_aosp",
+
+    srcs: [
+        "src/**/*.java",
+        "tests/**/*.java",
+        "compat/**/*.java",
+        ":dicttool_deps",
+    ],
+
+    libs: ["junit"],
+    static_libs: [
+        "jsr305",
+        "latinime-common",
+    ],
+    required: ["libjni_latinime"],
+    main_class: "com.android.inputmethod.latin.dicttool.Dicttool",
+}
diff --git a/tools/dicttool/Android.mk b/tools/dicttool/Android.mk
deleted file mode 100644
index 4981629..0000000
--- a/tools/dicttool/Android.mk
+++ /dev/null
@@ -1,87 +0,0 @@
-#
-# 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.
-
-# Only build if it's explicitly requested, or running mm/mmm.
-ifneq ($(ONE_SHOT_MAKEFILE)$(filter $(MAKECMDGOALS),dicttool_aosp),)
-
-LATINIME_DICTTOOL_AOSP_LOCAL_PATH := $(call my-dir)
-LOCAL_PATH := $(LATINIME_DICTTOOL_AOSP_LOCAL_PATH)
-LATINIME_HOST_NATIVE_LIBNAME := liblatinime-aosp-dicttool-host
-include $(LOCAL_PATH)/NativeLib.mk
-
-######################################
-LOCAL_PATH := $(LATINIME_DICTTOOL_AOSP_LOCAL_PATH)
-include $(CLEAR_VARS)
-
-LATINIME_LOCAL_DIR := ../..
-LATINIME_BASE_SRC_DIR := $(LATINIME_LOCAL_DIR)/java/src/com/android/inputmethod
-LATINIME_BASE_OVERRIDABLE_SRC_DIR := \
-        $(LATINIME_LOCAL_DIR)/java-overridable/src/com/android/inputmethod
-MAKEDICT_CORE_SRC_DIR := $(LATINIME_BASE_SRC_DIR)/latin/makedict
-LATINIME_TESTS_SRC_DIR := $(LATINIME_LOCAL_DIR)/tests/src/com/android/inputmethod/latin
-
-# Dependencies for Dicttool. Most of these files are needed by BinaryDictionary.java. Note that
-# a significant part of the dependencies are mocked in the compat/ directory, with empty or
-# nearly-empty implementations, for parts that we don't use in Dicttool.
-LATINIME_SRC_FILES_FOR_DICTTOOL := \
-        latin/BinaryDictionary.java \
-        latin/DicTraverseSession.java \
-        latin/Dictionary.java \
-        latin/NgramContext.java \
-        latin/SuggestedWords.java \
-        latin/settings/SettingsValuesForSuggestion.java \
-        latin/utils/BinaryDictionaryUtils.java \
-        latin/utils/CombinedFormatUtils.java \
-        latin/utils/JniUtils.java
-
-LATINIME_OVERRIDABLE_SRC_FILES_FOR_DICTTOOL := \
-        latin/define/DebugFlags.java
-
-LATINIME_TEST_SRC_FILES_FOR_DICTTOOL := \
-        utils/ByteArrayDictBuffer.java
-
-USED_TARGETED_SRC_FILES := \
-        $(addprefix $(LATINIME_BASE_SRC_DIR)/, $(LATINIME_SRC_FILES_FOR_DICTTOOL)) \
-        $(addprefix $(LATINIME_BASE_OVERRIDABLE_SRC_DIR)/, \
-                $(LATINIME_OVERRIDABLE_SRC_FILES_FOR_DICTTOOL)) \
-        $(addprefix $(LATINIME_TESTS_SRC_DIR)/, $(LATINIME_TEST_SRC_FILES_FOR_DICTTOOL))
-
-DICTTOOL_ONDEVICE_TESTS_DIR := \
-        $(LATINIME_LOCAL_DIR)/tests/src/com/android/inputmethod/latin/makedict/
-DICTTOOL_COMPAT_TESTS_DIR := compat
-
-LOCAL_MAIN_SRC_FILES := $(call all-java-files-under, $(MAKEDICT_CORE_SRC_DIR))
-LOCAL_TOOL_SRC_FILES := $(call all-java-files-under, src)
-
-LOCAL_SRC_FILES := $(LOCAL_TOOL_SRC_FILES) \
-        $(filter-out $(addprefix %/, $(notdir $(LOCAL_TOOL_SRC_FILES))), $(LOCAL_MAIN_SRC_FILES)) \
-        $(USED_TARGETED_SRC_FILES) \
-        $(call all-java-files-under, \
-                tests $(DICTTOOL_COMPAT_TESTS_DIR) $(DICTTOOL_ONDEVICE_TESTS_DIR))
-
-LOCAL_JAVA_LIBRARIES := junit-host
-LOCAL_STATIC_JAVA_LIBRARIES := jsr305lib latinime-common-host
-LOCAL_REQUIRED_MODULES := $(LATINIME_HOST_NATIVE_LIBNAME)
-LOCAL_JAR_MANIFEST := etc/manifest.txt
-LOCAL_MODULE := dicttool_aosp
-
-include $(BUILD_HOST_JAVA_LIBRARY)
-include $(LOCAL_PATH)/etc/Android.mk
-
-# Clear our private variables
-LATINIME_DICTTOOL_AOSP_LOCAL_PATH :=
-LATINIME_LOCAL_DIR :=
-
-endif
diff --git a/tools/dicttool/NativeLib.mk b/tools/dicttool/NativeLib.mk
deleted file mode 100644
index 510f18c..0000000
--- a/tools/dicttool/NativeLib.mk
+++ /dev/null
@@ -1,46 +0,0 @@
-#
-# Copyright (C) 2013 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.
-
-LOCAL_PATH := $(call my-dir)
-include $(CLEAR_VARS)
-
-# Need to define the name of the library in the caller in LATINIME_HOST_NATIVE_LIBNAME
-
-LATINIME_DIR_RELATIVE_TO_DICTTOOL := ../..
-
-ifeq ($(FLAG_DBG), true)
-    $(warning Making debug version of native library)
-    LOCAL_CFLAGS += -DFLAG_DBG -funwind-tables -fno-inline
-endif #FLAG_DBG
-
-LOCAL_CFLAGS += -DHOST_TOOL -fPIC -Wno-deprecated -Wno-unused-parameter -Wno-unused-function
-
-LATINIME_NATIVE_JNI_DIR := $(LATINIME_DIR_RELATIVE_TO_DICTTOOL)/native/jni
-LATINIME_NATIVE_SRC_DIR := $(LATINIME_DIR_RELATIVE_TO_DICTTOOL)/native/jni/src
-LOCAL_C_INCLUDES := $(LOCAL_PATH)/$(LATINIME_NATIVE_SRC_DIR)
-
-include $(LOCAL_PATH)/$(LATINIME_NATIVE_JNI_DIR)/NativeFileList.mk
-
-LOCAL_SRC_FILES := \
-    $(addprefix $(LATINIME_NATIVE_JNI_DIR)/, $(LATIN_IME_JNI_SRC_FILES)) \
-    $(addprefix $(LATINIME_NATIVE_SRC_DIR)/, $(LATIN_IME_CORE_SRC_FILES))
-
-LOCAL_MODULE := $(LATINIME_HOST_NATIVE_LIBNAME)
-
-include $(BUILD_HOST_SHARED_LIBRARY)
-
-# Clear our private variables
-include $(LOCAL_PATH)/$(LATINIME_NATIVE_JNI_DIR)/CleanupNativeFileList.mk
-LATINIME_DIR_RELATIVE_TO_DICTTOOL := ../..
diff --git a/tools/dicttool/compat/com/android/inputmethod/latin/define/JniLibName.java b/tools/dicttool/compat/com/android/inputmethod/latin/define/JniLibName.java
index d6d5e2d..93ac198 100644
--- a/tools/dicttool/compat/com/android/inputmethod/latin/define/JniLibName.java
+++ b/tools/dicttool/compat/com/android/inputmethod/latin/define/JniLibName.java
@@ -21,5 +21,5 @@
         // This class is not publicly instantiable.
     }
 
-    public static final String JNI_LIB_NAME = "latinime-aosp-dicttool-host";
+    public static final String JNI_LIB_NAME = "jni_latinime";
 }
diff --git a/tools/dicttool/etc/Android.mk b/tools/dicttool/etc/Android.mk
deleted file mode 100644
index 0c611b7..0000000
--- a/tools/dicttool/etc/Android.mk
+++ /dev/null
@@ -1,19 +0,0 @@
-# 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.
-
-LOCAL_PATH := $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_PREBUILT_EXECUTABLES := dicttool_aosp makedict_aosp
-include $(BUILD_HOST_PREBUILT)
diff --git a/tools/dicttool/etc/dicttool_aosp b/tools/dicttool/etc/dicttool_aosp
deleted file mode 100755
index fc918f0..0000000
--- a/tools/dicttool/etc/dicttool_aosp
+++ /dev/null
@@ -1,67 +0,0 @@
-#!/bin/sh
-# Copyright 2011, 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.
-
-# Set up prog to be the path of this script, including following symlinks,
-# and set up progdir to be the fully-qualified pathname of its directory.
-prog="$0"
-while [ -h "${prog}" ]; do
-    newProg=`/bin/ls -ld "${prog}"`
-    newProg=`expr "${newProg}" : ".* -> \(.*\)$"`
-    if expr "x${newProg}" : 'x/' >/dev/null; then
-        prog="${newProg}"
-    else
-        progdir=`dirname "${prog}"`
-        prog="${progdir}/${newProg}"
-    fi
-done
-oldwd=`pwd`
-progdir=`dirname "${prog}"`
-cd "${progdir}"
-progdir=`pwd`
-prog="${progdir}"/`basename "${prog}"`
-cd "${oldwd}"
-
-classname=com.android.inputmethod.latin.dicttool.Dicttool
-jarfile=dicttool_aosp.jar
-frameworkdir="$progdir"
-if [ ! -r "$frameworkdir/$jarfile" ]
-then
-    frameworkdir=`dirname "$progdir"`/framework
-    libdir=`dirname "$progdir"`/lib64
-fi
-if [ ! -r "$frameworkdir/$jarfile" ]
-then
-    echo `basename "$prog"`": can't find $jarfile"
-    exit 1
-fi
-
-lib=junit.jar
-if [ ! -r "$frameworkdir/$lib" ]
-then
-    echo `basename "$prog"`": can't find lib $lib"
-    exit 1
-fi
-
-if [ "$OSTYPE" = "cygwin" ] ; then
-    jarpath=`cygpath -w  "$frameworkdir/$jarfile"`
-    libpath=`cygpath -w  "$frameworkdir/$lib"`
-    progdir=`cygpath -w  "$progdir"`
-else
-    jarpath="$frameworkdir/$jarfile"
-    libpath="$frameworkdir/$lib"
-fi
-
-# might need more memory, e.g. -Xmx128M
-exec java -ea -classpath "$libpath":"$jarpath" -Djava.library.path="$libdir" "$classname" "$@"
diff --git a/tools/dicttool/etc/makedict_aosp b/tools/dicttool/etc/makedict_aosp
deleted file mode 100755
index 095c505..0000000
--- a/tools/dicttool/etc/makedict_aosp
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/bin/sh
-# 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.
-
-# Dicttool supports making the dictionary using the 'makedict' command and
-# the same arguments that the old 'makedict' command used to accept.
-dicttool_aosp makedict $@
diff --git a/tools/dicttool/etc/manifest.txt b/tools/dicttool/etc/manifest.txt
deleted file mode 100644
index 67c8521..0000000
--- a/tools/dicttool/etc/manifest.txt
+++ /dev/null
@@ -1 +0,0 @@
-Main-Class: com.android.inputmethod.latin.dicttool.Dicttool
diff --git a/tools/dicttool/src/com/android/inputmethod/latin/dicttool/CombinedInputOutput.java b/tools/dicttool/src/com/android/inputmethod/latin/dicttool/CombinedInputOutput.java
index 955c572..5e7aca5 100644
--- a/tools/dicttool/src/com/android/inputmethod/latin/dicttool/CombinedInputOutput.java
+++ b/tools/dicttool/src/com/android/inputmethod/latin/dicttool/CombinedInputOutput.java
@@ -106,8 +106,7 @@
             final String args[] = line.trim().split(",");
             if (args[0].matches(CombinedFormatUtils.WORD_TAG + "=.*")) {
                 if (null != word) {
-                    dict.add(word, probabilityInfo, shortcuts.isEmpty() ? null : shortcuts,
-                            isNotAWord, isPossiblyOffensive);
+                    dict.add(word, probabilityInfo, isNotAWord, isPossiblyOffensive);
                     for (WeightedString s : bigrams) {
                         dict.setBigram(word, s.mWord, s.mProbabilityInfo);
                     }
@@ -148,25 +147,6 @@
                             break;
                     }
                 }
-            } else if (args[0].matches(CombinedFormatUtils.SHORTCUT_TAG + "=.*")) {
-                String shortcut = null;
-                int shortcutFreq = 0;
-                for (String param : args) {
-                    final String params[] = param.split("=", 2);
-                    if (2 != params.length) throw new RuntimeException("Wrong format : " + line);
-                    if (CombinedFormatUtils.SHORTCUT_TAG.equals(params[0])) {
-                        shortcut = params[1];
-                    } else if (CombinedFormatUtils.PROBABILITY_TAG.equals(params[0])) {
-                        shortcutFreq = WHITELIST_TAG.equals(params[1])
-                                ? FormatSpec.SHORTCUT_WHITELIST_FREQUENCY
-                                : Integer.parseInt(params[1]);
-                    }
-                }
-                if (null != shortcut) {
-                    shortcuts.add(new WeightedString(shortcut, shortcutFreq));
-                } else {
-                    throw new RuntimeException("Wrong format : " + line);
-                }
             } else if (args[0].matches(CombinedFormatUtils.BIGRAM_TAG + "=.*")) {
                 String secondWordOfBigram = null;
                 ProbabilityInfo bigramProbabilityInfo = new ProbabilityInfo(0);
@@ -200,8 +180,7 @@
             }
         }
         if (null != word) {
-            dict.add(word, probabilityInfo, shortcuts.isEmpty() ? null : shortcuts, isNotAWord,
-                    isPossiblyOffensive);
+            dict.add(word, probabilityInfo, isNotAWord, isPossiblyOffensive);
             for (WeightedString s : bigrams) {
                 dict.setBigram(word, s.mWord, s.mProbabilityInfo);
             }
diff --git a/tools/dicttool/src/com/android/inputmethod/latin/dicttool/Diff.java b/tools/dicttool/src/com/android/inputmethod/latin/dicttool/Diff.java
index f97fbef..4ba7e13 100644
--- a/tools/dicttool/src/com/android/inputmethod/latin/dicttool/Diff.java
+++ b/tools/dicttool/src/com/android/inputmethod/latin/dicttool/Diff.java
@@ -136,9 +136,6 @@
                 }
                 hasDifferences |= hasAttributesDifferencesAndPrintThemIfAny(word0Property.mWord,
                         "Bigram", word0Property.getBigrams(), word1PtNode.getBigrams());
-                hasDifferences |= hasAttributesDifferencesAndPrintThemIfAny(word0Property.mWord,
-                        "Shortcut", word0Property.mShortcutTargets,
-                        word1PtNode.getShortcutTargets());
             }
         }
         for (final WordProperty word1Property : dict1) {
diff --git a/tools/dicttool/src/com/android/inputmethod/latin/dicttool/Info.java b/tools/dicttool/src/com/android/inputmethod/latin/dicttool/Info.java
index b8a64e3..d516d60 100644
--- a/tools/dicttool/src/com/android/inputmethod/latin/dicttool/Info.java
+++ b/tools/dicttool/src/com/android/inputmethod/latin/dicttool/Info.java
@@ -48,15 +48,6 @@
             if (wordProperty.mHasNgrams) {
                 bigramCount += wordProperty.mNgrams.size();
             }
-            if (null != wordProperty.mShortcutTargets) {
-                shortcutCount += wordProperty.mShortcutTargets.size();
-                for (WeightedString shortcutTarget : wordProperty.mShortcutTargets) {
-                    if (FormatSpec.SHORTCUT_WHITELIST_FREQUENCY
-                            == shortcutTarget.getProbability()) {
-                        ++whitelistCount;
-                    }
-                }
-            }
         }
         System.out.println("Words in the dictionary : " + wordCount);
         System.out.println("Bigram count : " + bigramCount);
@@ -78,17 +69,6 @@
         if (ptNode.getIsPossiblyOffensive()) {
             System.out.println("  Is possibly offensive");
         }
-        final ArrayList<WeightedString> shortcutTargets = ptNode.getShortcutTargets();
-        if (null == shortcutTargets || shortcutTargets.isEmpty()) {
-            System.out.println("  No shortcuts");
-        } else {
-            for (final WeightedString shortcutTarget : shortcutTargets) {
-                System.out.println("  Shortcut target: " + shortcutTarget.mWord + " ("
-                        + (FormatSpec.SHORTCUT_WHITELIST_FREQUENCY
-                                == shortcutTarget.getProbability() ?
-                                        "whitelist" : shortcutTarget.getProbability()) + ")");
-            }
-        }
         final ArrayList<WeightedString> bigrams = ptNode.getBigrams();
         if (null == bigrams || bigrams.isEmpty()) {
             System.out.println("  No bigrams");
diff --git a/tools/dicttool/tests/com/android/inputmethod/latin/dicttool/BinaryDictOffdeviceUtilsTests.java b/tools/dicttool/tests/com/android/inputmethod/latin/dicttool/BinaryDictOffdeviceUtilsTests.java
index e68aeb0..84d36a0 100644
--- a/tools/dicttool/tests/com/android/inputmethod/latin/dicttool/BinaryDictOffdeviceUtilsTests.java
+++ b/tools/dicttool/tests/com/android/inputmethod/latin/dicttool/BinaryDictOffdeviceUtilsTests.java
@@ -85,15 +85,15 @@
         testOptions.mAttributes.put(DictionaryHeader.DICTIONARY_LOCALE_KEY, LOCALE);
         testOptions.mAttributes.put(DictionaryHeader.DICTIONARY_ID_KEY, ID);
         final FusionDictionary dict = new FusionDictionary(new PtNodeArray(), testOptions);
-        dict.add("foo", new ProbabilityInfo(TEST_FREQ), null, false /* isNotAWord */,
+        dict.add("foo", new ProbabilityInfo(TEST_FREQ), false /* isNotAWord */,
                 false /* isPossiblyOffensive */);
-        dict.add("fta", new ProbabilityInfo(1), null, false /* isNotAWord */,
+        dict.add("fta", new ProbabilityInfo(1), false /* isNotAWord */,
                 false /* isPossiblyOffensive */);
-        dict.add("ftb", new ProbabilityInfo(1), null, false /* isNotAWord */,
+        dict.add("ftb", new ProbabilityInfo(1), false /* isNotAWord */,
                 false /* isPossiblyOffensive */);
-        dict.add("bar", new ProbabilityInfo(1), null, false /* isNotAWord */,
+        dict.add("bar", new ProbabilityInfo(1), false /* isNotAWord */,
                 false /* isPossiblyOffensive */);
-        dict.add("fool", new ProbabilityInfo(1), null, false /* isNotAWord */,
+        dict.add("fool", new ProbabilityInfo(1), false /* isNotAWord */,
                 false /* isPossiblyOffensive */);
 
         final File dst = File.createTempFile("testGetRawDict", ".tmp");
@@ -171,8 +171,8 @@
 
         for (int i = 0; i < sWords.size(); ++i) {
             final String word = sWords.get(i);
-            dict.add(word, new ProbabilityInfo(TEST_FREQ), null /* shortcuts */,
-                    false /* isNotAWord */, false /* isPossiblyOffensive */);
+            dict.add(word, new ProbabilityInfo(TEST_FREQ), false /* isNotAWord */,
+                     false /* isPossiblyOffensive */);
         }
 
         File file = File.createTempFile(dictName, ".tmp");
diff --git a/tools/dicttool/tests/com/android/inputmethod/latin/makedict/BinaryDictEncoderFlattenTreeTests.java b/tools/dicttool/tests/com/android/inputmethod/latin/makedict/BinaryDictEncoderFlattenTreeTests.java
index dc9981d..178fc41 100644
--- a/tools/dicttool/tests/com/android/inputmethod/latin/makedict/BinaryDictEncoderFlattenTreeTests.java
+++ b/tools/dicttool/tests/com/android/inputmethod/latin/makedict/BinaryDictEncoderFlattenTreeTests.java
@@ -33,15 +33,15 @@
     public void testFlattenNodes() {
         final FusionDictionary dict = new FusionDictionary(new PtNodeArray(),
                 new DictionaryOptions(new HashMap<String, String>()));
-        dict.add("foo", new ProbabilityInfo(1), null, false /* isNotAWord */,
+        dict.add("foo", new ProbabilityInfo(1), false /* isNotAWord */,
                 false /* isPossiblyOffensive */);
-        dict.add("fta", new ProbabilityInfo(1), null, false /* isNotAWord */,
+        dict.add("fta", new ProbabilityInfo(1), false /* isNotAWord */,
                 false /* isPossiblyOffensive */);
-        dict.add("ftb", new ProbabilityInfo(1), null, false /* isNotAWord */,
+        dict.add("ftb", new ProbabilityInfo(1), false /* isNotAWord */,
                 false /* isPossiblyOffensive */);
-        dict.add("bar", new ProbabilityInfo(1), null, false /* isNotAWord */,
+        dict.add("bar", new ProbabilityInfo(1), false /* isNotAWord */,
                 false /* isPossiblyOffensive */);
-        dict.add("fool", new ProbabilityInfo(1), null, false /* isNotAWord */,
+        dict.add("fool", new ProbabilityInfo(1), false /* isNotAWord */,
                 false /* isPossiblyOffensive */);
         final ArrayList<PtNodeArray> result =
                 BinaryDictEncoderUtils.flattenTree(dict.mRootNodeArray);
diff --git a/tools/dicttool/tests/com/android/inputmethod/latin/makedict/FusionDictionaryTest.java b/tools/dicttool/tests/com/android/inputmethod/latin/makedict/FusionDictionaryTest.java
index 1a4f096..6260239 100644
--- a/tools/dicttool/tests/com/android/inputmethod/latin/makedict/FusionDictionaryTest.java
+++ b/tools/dicttool/tests/com/android/inputmethod/latin/makedict/FusionDictionaryTest.java
@@ -102,7 +102,7 @@
         prepare(time);
         for (int i = 0; i < sWords.size(); ++i) {
             System.out.println("Adding in pos " + i + " : " + dumpWord(sWords.get(i)));
-            dict.add(sWords.get(i), new ProbabilityInfo(180), null, false,
+            dict.add(sWords.get(i), new ProbabilityInfo(180), false,
                     false /* isPossiblyOffensive */);
             dumpDict(dict);
             checkDictionary(dict, sWords, i);
diff --git a/tools/make-keyboard-text/Android.bp b/tools/make-keyboard-text/Android.bp
new file mode 100644
index 0000000..4976051
--- /dev/null
+++ b/tools/make-keyboard-text/Android.bp
@@ -0,0 +1,22 @@
+//
+// 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.
+
+java_binary_host {
+    name: "make-keyboard-text",
+
+    srcs: ["src/**/*.java"],
+    main_class: "com.android.inputmethod.keyboard.tools.MakeKeyboardText",
+    java_resource_dirs: ["res"],
+}
diff --git a/tools/make-keyboard-text/Android.mk b/tools/make-keyboard-text/Android.mk
deleted file mode 100644
index 8760148..0000000
--- a/tools/make-keyboard-text/Android.mk
+++ /dev/null
@@ -1,25 +0,0 @@
-#
-# 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.
-
-LOCAL_PATH := $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES += $(call all-java-files-under,src)
-LOCAL_JAR_MANIFEST := etc/manifest.txt
-LOCAL_JAVA_RESOURCE_DIRS := res
-LOCAL_MODULE := make-keyboard-text
-
-include $(BUILD_HOST_JAVA_LIBRARY)
-include $(LOCAL_PATH)/etc/Android.mk
diff --git a/tools/make-keyboard-text/etc/Android.mk b/tools/make-keyboard-text/etc/Android.mk
deleted file mode 100644
index 0fbf4ff..0000000
--- a/tools/make-keyboard-text/etc/Android.mk
+++ /dev/null
@@ -1,20 +0,0 @@
-# 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.
-
-LOCAL_PATH := $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_PREBUILT_EXECUTABLES := make-keyboard-text
-
-include $(BUILD_HOST_PREBUILT)
diff --git a/tools/make-keyboard-text/etc/make-keyboard-text b/tools/make-keyboard-text/etc/make-keyboard-text
deleted file mode 100755
index 156f9ec..0000000
--- a/tools/make-keyboard-text/etc/make-keyboard-text
+++ /dev/null
@@ -1,63 +0,0 @@
-#!/bin/sh
-# Copyright 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.
-
-# Set up prog to be the path of this script, including following symlinks,
-# and set up progdir to be the fully-qualified pathname of its directory.
-prog="$0"
-while [ -h "${prog}" ]; do
-    newProg=`/bin/ls -ld "${prog}"`
-    newProg=`expr "${newProg}" : ".* -> \(.*\)$"`
-    if expr "x${newProg}" : 'x/' >/dev/null; then
-        prog="${newProg}"
-    else
-        progdir=`dirname "${prog}"`
-        prog="${progdir}/${newProg}"
-    fi
-done
-oldwd=`pwd`
-progdir=`dirname "${prog}"`
-cd "${progdir}"
-progdir=`pwd`
-prog="${progdir}"/`basename "${prog}"`
-cd "${oldwd}"
-
-jarfile=make-keyboard-text.jar
-frameworkdir="$progdir"
-if [ ! -r "$frameworkdir/$jarfile" ]
-then
-    frameworkdir=`dirname "$progdir"`/tools/lib
-    libdir=`dirname "$progdir"`/tools/lib
-fi
-if [ ! -r "$frameworkdir/$jarfile" ]
-then
-    frameworkdir=`dirname "$progdir"`/framework
-    libdir=`dirname "$progdir"`/lib
-fi
-if [ ! -r "$frameworkdir/$jarfile" ]
-then
-    echo `basename "$prog"`": can't find $jarfile"
-    exit 1
-fi
-
-if [ "$OSTYPE" = "cygwin" ] ; then
-    jarpath=`cygpath -w  "$frameworkdir/$jarfile"`
-    progdir=`cygpath -w  "$progdir"`
-else
-    jarpath="$frameworkdir/$jarfile"
-fi
-
-# need to use "java.ext.dirs" because "-jar" causes classpath to be ignored
-# might need more memory, e.g. -Xmx128M
-exec java -ea -jar "$jarpath" "$@"
diff --git a/tools/make-keyboard-text/etc/manifest.txt b/tools/make-keyboard-text/etc/manifest.txt
deleted file mode 100644
index 8ad4db0..0000000
--- a/tools/make-keyboard-text/etc/manifest.txt
+++ /dev/null
@@ -1 +0,0 @@
-Main-Class: com.android.inputmethod.keyboard.tools.MakeKeyboardText
