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
cadc0f7d
Commit
cadc0f7d
authored
13 years ago
by
satok
Committed by
Android (Google) Code Review
13 years ago
Browse files
Options
Downloads
Plain Diff
Merge "Send touch event in usability study mode"
parents
f2b85d62
15d47939
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
java/src/com/android/inputmethod/keyboard/LatinKeyboardView.java
+34
-0
34 additions, 0 deletions
...c/com/android/inputmethod/keyboard/LatinKeyboardView.java
java/src/com/android/inputmethod/latin/LatinImeLogger.java
+1
-0
1 addition, 0 deletions
java/src/com/android/inputmethod/latin/LatinImeLogger.java
with
35 additions
and
0 deletions
java/src/com/android/inputmethod/keyboard/LatinKeyboardView.java
+
34
−
0
View file @
cadc0f7d
...
...
@@ -21,6 +21,7 @@ import android.content.pm.PackageManager;
import
android.content.res.Resources
;
import
android.graphics.Canvas
;
import
android.os.Message
;
import
android.text.TextUtils
;
import
android.util.AttributeSet
;
import
android.util.Log
;
import
android.view.GestureDetector
;
...
...
@@ -38,9 +39,11 @@ import com.android.inputmethod.deprecated.VoiceProxy;
import
com.android.inputmethod.keyboard.PointerTracker.DrawingProxy
;
import
com.android.inputmethod.keyboard.PointerTracker.TimerProxy
;
import
com.android.inputmethod.latin.LatinIME
;
import
com.android.inputmethod.latin.LatinImeLogger
;
import
com.android.inputmethod.latin.R
;
import
com.android.inputmethod.latin.StaticInnerHandlerWrapper
;
import
com.android.inputmethod.latin.Utils
;
import
com.android.inputmethod.latin.Utils.UsabilityStudyLogUtils
;
import
java.util.WeakHashMap
;
...
...
@@ -62,6 +65,9 @@ public class LatinKeyboardView extends KeyboardView implements PointerTracker.Ke
// Timing constants
private
final
int
mKeyRepeatInterval
;
// TODO: Kill process when the usability study mode was changed.
private
static
final
boolean
ENABLE_USABILITY_STUDY_LOG
=
LatinImeLogger
.
sUsabilityStudy
;
// Mini keyboard
private
PopupWindow
mMoreKeysWindow
;
private
MoreKeysPanel
mMoreKeysPanel
;
...
...
@@ -513,6 +519,30 @@ public class LatinKeyboardView extends KeyboardView implements PointerTracker.Ke
x
=
(
int
)
me
.
getX
(
index
);
y
=
(
int
)
me
.
getY
(
index
);
}
if
(
ENABLE_USABILITY_STUDY_LOG
)
{
final
String
eventTag
;
switch
(
action
)
{
case
MotionEvent
.
ACTION_UP
:
eventTag
=
"[Up]"
;
break
;
case
MotionEvent
.
ACTION_DOWN
:
eventTag
=
"[Down]"
;
break
;
case
MotionEvent
.
ACTION_POINTER_UP
:
eventTag
=
"[PointerUp]"
;
break
;
case
MotionEvent
.
ACTION_POINTER_DOWN
:
eventTag
=
"[PointerDown]"
;
break
;
default
:
eventTag
=
"[Action"
+
action
+
"]"
;
break
;
}
if
(!
TextUtils
.
isEmpty
(
eventTag
))
{
UsabilityStudyLogUtils
.
getInstance
().
write
(
eventTag
+
eventTime
+
","
+
id
+
","
+
x
+
","
+
y
+
"\t\t"
);
}
}
if
(
mKeyTimerHandler
.
isInKeyRepeat
())
{
final
PointerTracker
tracker
=
getPointerTracker
(
id
);
...
...
@@ -569,6 +599,10 @@ public class LatinKeyboardView extends KeyboardView implements PointerTracker.Ke
py
=
(
int
)
me
.
getY
(
i
);
}
tracker
.
onMoveEvent
(
px
,
py
,
eventTime
);
if
(
ENABLE_USABILITY_STUDY_LOG
)
{
UsabilityStudyLogUtils
.
getInstance
().
write
(
"[Move]"
+
eventTime
+
","
+
me
.
getPointerId
(
i
)
+
","
+
px
+
","
+
py
+
"\t\t"
);
}
}
}
else
{
getPointerTracker
(
id
).
processMotionEvent
(
action
,
x
,
y
,
eventTime
,
this
);
...
...
This diff is collapsed.
Click to expand it.
java/src/com/android/inputmethod/latin/LatinImeLogger.java
+
1
−
0
View file @
cadc0f7d
...
...
@@ -29,6 +29,7 @@ public class LatinImeLogger implements SharedPreferences.OnSharedPreferenceChang
public
static
boolean
sDBG
=
false
;
public
static
boolean
sVISUALDEBUG
=
false
;
public
static
boolean
sUsabilityStudy
=
false
;
@Override
public
void
onSharedPreferenceChanged
(
SharedPreferences
sharedPreferences
,
String
key
)
{
...
...
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