Update Hebrew keyboard

Bug: 4170083
Change-Id: I977d7f6cce08e35fe9bed46fe5f4fdedd1f12e9c
diff --git a/java/res/xml-sw600dp/kbd_key_styles.xml b/java/res/xml-sw600dp/kbd_key_styles.xml
index aa9b183..bd6736a 100644
--- a/java/res/xml-sw600dp/kbd_key_styles.xml
+++ b/java/res/xml-sw600dp/kbd_key_styles.xml
@@ -50,12 +50,24 @@
         latin:keyIconShifted="iconShiftedShiftKey"
         latin:parentStyle="functionalKeyStyle"
         latin:isSticky="true" />
-    <key-style
-        latin:styleName="deleteKeyStyle"
-        latin:code="@integer/key_delete"
-        latin:keyIcon="iconDeleteKey"
-        latin:parentStyle="functionalKeyStyle"
-        latin:isRepeatable="true" />
+    <switch>
+        <case latin:languageCode="iw">
+            <key-style
+                latin:styleName="deleteKeyStyle"
+                latin:code="@integer/key_delete"
+                latin:keyIcon="iconDeleteRtlKey"
+                latin:parentStyle="functionalKeyStyle"
+                latin:isRepeatable="true" />
+        </case>
+        <default>
+            <key-style
+                latin:styleName="deleteKeyStyle"
+                latin:code="@integer/key_delete"
+                latin:keyIcon="iconDeleteKey"
+                latin:parentStyle="functionalKeyStyle"
+                latin:isRepeatable="true" />
+        </default>
+    </switch>
     <key-style
         latin:styleName="returnKeyStyle"
         latin:code="@integer/key_return"
diff --git a/java/res/xml-sw600dp/kbd_qwerty_row3.xml b/java/res/xml-sw600dp/kbd_qwerty_row3.xml
index 278db13..b4eed8a 100644
--- a/java/res/xml-sw600dp/kbd_qwerty_row3.xml
+++ b/java/res/xml-sw600dp/kbd_qwerty_row3.xml
@@ -46,29 +46,9 @@
             latin:popupCharacters="@string/alternates_for_n" />
         <Key
             latin:keyLabel="m" />
-        <switch>
-            <case
-                latin:mode="email"
-            >
-                <Key
-                    latin:keyLabel="," />
-                <Key
-                    latin:keyLabel="." />
-            </case>
-            <default>
-                <Key
-                    latin:keyLabel=","
-                    latin:keyLabelOption="hasUppercaseLetter"
-                    latin:keyHintLabel="!"
-                    latin:popupCharacters="!" />
-                <Key
-                    latin:keyLabel="."
-                    latin:keyLabelOption="hasUppercaseLetter"
-                    latin:keyHintLabel="\?"
-                    latin:popupCharacters="\?" />
-            </default>
-        </switch>
         <include
-            latin:keyboardLayout="@xml/kbd_row3_right" />
+            latin:keyboardLayout="@xml/kbd_row3_comma_period" />
+        <include
+            latin:keyboardLayout="@xml/kbd_row3_smiley" />
     </Row>
 </merge>
diff --git a/java/res/xml-sw600dp/kbd_qwerty_row4.xml b/java/res/xml-sw600dp/kbd_qwerty_row4.xml
index c457c69..5cd47d9 100644
--- a/java/res/xml-sw600dp/kbd_qwerty_row4.xml
+++ b/java/res/xml-sw600dp/kbd_qwerty_row4.xml
@@ -59,46 +59,15 @@
             latin:keyWidth="39.750%p" />
         <switch>
             <case
-                latin:mode="email"
+                latin:languageCode="iw"
             >
-                <Key
-                    latin:keyLabel="-"
-                    latin:keyWidth="9.750%p" />
+                <include
+                    latin:keyboardLayout="@xml/kbd_row3_comma_period" />
             </case>
-            <case
-                latin:mode="url"
-            >
-                <Key
-                    latin:keyLabel="/"
-                    latin:keyLabelOption="hasUppercaseLetter"
-                    latin:keyHintLabel=":"
-                    latin:popupCharacters=":"
-                    latin:keyWidth="9.750%p" />
-            </case>
+            <!-- not languageCode="iw" -->
             <default>
