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] -->
<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>
<!-- Title for input language selection screen -->
@ -204,12 +204,12 @@
<string name="prefs_enable_log">Enable user feedback</string>
<!-- 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>
<!-- 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>
<!-- 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>
<!-- Description for keyboard theme switcher -->
<!-- Title of the item to change the keyboard theme [CHAR LIMIT=20]-->
<string name="keyboard_layout">Keyboard Theme</string>
<!-- Description for Czech keyboard subtype [CHAR LIMIT=35] -->

View File

@ -132,9 +132,15 @@
latin:keyLabel="0" />
<Key
latin:keyLabel="#" />
<switch>
<case
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
the touch event on the area, "#" is intentionally not marked as a right edge key. -->
</Row>

View File

@ -140,9 +140,15 @@
latin:keyStyle="num0KeyStyle" />
<Key
latin:keyStyle="numPoundKeyStyle" />
<switch>
<case
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
the touch event on the area, "#" is intentionally not marked as a right edge key. -->
</Row>

View File

@ -152,9 +152,15 @@
latin:keyStyle="num0KeyStyle" />
<Key
latin:keyStyle="numPoundKeyStyle" />
<switch>
<case
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
the touch event on the area, "#" is intentionally not marked as a right edge key. -->
</Row>

View File

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

View File

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

View File

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

View File

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

View File

@ -183,7 +183,8 @@ public class Settings extends PreferenceActivity
public boolean onPreferenceClick(Preference pref) {
if (pref == mInputLanguageSelection) {
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";
} else {
action = "com.android.inputmethod.latin.INPUT_LANGUAGE_SELECTION";

View File

@ -16,8 +16,6 @@
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.voice.SettingsUtil;
import com.android.inputmethod.voice.VoiceIMEConnector;
@ -438,6 +436,7 @@ public class SubtypeSwitcher {
}
private void triggerVoiceIME() {
if (!mService.isInputViewShown()) return;
VoiceIMEConnector.getInstance().startListening(false,
KeyboardSwitcher.getInstance().getInputView().getWindowToken(), false);
}