Merge remote branch 'goog/master' into merge

Conflicts:
	java/src/com/android/inputmethod/latin/SubtypeSwitcher.java

Change-Id: I8a8c6d2c1f3bafb2f6e86a2381b88933b6ac3718
main
satok 2011-01-14 19:14:36 +09:00
commit 6014f1c92b
10 changed files with 58 additions and 27 deletions

View File

@ -186,7 +186,7 @@
<!-- On settings screen, voice input pop-up menu summary text to never show voice key [CHAR LIMIT=20] --> <!-- On settings screen, voice input pop-up menu summary text to never show voice key [CHAR LIMIT=20] -->
<string name="voice_input_modes_summary_off">Voice input is disabled</string> <string name="voice_input_modes_summary_off">Voice input is disabled</string>
<!-- Menu item for launching Input method picker --> <!-- Title of the dialog for selecting input methods. [CHAR LIMIT=20] -->
<string name="selectInputMethod">Select input method</string> <string name="selectInputMethod">Select input method</string>
<!-- Title for input language selection screen --> <!-- Title for input language selection screen -->
@ -204,12 +204,12 @@
<string name="prefs_enable_log">Enable user feedback</string> <string name="prefs_enable_log">Enable user feedback</string>
<!-- Description for enabling to send user statistics to Google --> <!-- Description for enabling to send user statistics to Google -->
<string name="prefs_description_log">Help improve this input method editor by automatically sending usage statistics and crash reports to Google.</string> <string name="prefs_description_log">Help improve this input method editor by automatically sending usage statistics and crash reports to Google.</string>
<!-- Preferences item for enabling to correct suggestions by touching words you have typed --> <!-- Preferences item for enabling to correct suggestions by touching words you have typed [CHAR LIMIT= 35] -->
<string name="prefs_enable_recorrection">Touch to correct words</string> <string name="prefs_enable_recorrection">Touch to correct words</string>
<!-- The summary for the preferences item for enabling to correct suggestions by touching words you have typed --> <!-- The summary for the preferences item for enabling to correct suggestions by touching words you have typed [CHAR LIMIT= 100] -->
<string name="prefs_enable_recorrection_summary">Touch entered words to correct them, only when suggestions are visible</string> <string name="prefs_enable_recorrection_summary">Touch entered words to correct them, only when suggestions are visible</string>
<!-- Description for keyboard theme switcher --> <!-- Title of the item to change the keyboard theme [CHAR LIMIT=20]-->
<string name="keyboard_layout">Keyboard Theme</string> <string name="keyboard_layout">Keyboard Theme</string>
<!-- Description for Czech keyboard subtype [CHAR LIMIT=35] --> <!-- Description for Czech keyboard subtype [CHAR LIMIT=35] -->

View File

@ -132,9 +132,15 @@
latin:keyLabel="0" /> latin:keyLabel="0" />
<Key <Key
latin:keyLabel="#" /> latin:keyLabel="#" />
<Key <switch>
latin:keyStyle="micKeyStyle" <case
latin:keyWidth="8.042%p" /> latin:voiceKeyEnabled="true"
>
<Key
latin:keyStyle="micKeyStyle"
latin:keyWidth="8.042%p" />
</case>
</switch>
<!-- There is an empty area bellow the "Enter" key and right of the "#" key. To ignore <!-- There is an empty area bellow the "Enter" key and right of the "#" key. To ignore
the touch event on the area, "#" is intentionally not marked as a right edge key. --> the touch event on the area, "#" is intentionally not marked as a right edge key. -->
</Row> </Row>

View File

@ -140,9 +140,15 @@
latin:keyStyle="num0KeyStyle" /> latin:keyStyle="num0KeyStyle" />
<Key <Key
latin:keyStyle="numPoundKeyStyle" /> latin:keyStyle="numPoundKeyStyle" />
<Key <switch>
latin:keyStyle="micKeyStyle" <case
latin:keyWidth="8.042%p" /> latin:voiceKeyEnabled="true"
>
<Key
latin:keyStyle="micKeyStyle"
latin:keyWidth="8.042%p" />
</case>
</switch>
<!-- There is an empty area bellow the "Enter" key and right of the "#" key. To ignore <!-- There is an empty area bellow the "Enter" key and right of the "#" key. To ignore
the touch event on the area, "#" is intentionally not marked as a right edge key. --> the touch event on the area, "#" is intentionally not marked as a right edge key. -->
</Row> </Row>

View File

@ -152,9 +152,15 @@
latin:keyStyle="num0KeyStyle" /> latin:keyStyle="num0KeyStyle" />
<Key <Key
latin:keyStyle="numPoundKeyStyle" /> latin:keyStyle="numPoundKeyStyle" />
<Key <switch>
latin:keyStyle="micKeyStyle" <case
latin:keyWidth="8.042%p" /> latin:voiceKeyEnabled="true"
>
<Key
latin:keyStyle="micKeyStyle"
latin:keyWidth="8.042%p" />
</case>
</switch>
<!-- There is an empty area bellow the "Enter" key and right of the "#" key. To ignore <!-- There is an empty area bellow the "Enter" key and right of the "#" key. To ignore
the touch event on the area, "#" is intentionally not marked as a right edge key. --> the touch event on the area, "#" is intentionally not marked as a right edge key. -->
</Row> </Row>

