From 9a924d7b007dc70c78c75f36ecbc0ff73d02b621 Mon Sep 17 00:00:00 2001
From: "Tadashi G. Takaoka" <takaoka@google.com>
Date: Wed, 3 Jul 2013 19:09:24 +0900
Subject: [PATCH] Add Spanish (Latin America) subtype (es_419)

Bug: 7531804
Change-Id: I183443779f8d9d472ac5e528e1d905366bd83c90
---
 java/res/xml/method.xml                       |  6 ++--
 .../KeyboardLayoutSetSubtypesCountTests.java  |  4 +--
 .../layout/tests/TestsSpanish419.java         | 36 +++++++++++++++++++
 3 files changed, 40 insertions(+), 6 deletions(-)
 create mode 100644 tests/src/com/android/inputmethod/keyboard/layout/tests/TestsSpanish419.java

diff --git a/java/res/xml/method.xml b/java/res/xml/method.xml
index 1bef3c2542..6d8f787734 100644
--- a/java/res/xml/method.xml
+++ b/java/res/xml/method.xml
@@ -40,7 +40,7 @@
     eo: Esperanto/spanish
     es: Spanish/spanish
     es_US: Spanish (United States)/spanish
-    (es_419: Spanish (Latin America)/qwerty)
+    es_419: Spanish (Latin America)/spanish
     et_EE: Estonian (Estonia)/nordic
     eu_ES: Basque (Spain)/spanish
     fa: Persian/farsi
@@ -248,16 +248,14 @@
             android:imeSubtypeExtraValue="KeyboardLayoutSet=spanish,AsciiCapable,EmojiCapable"
             android:isAsciiCapable="true"
     />
-    <!--
     <subtype android:icon="@drawable/ic_ime_switcher_dark"
             android:label="@string/subtype_generic"
-            android:subtypeId="0x623f9286"
+            android:subtypeId="0xa23e5d19"
             android:imeSubtypeLocale="es_419"
             android:imeSubtypeMode="keyboard"
             android:imeSubtypeExtraValue="KeyboardLayoutSet=spanish,AsciiCapable,EmojiCapable"
             android:isAsciiCapable="true"
     />
-    -->
     <subtype android:icon="@drawable/ic_ime_switcher_dark"
             android:label="@string/subtype_generic"
             android:subtypeId="0xec2d3955"
diff --git a/tests/src/com/android/inputmethod/keyboard/KeyboardLayoutSetSubtypesCountTests.java b/tests/src/com/android/inputmethod/keyboard/KeyboardLayoutSetSubtypesCountTests.java
index 57d2950587..18390b2cdd 100644
--- a/tests/src/com/android/inputmethod/keyboard/KeyboardLayoutSetSubtypesCountTests.java
+++ b/tests/src/com/android/inputmethod/keyboard/KeyboardLayoutSetSubtypesCountTests.java
@@ -25,8 +25,8 @@ import java.util.ArrayList;
 
 @SmallTest
 public class KeyboardLayoutSetSubtypesCountTests extends KeyboardLayoutSetTestsBase {
-    private static final int NUMBER_OF_SUBTYPES = 68;
-    private static final int NUMBER_OF_ASCII_CAPABLE_SUBTYPES = 43;
+    private static final int NUMBER_OF_SUBTYPES = 69;
+    private static final int NUMBER_OF_ASCII_CAPABLE_SUBTYPES = 44;
     private static final int NUMBER_OF_PREDEFINED_ADDITIONAL_SUBTYPES = 2;
 
     private static String toString(final ArrayList<InputMethodSubtype> subtypeList) {
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsSpanish419.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsSpanish419.java
new file mode 100644
index 0000000000..75aad136fa
--- /dev/null
+++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsSpanish419.java
@@ -0,0 +1,36 @@
+/*
+ * 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.
+ */
+
+package com.android.inputmethod.keyboard.layout.tests;
+
+import android.test.suitebuilder.annotation.SmallTest;
+
+import com.android.inputmethod.keyboard.layout.LayoutBase;
+import com.android.inputmethod.keyboard.layout.Spanish;
+
+import java.util.Locale;
+
+/**
+ * es_419: Spanish (Latin America)/spanish
+ */
+@SmallTest
+public class TestsSpanish419 extends LayoutTestsBase {
+    private static final Locale LOCALE = new Locale("es", "419");
+    private static final LayoutBase LAYOUT = new Spanish(new SpanishCustomizer(LOCALE));
+
+    @Override
+    LayoutBase getLayout() { return LAYOUT; }
+}
-- 
GitLab