-                <Key
-                    latin:keyLabel="\'"
-                    latin:keyLabelOption="hasUppercaseLetter"
-                    latin:keyHintLabel="&quot;"
-                    latin:popupCharacters="&quot;"
-                    latin:keyWidth="9.750%p" />
-            </default>
-        </switch>
-        <switch>
-            <case
-                latin:mode="email"
-            >
-                <Key
-                    latin:keyLabel="_"
-                    latin:keyWidth="9.750%p" />
-            </case>
-            <default>
-                <Key
-                    latin:keyLabel="-"
-                    latin:keyLabelOption="hasUppercaseLetter"
-                    latin:keyHintLabel="_"
-                    latin:popupCharacters="_"
-                    latin:keyWidth="9.750%p" />
+                <include
+                    latin:keyboardLayout="@xml/kbd_row4_apostrophe_dash" />
             </default>
         </switch>
         <Spacer
diff --git a/java/res/xml-sw600dp/kbd_row3_comma_period.xml b/java/res/xml-sw600dp/kbd_row3_comma_period.xml
new file mode 100644
index 0000000..2545316
--- /dev/null
+++ b/java/res/xml-sw600dp/kbd_row3_comma_period.xml
@@ -0,0 +1,46 @@
+<?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.
+*/
+-->
+
+<merge
+    xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
+>
+    <switch>
+        <case
+            latin:mode="email"
+        >
+            <Key
+                latin:keyLabel="," />
+            <Key
+                latin:keyLabel="." />
+        </case>
+        <default>
+            <Key
+                latin:keyLabel=","
+                latin:keyLabelOption="hasUppercaseLetter"
+                latin:keyHintLabel="!"
+                latin:popupCharacters="!" />
+            <Key
+                latin:keyLabel="."
+                latin:keyLabelOption="hasUppercaseLetter"
+                latin:keyHintLabel="\?"
+                latin:popupCharacters="\?" />
+        </default>
+    </switch>
+</merge>
diff --git a/java/res/xml-sw600dp/kbd_row3_right.xml b/java/res/xml-sw600dp/kbd_row3_smiley.xml
similarity index 100%
rename from java/res/xml-sw600dp/kbd_row3_right.xml
rename to java/res/xml-sw600dp/kbd_row3_smiley.xml
diff --git a/java/res/xml-sw600dp/kbd_row4_apostrophe_dash.xml b/java/res/xml-sw600dp/kbd_row4_apostrophe_dash.xml
new file mode 100644
index 0000000..402bb92
--- /dev/null
+++ b/java/res/xml-sw600dp/kbd_row4_apostrophe_dash.xml
@@ -0,0 +1,63 @@
+<?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.
+*/
+-->
+
+<merge
+    xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
+>
+    <switch>
+        <case
+            latin:mode="email"
+        >
+            <Key
+                latin:keyLabel="-" />
+        </case>
+        <case
+            latin:mode="url"
+        >
+            <Key
+                latin:keyLabel="/"
+                latin:keyLabelOption="hasUppercaseLetter"
+                latin:keyHintLabel=":"
+                latin:popupCharacters=":" />
+        </case>
+        <default>
+            <Key
+                latin:keyLabel="\'"
+                latin:keyLabelOption="hasUppercaseLetter"
+                latin:keyHintLabel="&quot;"
+                latin:popupCharacters="&quot;" />
+        </default>
+    </switch>
+    <switch>
+        <case
+            latin:mode="email"
+        >
+            <Key
+                latin:keyLabel="_" />
+        </case>
+        <default>
+            <Key
+                latin:keyLabel="-"
+                latin:keyLabelOption="hasUppercaseLetter"
+                latin:keyHintLabel="_"
+                latin:popupCharacters="_" />
+        </default>
+    </switch>
+</merge>
diff --git a/java/res/xml-sw600dp/kbd_rows_arabic.xml b/java/res/xml-sw600dp/kbd_rows_arabic.xml
index bc37d5a..f1a4755 100644
--- a/java/res/xml-sw600dp/kbd_rows_arabic.xml
+++ b/java/res/xml-sw600dp/kbd_rows_arabic.xml
@@ -128,7 +128,7 @@
         <Key
             latin:keyLabel="د" />
         <include
