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
23f7fb03
Commit
23f7fb03
authored
14 years ago
by
Tadashi G. Takaoka
Committed by
Android (Google) Code Review
14 years ago
Browse files
Options
Downloads
Plain Diff
Merge "Disable invoking VoiceIME using swipe right action" into gingerbread
parents
b75dee4b
abd7bba9
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
java/src/com/android/inputmethod/latin/LatinIME.java
+11
-31
11 additions, 31 deletions
java/src/com/android/inputmethod/latin/LatinIME.java
with
11 additions
and
31 deletions
java/src/com/android/inputmethod/latin/LatinIME.java
+
11
−
31
View file @
23f7fb03
...
...
@@ -133,12 +133,7 @@ public class LatinIME extends InputMethodService
private
static
final
int
MSG_START_TUTORIAL
=
1
;
private
static
final
int
MSG_UPDATE_SHIFT_STATE
=
2
;
private
static
final
int
MSG_VOICE_RESULTS
=
3
;
private
static
final
int
MSG_START_LISTENING_AFTER_SWIPE
=
4
;
private
static
final
int
MSG_UPDATE_OLD_SUGGESTIONS
=
5
;
// If we detect a swipe gesture within N ms of typing, then swipe is
// ignored, since it may in fact be two key presses in quick succession.
private
static
final
long
MIN_MILLIS_AFTER_TYPING_BEFORE_SWIPE
=
1000
;
private
static
final
int
MSG_UPDATE_OLD_SUGGESTIONS
=
4
;
// How many continuous deletes at which to start deleting at a higher speed.
private
static
final
int
DELETE_ACCELERATE_AT
=
20
;
...
...
@@ -245,7 +240,6 @@ public class LatinIME extends InputMethodService
private
String
mSuggestPuncs
;
private
VoiceInput
mVoiceInput
;
private
VoiceResults
mVoiceResults
=
new
VoiceResults
();
private
long
mSwipeTriggerTimeMillis
;
private
boolean
mConfigurationChanging
;
// Keeps track of most recently inserted text (multi-character key) for reverting
...
...
@@ -339,10 +333,6 @@ public class LatinIME extends InputMethodService
case
MSG_VOICE_RESULTS:
handleVoiceResults
();
break
;
case
MSG_START_LISTENING_AFTER_SWIPE:
if
(
mLastKeyTime
<
mSwipeTriggerTimeMillis
)
{
startListening
(
true
);
}
}
}
};
...
...
@@ -2187,21 +2177,6 @@ public class LatinIME extends InputMethodService
return
mWord
.
isCapitalized
();
}
public
void
swipeRight
()
{
if
(
userHasNotTypedRecently
()
&&
VOICE_INSTALLED
&&
mEnableVoice
&&
fieldCanDoVoice
(
makeFieldContext
()))
{
startListening
(
true
/* was a swipe */
);
}
if
(
LatinKeyboardView
.
DEBUG_AUTO_PLAY
)
{
ClipboardManager
cm
=
((
ClipboardManager
)
getSystemService
(
CLIPBOARD_SERVICE
));
CharSequence
text
=
cm
.
getText
();
if
(!
TextUtils
.
isEmpty
(
text
))
{
mKeyboardSwitcher
.
getInputView
().
startPlaying
(
text
.
toString
());
}
}
}
private
void
toggleLanguage
(
boolean
reset
,
boolean
next
)
{
if
(
reset
)
{
mLanguageSwitcher
.
reset
();
...
...
@@ -2233,6 +2208,16 @@ public class LatinIME extends InputMethodService
}
}
public
void
swipeRight
()
{
if
(
LatinKeyboardView
.
DEBUG_AUTO_PLAY
)
{
ClipboardManager
cm
=
((
ClipboardManager
)
getSystemService
(
CLIPBOARD_SERVICE
));
CharSequence
text
=
cm
.
getText
();
if
(!
TextUtils
.
isEmpty
(
text
))
{
mKeyboardSwitcher
.
getInputView
().
startPlaying
(
text
.
toString
());
}
}
}
public
void
swipeLeft
()
{
}
...
...
@@ -2315,11 +2300,6 @@ public class LatinIME extends InputMethodService
}
}
private
boolean
userHasNotTypedRecently
()
{
return
(
SystemClock
.
uptimeMillis
()
-
mLastKeyTime
)
>
MIN_MILLIS_AFTER_TYPING_BEFORE_SWIPE
;
}
private
void
playKeyClick
(
int
primaryCode
)
{
// if mAudioManager is null, we don't have the ringer state yet
// mAudioManager will be set by updateRingerMode
...
...
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