View File

@ -114,7 +114,13 @@
latin:popupCharacters="_" /> latin:popupCharacters="_" />
</default> </default>
</switch> </switch>
<Key <switch>
latin:keyStyle="micKeyStyle" /> <case
latin:voiceKeyEnabled="true"
>
<Key
latin:keyStyle="micKeyStyle" />
</case>
</switch>
</Row> </Row>
</merge> </merge>

View File

@ -162,7 +162,13 @@
latin:popupCharacters="“,”,«,»,˝" /> latin:popupCharacters="“,”,«,»,˝" />
<Key <Key
latin:keyLabel="_" /> latin:keyLabel="_" />
<Key <switch>
latin:keyStyle="micKeyStyle" /> <case
latin:voiceKeyEnabled="true"
>
<Key
latin:keyStyle="micKeyStyle" />
</case>
</switch>
</Row> </Row>
</Keyboard> </Keyboard>

View File

@ -139,7 +139,13 @@
<Key <Key
latin:keyStyle="spaceKeyStyle" latin:keyStyle="spaceKeyStyle"
latin:keyWidth="37.454%p" /> latin:keyWidth="37.454%p" />
<Key <switch>
latin:keyStyle="micKeyStyle" /> <case
latin:voiceKeyEnabled="true"
>
<Key
latin:keyStyle="micKeyStyle" />
</case>
</switch>
</Row> </Row>
</Keyboard> </Keyboard>

View File

@ -26,9 +26,6 @@ import com.android.inputmethod.keyboard.LatinKeyboardView;
import com.android.inputmethod.latin.Utils.RingCharBuffer; import com.android.inputmethod.latin.Utils.RingCharBuffer;
import com.android.inputmethod.voice.VoiceIMEConnector; import com.android.inputmethod.voice.VoiceIMEConnector;
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
import android.app.AlertDialog; import android.app.AlertDialog;
import android.content.BroadcastReceiver; import android.content.BroadcastReceiver;
import android.content.Context; import android.content.Context;
@ -38,7 +35,6 @@ import android.content.IntentFilter;
import android.content.SharedPreferences; import android.content.SharedPreferences;
import android.content.res.Configuration; import android.content.res.Configuration;
import android.content.res.Resources; import android.content.res.Resources;
import android.content.res.XmlResourceParser;
import android.inputmethodservice.InputMethodService; import android.inputmethodservice.InputMethodService;
import android.media.AudioManager; import android.media.AudioManager;
import android.os.Debug; import android.os.Debug;
@ -74,7 +70,6 @@ import android.widget.HorizontalScrollView;
import android.widget.LinearLayout; import android.widget.LinearLayout;
import java.io.FileDescriptor; import java.io.FileDescriptor;
import java.io.IOException;
import java.io.PrintWriter; import java.io.PrintWriter;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;

View File

@ -183,7 +183,8 @@ public class Settings extends PreferenceActivity
public boolean onPreferenceClick(Preference pref) { public boolean onPreferenceClick(Preference pref) {
if (pref == mInputLanguageSelection) { if (pref == mInputLanguageSelection) {
final String action; final String action;
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.HONEYCOMB) { if (android.os.Build.VERSION.SDK_INT
>= /* android.os.Build.VERSION_CODES.HONEYCOMB */ 10) {
action = "android.settings.INPUT_METHOD_AND_SUBTYPE_ENABLER"; action = "android.settings.INPUT_METHOD_AND_SUBTYPE_ENABLER";
} else { } else {
action = "com.android.inputmethod.latin.INPUT_LANGUAGE_SELECTION"; action = "com.android.inputmethod.latin.INPUT_LANGUAGE_SELECTION";

View File

@ -16,8 +16,6 @@
package com.android.inputmethod.latin; package com.android.inputmethod.latin;
import com.android.inputmethod.compat.InputMethodSubtype;
import com.android.inputmethod.keyboard.Keyboard;
import com.android.inputmethod.keyboard.KeyboardSwitcher; import com.android.inputmethod.keyboard.KeyboardSwitcher;
import com.android.inputmethod.voice.SettingsUtil; import com.android.inputmethod.voice.SettingsUtil;
import com.android.inputmethod.voice.VoiceIMEConnector; import com.android.inputmethod.voice.VoiceIMEConnector;
@ -438,6 +436,7 @@ public class SubtypeSwitcher {
} }
private void triggerVoiceIME() { private void triggerVoiceIME() {
if (!mService.isInputViewShown()) return;
VoiceIMEConnector.getInstance().startListening(false, VoiceIMEConnector.getInstance().startListening(false,
KeyboardSwitcher.getInstance().getInputView().getWindowToken(), false); KeyboardSwitcher.getInstance().getInputView().getWindowToken(), false);
} }