-            latin:keyboardLayout="@xml/kbd_row3_right" />
+            latin:keyboardLayout="@xml/kbd_row3_smiley" />
         </Row>
     <include latin:keyboardLayout="@xml/kbd_qwerty_row4" />
 </merge>
diff --git a/java/res/xml-sw600dp/kbd_rows_azerty.xml b/java/res/xml-sw600dp/kbd_rows_azerty.xml
index 7ba716b..698ef22 100644
--- a/java/res/xml-sw600dp/kbd_rows_azerty.xml
+++ b/java/res/xml-sw600dp/kbd_rows_azerty.xml
@@ -149,7 +149,7 @@
             </default>
         </switch>
         <include
-            latin:keyboardLayout="@xml/kbd_row3_right" />
+            latin:keyboardLayout="@xml/kbd_row3_smiley" />
     </Row>
     <include
         latin:keyboardLayout="@xml/kbd_qwerty_row4" />
diff --git a/java/res/xml-sw600dp/kbd_rows_hebrew.xml b/java/res/xml-sw600dp/kbd_rows_hebrew.xml
index a147537..8740915 100644
--- a/java/res/xml-sw600dp/kbd_rows_hebrew.xml
+++ b/java/res/xml-sw600dp/kbd_rows_hebrew.xml
@@ -24,13 +24,11 @@
     <include
         latin:keyboardLayout="@xml/kbd_key_styles" />
     <Row
-        latin:keyWidth="8.600%p"
+        latin:keyWidth="9.0%p"
         latin:rowEdgeFlags="top"
     >
-        <Key
-            latin:keyLabel="," />
-        <Key
-            latin:keyLabel="." />
+        <include
+            latin:keyboardLayout="@xml/kbd_row4_apostrophe_dash" />
         <Key
             latin:keyLabel="ק" />
         <Key
@@ -54,48 +52,78 @@
             latin:keyEdgeFlags="right" />
     </Row>
     <Row
-        latin:keyWidth="8.600%p"
+        latin:keyWidth="9.0%p"
     >
         <Key
             latin:keyLabel="ש"
-            latin:keyXPos="4.000%p" />
+            latin:keyXPos="4.500%p" />
         <Key
             latin:keyLabel="ד" />
         <Key
             latin:keyLabel="ג"
-            latin:popupCharacters="ג,ג׳" />
+            latin:popupCharacters="ג׳" />
         <Key
             latin:keyLabel="כ" />
         <Key
             latin:keyLabel="ע" />
         <Key
             latin:keyLabel="י"
-            latin:popupCharacters="י,ײַ" />
+            latin:popupCharacters="ײַ" />
         <Key
             latin:keyLabel="ח"
-            latin:popupCharacters="ח,ח׳" />
+            latin:popupCharacters="ח׳" />
         <Key
             latin:keyLabel="ל" />
         <Key
             latin:keyLabel="ך" />
         <Key
             latin:keyLabel="ף" />
-        <Key
-            latin:keyStyle="returnKeyStyle"
-            latin:keyXPos="-10.400%p"
-            latin:keyWidth="fillBoth"
-            latin:keyEdgeFlags="right" />
     </Row>
     <Row
-        latin:keyWidth="8.600%p"
+        latin:keyWidth="8.9%p"
     >
