diff --git a/java/res/values/attrs.xml b/java/res/values/attrs.xml
index 9d828ef91782695a92f6bf633374f4b4ae4c8645..80a657346a51f1422c6138cf1f00c61c9c187a78 100644
--- a/java/res/values/attrs.xml
+++ b/java/res/values/attrs.xml
@@ -490,6 +490,10 @@
             <enum name="georgian" value="6" />
             <enum name="khmer" value="7" />
             <enum name="lao" value="8" />
+            <enum name="myanmar" value="9" />
+            <enum name="sinhala" value="10" />
+            <enum name="thai" value="11" />
+            <enum name="telugu" value="12" />
         </attr>
     </declare-styleable>
 
diff --git a/java/res/xml/keyboard_layout_set_myanmar.xml b/java/res/xml/keyboard_layout_set_myanmar.xml
index 5c823b2634d3976bddb7d3006a337e9ee0e06e6d..5af8c064eac7baa1fd62ce74fcf68090b9ec6798 100644
--- a/java/res/xml/keyboard_layout_set_myanmar.xml
+++ b/java/res/xml/keyboard_layout_set_myanmar.xml
@@ -20,6 +20,8 @@
 
 <KeyboardLayoutSet
     xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin">
+    <Feature
+        latin:supportedScript="myanmar" />
     <Element
         latin:elementName="alphabet"
         latin:elementKeyboard="@xml/kbd_myanmar"
diff --git a/java/res/xml/keyboard_layout_set_sinhala.xml b/java/res/xml/keyboard_layout_set_sinhala.xml
index 8e6e619d2356fcc60001f33f123067b0a195aa47..1955d218f0e3f61ca4ab17801e14dd632fc6d5d3 100644
--- a/java/res/xml/keyboard_layout_set_sinhala.xml
+++ b/java/res/xml/keyboard_layout_set_sinhala.xml
@@ -20,6 +20,8 @@
 
 <KeyboardLayoutSet
     xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin">
+    <Feature
+        latin:supportedScript="sinhala" />
     <Element
         latin:elementName="alphabet"
         latin:elementKeyboard="@xml/kbd_sinhala"
diff --git a/java/res/xml/keyboard_layout_set_telugu.xml b/java/res/xml/keyboard_layout_set_telugu.xml
index aca47b9d9298de532bad45b4187d4ac0e3804b11..2bf65bcbda16dcee65dcd5f1a7692fa246507d88 100644
--- a/java/res/xml/keyboard_layout_set_telugu.xml
+++ b/java/res/xml/keyboard_layout_set_telugu.xml
@@ -20,6 +20,8 @@
 
 <KeyboardLayoutSet
     xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin">
+    <Feature
+        latin:supportedScript="telugu" />
     <Element
         latin:elementName="alphabet"
         latin:elementKeyboard="@xml/kbd_telugu"
diff --git a/java/res/xml/keyboard_layout_set_thai.xml b/java/res/xml/keyboard_layout_set_thai.xml
index b8f99971b908b53f8c71453e5d8bcd8ddb18ed96..f69dfa6bda17a7067a6f1d046eea6571b3553ce1 100644
--- a/java/res/xml/keyboard_layout_set_thai.xml
+++ b/java/res/xml/keyboard_layout_set_thai.xml
@@ -20,6 +20,8 @@
 
 <KeyboardLayoutSet
     xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin">
+    <Feature
+        latin:supportedScript="thai" />
     <Element
         latin:elementName="alphabet"
         latin:elementKeyboard="@xml/kbd_thai"
diff --git a/java/src/com/android/inputmethod/latin/utils/ScriptUtils.java b/java/src/com/android/inputmethod/latin/utils/ScriptUtils.java
index 73f715a4e05b8783b28da4ac325c01589c83e676..f3df63f457fba616684d0b0f92276c27084a84d5 100644
--- a/java/src/com/android/inputmethod/latin/utils/ScriptUtils.java
+++ b/java/src/com/android/inputmethod/latin/utils/ScriptUtils.java
@@ -35,6 +35,10 @@ public class ScriptUtils {
     public static final int SCRIPT_GEORGIAN = 6;
     public static final int SCRIPT_KHMER = 7;
     public static final int SCRIPT_LAO = 8;
+    public static final int SCRIPT_MYANMAR = 9;
+    public static final int SCRIPT_SINHALA = 10;
+    public static final int SCRIPT_THAI = 11;
+    public static final int SCRIPT_TELUGU = 12;
     public static final TreeMap<String, Integer> mSpellCheckerLanguageToScript;
     static {
         // List of the supported languages and their associated script. We won't check
@@ -132,6 +136,23 @@ public class ScriptUtils {
         case SCRIPT_LAO:
             // The Lao block is U+0E80..U+0EFF
             return (codePoint >= 0xE80 && codePoint <= 0xEFF);
+        case SCRIPT_MYANMAR:
+            // Myanmar has three unicode blocks :
+            // Myanmar U+1000..U+109F
+            // Myanmar extended-A U+AA60..U+AA7F
+            // Myanmar extended-B U+A9E0..U+A9FF
+            return (codePoint >= 0x1000 && codePoint <= 0x109F
+                    || codePoint >= 0xAA60 && codePoint <= 0xAA7F
+                    || codePoint >= 0xA9E0 && codePoint <= 0xA9FF);
+        case SCRIPT_SINHALA:
+            // Sinhala unicode block is U+0D80..U+0DFF
+            return (codePoint >= 0xD80 && codePoint <= 0xDFF);
+        case SCRIPT_THAI:
+            // Thai unicode block is U+0E00..U+0E7F
+            return (codePoint >= 0xE00 && codePoint <= 0xE7F);
+        case SCRIPT_TELUGU:
+            // Telugu unicode block is U+0C00..U+0C7F
+            return (codePoint >= 0xC00 && codePoint <= 0xC7F);
         case SCRIPT_UNKNOWN:
             return true;
         default: