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
82b4374c
Commit
82b4374c
authored
12 years ago
by
Kurt Partridge
Committed by
Android (Google) Code Review
12 years ago
Browse files
Options
Downloads
Plain Diff
Merge "[Rlog48b] Better visual indicator for logging state"
parents
f1acb0e5
ce9e7f66
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
java/src/com/android/inputmethod/research/Replayer.java
+4
-0
4 additions, 0 deletions
java/src/com/android/inputmethod/research/Replayer.java
java/src/com/android/inputmethod/research/ResearchLogger.java
+19
-3
19 additions, 3 deletions
.../src/com/android/inputmethod/research/ResearchLogger.java
with
23 additions
and
3 deletions
java/src/com/android/inputmethod/research/Replayer.java
+
4
−
0
View file @
82b4374c
...
...
@@ -130,4 +130,8 @@ public class Replayer {
handler
.
postAtTime
(
callback
,
presentDoneTime
+
1
);
}
}
public
boolean
isReplaying
()
{
return
mIsReplaying
;
}
}
This diff is collapsed.
Click to expand it.
java/src/com/android/inputmethod/research/ResearchLogger.java
+
19
−
3
View file @
82b4374c
...
...
@@ -819,7 +819,8 @@ public class ResearchLogger implements SharedPreferences.OnSharedPreferenceChang
}
private
boolean
isAllowedToLog
()
{
return
!
mIsPasswordView
&&
!
mIsLoggingSuspended
&&
sIsLogging
&&
!
mInFeedbackDialog
;
return
!
mIsPasswordView
&&
!
mIsLoggingSuspended
&&
sIsLogging
&&
!
mInFeedbackDialog
&&
!
isReplaying
();
}
public
void
requestIndicatorRedraw
()
{
...
...
@@ -832,15 +833,30 @@ public class ResearchLogger implements SharedPreferences.OnSharedPreferenceChang
mMainKeyboardView
.
invalidateAllKeys
();
}
private
boolean
isReplaying
()
{
return
mReplayer
.
isReplaying
();
}
private
int
getIndicatorColor
()
{
if
(
isMakingUserRecording
())
{
return
Color
.
YELLOW
;
}
if
(
isReplaying
())
{
return
Color
.
GREEN
;
}
return
Color
.
RED
;
}
public
void
paintIndicator
(
KeyboardView
view
,
Paint
paint
,
Canvas
canvas
,
int
width
,
int
height
)
{
// TODO: Reimplement using a keyboard background image specific to the ResearchLogger
// and remove this method.
// The check for MainKeyboardView ensures that the indicator only decorates the main
// keyboard, not every keyboard.
if
(
IS_SHOWING_INDICATOR
&&
isAllowedToLog
()
&&
view
instanceof
MainKeyboardView
)
{
if
(
IS_SHOWING_INDICATOR
&&
(
isAllowedToLog
()
||
isReplaying
())
&&
view
instanceof
MainKeyboardView
)
{
final
int
savedColor
=
paint
.
getColor
();
paint
.
setColor
(
isMakingUserRecording
()
?
Color
.
YELLOW
:
Color
.
RED
);
paint
.
setColor
(
getIndicator
Color
()
);
final
Style
savedStyle
=
paint
.
getStyle
();
paint
.
setStyle
(
Style
.
STROKE
);
final
float
savedStrokeWidth
=
paint
.
getStrokeWidth
();
...
...
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