-        <Key
-            latin:keyStyle="shiftKeyStyle"
-            latin:keyWidth="10.000%p"
-            latin:keyEdgeFlags="left" />
+        <!-- kbd_row3_smiley -->
+        <switch>
+            <case
+                latin:mode="email"
+            >
+                <Key
+                    latin:keyLabel="\@"
+                    latin:keyWidth="10.0%p"
+                    latin:keyEdgeFlags="left" />
+            </case>
+            <case
+                latin:mode="url"
+            >
+                <Key
+                    latin:keyLabel="-"
+                    latin:keyLabelOption="hasUppercaseLetter"
+                    latin:keyHintLabel="_"
+                    latin:popupCharacters="_"
+                    latin:keyWidth="10.0%p"
+                    latin:keyEdgeFlags="left" />
+            </case>
+            <case
+                latin:imeAction="actionSearch"
+            >
+                <Key
+                    latin:keyLabel=":"
+                    latin:keyLabelOption="hasUppercaseLetter"
+                    latin:keyHintLabel="+"
+                    latin:popupCharacters="+"
+                    latin:keyWidth="10.0%p"
+                    latin:keyEdgeFlags="left" />
+            </case>
+            <default>
+                <Key
+                    latin:keyStyle="smileyKeyStyle"
+                    latin:keyWidth="10.0%p"
+                    latin:keyEdgeFlags="left" />
+            </default>
+        </switch>
         <Key
             latin:keyLabel="ז"
-            latin:popupCharacters="ז,ז׳" />
+            latin:popupCharacters="ז׳" />
         <Key
             latin:keyLabel="ס" />
         <Key
@@ -108,15 +136,19 @@
             latin:keyLabel="מ" />
         <Key
             latin:keyLabel="צ"
-            latin:popupCharacters="צ,צ׳" />
+            latin:popupCharacters="צ׳" />
         <Key
             latin:keyLabel="ת"
-            latin:popupCharacters="ת,ת׳" />
+            latin:popupCharacters="ת׳" />
         <Key
             latin:keyLabel="ץ"
-            latin:popupCharacters="ץ,ץ׳" />
-        <include
-            latin:keyboardLayout="@xml/kbd_row3_right" />
+            latin:popupCharacters="ץ׳" />
+        <Key
+            latin:keyStyle="returnKeyStyle"
+            latin:keyXPos="-10.400%p"
+            latin:keyWidth="fillBoth"
+            latin:keyEdgeFlags="right" />
     </Row>
-    <include latin:keyboardLayout="@xml/kbd_qwerty_row4" />
+    <include
+        latin:keyboardLayout="@xml/kbd_qwerty_row4" />
 </merge>
diff --git a/java/res/xml-sw600dp/kbd_rows_qwertz.xml b/java/res/xml-sw600dp/kbd_rows_qwertz.xml
index 7f85fe7..7ec895e 100644
--- a/java/res/xml-sw600dp/kbd_rows_qwertz.xml
+++ b/java/res/xml-sw600dp/kbd_rows_qwertz.xml
@@ -114,7 +114,7 @@
             </default>
         </switch>
         <include
-            latin:keyboardLayout="@xml/kbd_row3_right" />
+            latin:keyboardLayout="@xml/kbd_row3_smiley" />
     </Row>
     <include
         latin:keyboardLayout="@xml/kbd_qwerty_row4" />
diff --git a/java/res/xml-sw600dp/kbd_rows_russian.xml b/java/res/xml-sw600dp/kbd_rows_russian.xml
index 4c42d5e..4452989 100644
--- a/java/res/xml-sw600dp/kbd_rows_russian.xml
+++ b/java/res/xml-sw600dp/kbd_rows_russian.xml
@@ -139,7 +139,7 @@
             </default>
         </switch>
         <include
-            latin:keyboardLayout="@xml/kbd_row3_right" />
+            latin:keyboardLayout="@xml/kbd_row3_smiley" />
     </Row>
     <include
         latin:keyboardLayout="@xml/kbd_qwerty_row4" />
diff --git a/java/res/xml-sw600dp/kbd_rows_scandinavian.xml b/java/res/xml-sw600dp/kbd_rows_scandinavian.xml
index 645ef62..5ac2b36 100644
--- a/java/res/xml-sw600dp/kbd_rows_scandinavian.xml
+++ b/java/res/xml-sw600dp/kbd_rows_scandinavian.xml
@@ -134,32 +134,12 @@
             latin:popupCharacters="@string/alternates_for_n" />
         <Key
             latin:keyLabel="m" />
