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
b0c5ddb9
Commit
b0c5ddb9
authored
11 years ago
by
Satoshi Kataoka
Committed by
Android (Google) Code Review
11 years ago
Browse files
Options
Downloads
Plain Diff
Merge "Stop vibration while repeating delete key in emoji view"
parents
a6e2ec53
d0df68e6
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
java/src/com/android/inputmethod/keyboard/EmojiKeyboardView.java
+6
-4
6 additions, 4 deletions
...c/com/android/inputmethod/keyboard/EmojiKeyboardView.java
with
6 additions
and
4 deletions
java/src/com/android/inputmethod/keyboard/EmojiKeyboardView.java
+
6
−
4
View file @
b0c5ddb9
...
@@ -718,12 +718,14 @@ public final class EmojiKeyboardView extends LinearLayout implements OnTabChange
...
@@ -718,12 +718,14 @@ public final class EmojiKeyboardView extends LinearLayout implements OnTabChange
@Override
@Override
public
void
run
()
{
public
void
run
()
{
int
repeatCount
=
1
;
int
timeCount
=
0
;
int
timeCount
=
0
;
while
(
timeCount
<
MAX_REPEAT_COUNT_TIME
&&
!
mAborted
)
{
while
(
timeCount
<
MAX_REPEAT_COUNT_TIME
&&
!
mAborted
)
{
if
(
timeCount
>
mKeyRepeatStartTimeout
)
{
if
(
timeCount
>
mKeyRepeatStartTimeout
)
{
pressDelete
();
pressDelete
(
repeatCount
);
}
}
timeCount
+=
mKeyRepeatInterval
;
timeCount
+=
mKeyRepeatInterval
;
++
repeatCount
;
try
{
try
{
Thread
.
sleep
(
mKeyRepeatInterval
);
Thread
.
sleep
(
mKeyRepeatInterval
);
}
catch
(
InterruptedException
e
)
{
}
catch
(
InterruptedException
e
)
{
...
@@ -736,9 +738,9 @@ public final class EmojiKeyboardView extends LinearLayout implements OnTabChange
...
@@ -736,9 +738,9 @@ public final class EmojiKeyboardView extends LinearLayout implements OnTabChange
}
}
}
}
public
void
pressDelete
()
{
public
void
pressDelete
(
int
repeatCount
)
{
mKeyboardActionListener
.
onPressKey
(
mKeyboardActionListener
.
onPressKey
(
Constants
.
CODE_DELETE
,
0
/*
repeatCount
*/
,
true
/* isSinglePointer */
);
Constants
.
CODE_DELETE
,
repeatCount
,
true
/* isSinglePointer */
);
mKeyboardActionListener
.
onCodeInput
(
mKeyboardActionListener
.
onCodeInput
(
Constants
.
CODE_DELETE
,
NOT_A_COORDINATE
,
NOT_A_COORDINATE
);
Constants
.
CODE_DELETE
,
NOT_A_COORDINATE
,
NOT_A_COORDINATE
);
mKeyboardActionListener
.
onReleaseKey
(
mKeyboardActionListener
.
onReleaseKey
(
...
@@ -754,7 +756,7 @@ public final class EmojiKeyboardView extends LinearLayout implements OnTabChange
...
@@ -754,7 +756,7 @@ public final class EmojiKeyboardView extends LinearLayout implements OnTabChange
switch
(
event
.
getAction
())
{
switch
(
event
.
getAction
())
{
case
MotionEvent
.
ACTION_DOWN
:
case
MotionEvent
.
ACTION_DOWN
:
v
.
setBackgroundColor
(
mDeleteKeyPressedBackgroundColor
);
v
.
setBackgroundColor
(
mDeleteKeyPressedBackgroundColor
);
pressDelete
();
pressDelete
(
0
/* repeatCount */
);
startRepeat
();
startRepeat
();
return
true
;
return
true
;
case
MotionEvent
.
ACTION_UP
:
case
MotionEvent
.
ACTION_UP
:
...
...
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