am f61dcf23: Merge change I718e813f into eclair

Merge commit 'f61dcf234e056cc3452341f1e505e77f55cc0bce' into eclair-mr2

* commit 'f61dcf234e056cc3452341f1e505e77f55cc0bce':
  Fix for #2244624 : Keyboard freezes up sometimes
diff --git a/dictionary/src/dictionary.cpp b/dictionary/src/dictionary.cpp
index cc711f4..306aff5 100644
--- a/dictionary/src/dictionary.cpp
+++ b/dictionary/src/dictionary.cpp
@@ -51,6 +51,7 @@
 int Dictionary::getSuggestions(int *codes, int codesSize, unsigned short *outWords, int *frequencies,
         int maxWordLength, int maxWords, int maxAlternatives, int skipPos)
 {
+    int suggWords;
     mFrequencies = frequencies;
     mOutputChars = outWords;
     mInputCodes = codes;
@@ -58,14 +59,16 @@
     mMaxAlternatives = maxAlternatives;
     mMaxWordLength = maxWordLength;
     mMaxWords = maxWords;
-    mWords = 0;
     mSkipPos = skipPos;
     mMaxEditDistance = mInputLength < 5 ? 2 : mInputLength / 2;
 
     getWordsRec(0, 0, mInputLength * 3, false, 1, 0, 0);
 
-    if (DEBUG_DICT) LOGI("Returning %d words", mWords);
-    return mWords;
+    // Get the word count
+    suggWords = 0;
+    while (suggWords < mMaxWords && mFrequencies[suggWords] > 0) suggWords++;
+    if (DEBUG_DICT) LOGI("Returning %d words", suggWords);
+    return suggWords;
 }
 
 unsigned short
@@ -138,8 +141,6 @@
             *dest++ = *word++;
         }
         *dest = 0; // NULL terminate
-        // Update the word count
-        if (insertAt + 1 > mWords) mWords = insertAt + 1;
         if (DEBUG_DICT) LOGI("Added word at %d\n", insertAt);
         return true;
     }
diff --git a/dictionary/src/dictionary.h b/dictionary/src/dictionary.h
index 8f195ca..a12c035 100644
--- a/dictionary/src/dictionary.h
+++ b/dictionary/src/dictionary.h
@@ -60,7 +60,6 @@
     int *mFrequencies;
     int mMaxWords;
     int mMaxWordLength;
-    int mWords;
     unsigned short *mOutputChars;
     int *mInputCodes;
     int mInputLength;
diff --git a/res/values/strings.xml b/res/values/strings.xml
index ec9a8b7..753d0dc 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -126,7 +126,10 @@
     <!-- Accented forms of "y" -->
     <string name="alternates_for_y">ýÿ</string>
 
-    <!-- Label to display on the "i" key -->
+    <!-- Label to display on the lower "i" key.
+         Usually you don't need to modify this value, but if your locale requires some variant
+         for this character (e.g. \\u131 "Latin Small Letter Dotoless i"), please modify this
+         value. -->
     <string name="key_i">i</string>
  
     <!-- Tip to long press on keys -->
diff --git a/res/xml/kbd_symbols.xml b/res/xml/kbd_symbols.xml
index f3b8833..48afd89 100755
--- a/res/xml/kbd_symbols.xml
+++ b/res/xml/kbd_symbols.xml
@@ -73,7 +73,7 @@
         <Key android:codes="38" android:keyLabel="&amp;"/>
         <Key android:codes="42" android:keyLabel="*"
                 android:popupKeyboard="@xml/kbd_popup_template"
-                android:popupCharacters="†‡"
+                android:popupCharacters="†‡⁂★"
         />
         <Key android:codes="45" android:keyLabel="-"
                 android:popupKeyboard="@xml/kbd_popup_template"
@@ -105,7 +105,10 @@
                 android:popupKeyboard="@xml/kbd_popup_template"
                 android:popupCharacters="“”«»˝"
         />
-        <Key android:codes="39" android:keyLabel="\'"/>
+        <Key android:codes="39" android:keyLabel="\'"
+                android:popupKeyboard="@xml/kbd_popup_template"
+                android:popupCharacters="‘’"
+        />
         <Key android:codes="58" android:keyLabel=":"/>
         <Key android:codes="59" android:keyLabel=";"/>
         <Key android:codes="47" android:keyLabel="/" />
@@ -136,4 +139,4 @@
                 android:iconPreview="@drawable/sym_keyboard_feedback_return"
                 />
     </Row>
-</Keyboard>
\ No newline at end of file
+</Keyboard>
diff --git a/res/xml/kbd_symbols_shift.xml b/res/xml/kbd_symbols_shift.xml
index 56428a3..d83594a 100755
--- a/res/xml/kbd_symbols_shift.xml
+++ b/res/xml/kbd_symbols_shift.xml
@@ -29,7 +29,10 @@
         <Key android:keyLabel="~" android:keyEdgeFlags="left"/>
         <Key android:keyLabel="`"/>
         <Key android:keyLabel="|"/>
-        <Key android:keyLabel="•"/>
+        <Key android:keyLabel="•"
+                android:popupKeyboard="@xml/kbd_popup_template"
+                android:popupCharacters="♪♥♠♦♣"
+        />
         <Key android:keyLabel="√"/>
         <Key android:keyLabel="π"/>
         <Key android:keyLabel="÷"/>
@@ -44,7 +47,10 @@
         <Key android:keyLabel="¢"/>
         <Key android:keyLabel="€"/>
         <Key android:keyLabel="°"/>
-        <Key android:keyLabel="^"/>
+        <Key android:keyLabel="^"
+                android:popupKeyboard="@xml/kbd_popup_template"
+                android:popupCharacters="↑↓←→"
+        />
         <Key android:keyLabel="_"/>
         <Key android:keyLabel="="
                 android:popupKeyboard="@xml/kbd_popup_template"
@@ -61,7 +67,10 @@
         <Key android:keyLabel="™"/>
         <Key android:keyLabel="®"/>
         <Key android:keyLabel="©"/>
-        <Key android:keyLabel="¶"/>
+        <Key android:keyLabel="¶"
+                android:popupKeyboard="@xml/kbd_popup_template"
+                android:popupCharacters="§"
+        />
         <Key android:keyLabel="\\"/>
         <Key android:keyLabel="&lt;" 
                 android:popupKeyboard="@xml/kbd_popup_template"