-        <switch>
-            <case
-                latin:mode="email"
-            >
-                <Key
-                    latin:keyLabel="," />
-                <Key
-                    latin:keyLabel="." />
-            </case>
-            <default>
-                <Key
-                    latin:keyLabel=","
-                    latin:keyLabelOption="hasUppercaseLetter"
-                    latin:keyHintLabel="!"
-                    latin:popupCharacters="!" />
-                <Key
-                    latin:keyLabel="."
-                    latin:keyLabelOption="hasUppercaseLetter"
-                    latin:keyHintLabel="\?"
-                    latin:popupCharacters="\?" />
-            </default>
-        </switch>
+        <include
+            latin:keyboardLayout="@xml/kbd_row3_comma_period" />
         <Spacer
             latin:keyWidth="4.35%p" />
         <include
-            latin:keyboardLayout="@xml/kbd_row3_right" />
+            latin:keyboardLayout="@xml/kbd_row3_smiley" />
     </Row>
     <include
         latin:keyboardLayout="@xml/kbd_qwerty_row4" />
diff --git a/java/res/xml-sw600dp/kbd_rows_serbian.xml b/java/res/xml-sw600dp/kbd_rows_serbian.xml
index 4dfe944..5d39fd4 100644
--- a/java/res/xml-sw600dp/kbd_rows_serbian.xml
+++ b/java/res/xml-sw600dp/kbd_rows_serbian.xml
@@ -114,30 +114,10 @@
             latin:keyLabel="ђ" />
         <Key
             latin:keyLabel="ж" />
-        <switch>
-            <case
-                latin:mode="email"
-            >
-                <Key
-                    latin:keyLabel="," />
-                <Key
-                    latin:keyLabel="." />
-            </case>
-            <default>
-                <Key
-                    latin:keyLabel=","
-                    latin:keyLabelOption="hasUppercaseLetter"
-                    latin:keyHintLabel="!"
-                    latin:popupCharacters="!" />
-                <Key
-                    latin:keyLabel="."
-                    latin:keyLabelOption="hasUppercaseLetter"
-                    latin:keyHintLabel="\?"
-                    latin:popupCharacters="\?" />
-            </default>
-        </switch>
         <include
-            latin:keyboardLayout="@xml/kbd_row3_right" />
+            latin:keyboardLayout="@xml/kbd_row3_comma_period" />
+        <include
+            latin:keyboardLayout="@xml/kbd_row3_smiley" />
     </Row>
     <include
         latin:keyboardLayout="@xml/kbd_qwerty_row4" />
diff --git a/java/res/xml-sw600dp/kbd_symbols.xml b/java/res/xml-sw600dp/kbd_symbols.xml
index fc2a148..19aeab6 100644
--- a/java/res/xml-sw600dp/kbd_symbols.xml
+++ b/java/res/xml-sw600dp/kbd_symbols.xml
@@ -158,16 +158,13 @@
             latin:keyStyle="spaceKeyStyle"
             latin:keyXPos="30.750%p"
             latin:keyWidth="39.750%p" />
-                <!-- Note: DroidSans doesn't have double-high-reversed-quotation
-                    '\u201f' glyph. -->
-                <!-- latin:popupCharacters="“,”,„,‟,«,»,‘,’,‚,‛" -->
+        <!-- Note: DroidSans doesn't have double-high-reversed-quotation '\u201f' glyph. -->
+        <!-- latin:popupCharacters="“,”,„,‟,«,»,‘,’,‚,‛" -->
         <Key
             latin:keyLabel="&quot;"
-            latin:popupCharacters="“,”,«,»,‘,’,‚,‛"
-            latin:keyWidth="9.750%p" />
+            latin:popupCharacters="“,”,«,»,‘,’,‚,‛" />
         <Key
-            latin:keyLabel="_"
-            latin:keyWidth="9.750%p" />
+            latin:keyLabel="_" />
         <Spacer
             latin:keyXPos="-10.00%p"
             latin:keyWidth="0%p" />