Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
LatinIME
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
keyboard
LatinIME
Commits
48814037
Commit
48814037
authored
11 years ago
by
Yohei Yukawa
Committed by
Android (Google) Code Review
11 years ago
Browse files
Options
Downloads
Plain Diff
Merge "Stop using deprecated InputMethodSubtype constructor"
parents
4f4fb5ef
6d431242
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/src/com/android/inputmethod/latin/InputTestsBase.java
+20
-11
20 additions, 11 deletions
tests/src/com/android/inputmethod/latin/InputTestsBase.java
with
20 additions
and
11 deletions
tests/src/com/android/inputmethod/latin/InputTestsBase.java
+
20
−
11
View file @
48814037
...
@@ -35,6 +35,7 @@ import android.view.inputmethod.InputMethodSubtype;
...
@@ -35,6 +35,7 @@ import android.view.inputmethod.InputMethodSubtype;
import
android.widget.EditText
;
import
android.widget.EditText
;
import
android.widget.FrameLayout
;
import
android.widget.FrameLayout
;
import
com.android.inputmethod.compat.InputMethodSubtypeCompatUtils
;
import
com.android.inputmethod.keyboard.Key
;
import
com.android.inputmethod.keyboard.Key
;
import
com.android.inputmethod.keyboard.Keyboard
;
import
com.android.inputmethod.keyboard.Keyboard
;
import
com.android.inputmethod.latin.SuggestedWords.SuggestedWordInfo
;
import
com.android.inputmethod.latin.SuggestedWords.SuggestedWordInfo
;
...
@@ -290,17 +291,25 @@ public class InputTestsBase extends ServiceTestCase<LatinIMEForTests> {
...
@@ -290,17 +291,25 @@ public class InputTestsBase extends ServiceTestCase<LatinIMEForTests> {
protected
void
changeLanguageWithoutWait
(
final
String
locale
)
{
protected
void
changeLanguageWithoutWait
(
final
String
locale
)
{
mEditText
.
mCurrentLocale
=
LocaleUtils
.
constructLocaleFromString
(
locale
);
mEditText
.
mCurrentLocale
=
LocaleUtils
.
constructLocaleFromString
(
locale
);
final
InputMethodSubtype
subtype
=
new
InputMethodSubtype
(
// TODO: this is forcing a QWERTY keyboard for all locales, which is wrong.
R
.
string
.
subtype_no_language_qwerty
,
R
.
drawable
.
ic_ime_switcher_dark
,
// It's still better than using whatever keyboard is the current one, but we
locale
,
"keyboard"
,
"KeyboardLayoutSet="
// should actually use the default keyboard for this locale.
// TODO: this is forcing a QWERTY keyboard for all locales, which is wrong.
// TODO: Use {@link InputMethodSubtype.InputMethodSubtypeBuilder} directly or indirectly so
// It's still better than using whatever keyboard is the current one, but we
// that {@link InputMethodSubtype#isAsciiCapable} can return the correct value.
// should actually use the default keyboard for this locale.
final
String
EXTRA_VALUE_FOR_TEST
=
+
SubtypeLocaleUtils
.
QWERTY
"KeyboardLayoutSet="
+
SubtypeLocaleUtils
.
QWERTY
+
","
+
Constants
.
Subtype
.
ExtraValue
.
ASCII_CAPABLE
+
","
+
Constants
.
Subtype
.
ExtraValue
.
ASCII_CAPABLE
+
","
+
Constants
.
Subtype
.
ExtraValue
.
ENABLED_WHEN_DEFAULT_IS_NOT_ASCII_CAPABLE
+
","
+
Constants
.
Subtype
.
ExtraValue
.
ENABLED_WHEN_DEFAULT_IS_NOT_ASCII_CAPABLE
+
","
+
Constants
.
Subtype
.
ExtraValue
.
EMOJI_CAPABLE
,
+
","
+
Constants
.
Subtype
.
ExtraValue
.
EMOJI_CAPABLE
;
false
/* isAuxiliary */
,
false
/* overridesImplicitlyEnabledSubtype */
);
final
InputMethodSubtype
subtype
=
InputMethodSubtypeCompatUtils
.
newInputMethodSubtype
(
R
.
string
.
subtype_no_language_qwerty
,
R
.
drawable
.
ic_ime_switcher_dark
,
locale
,
Constants
.
Subtype
.
KEYBOARD_MODE
,
EXTRA_VALUE_FOR_TEST
,
false
/* isAuxiliary */
,
false
/* overridesImplicitlyEnabledSubtype */
,
0
/* id */
);
SubtypeSwitcher
.
getInstance
().
forceSubtype
(
subtype
);
SubtypeSwitcher
.
getInstance
().
forceSubtype
(
subtype
);
mLatinIME
.
loadKeyboard
();
mLatinIME
.
loadKeyboard
();
runMessages
();
runMessages
();
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment