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
7c23ad92
Commit
7c23ad92
authored
12 years ago
by
Charles Chen
Committed by
Android (Google) Code Review
12 years ago
Browse files
Options
Downloads
Plain Diff
Merge "Use key index as virtual view ID." into jb-dev
parents
6cb23a49
b4c41fa8
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/accessibility/AccessibilityEntityProvider.java
+6
-3
6 additions, 3 deletions
...nputmethod/accessibility/AccessibilityEntityProvider.java
with
6 additions
and
3 deletions
java/src/com/android/inputmethod/accessibility/AccessibilityEntityProvider.java
+
6
−
3
View file @
7c23ad92
...
...
@@ -211,14 +211,17 @@ public class AccessibilityEntityProvider extends AccessibilityNodeProviderCompat
}
/**
* Generates a virtual view identifier for the specified key.
* Generates a virtual view identifier for the given key. Returned
* identifiers are valid until the next global layout state change.
*
* @param key The key to identify.
* @return A virtual view identifier.
*/
private
static
int
generateVirtualViewIdForKey
(
Key
key
)
{
// The key code is unique within an instance of a Keyboard.
return
key
.
mCode
;
// The key x- and y-coordinates are stable between layout changes.
// Generate an identifier by bit-shifting the x-coordinate to the
// left-half of the integer and OR'ing with the y-coordinate.
return
((
0xFFFF
&
key
.
mX
)
<<
(
Integer
.
SIZE
/
2
))
|
(
0xFFFF
&
key
.
mY
);
}
private
final
OnGlobalLayoutListener
mGlobalLayoutListener
=
new
OnGlobalLayoutListener
()
{
...
...
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