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
559616fb
Commit
559616fb
authored
12 years ago
by
Alan Viverette
Browse files
Options
Downloads
Patches
Plain Diff
Prevent keyboard A11y proxy from referencing a null keyboard view.
Bug: 8402674 Change-Id: I507cdabccdabb3fd7aebc071c93eb6d4dcb9635d
parent
1061bfdb
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/accessibility/AccessibleKeyboardViewProxy.java
+25
-0
25 additions, 0 deletions
...nputmethod/accessibility/AccessibleKeyboardViewProxy.java
with
25 additions
and
0 deletions
java/src/com/android/inputmethod/accessibility/AccessibleKeyboardViewProxy.java
+
25
−
0
View file @
559616fb
...
...
@@ -110,6 +110,10 @@ public final class AccessibleKeyboardViewProxy extends AccessibilityDelegateComp
* enabled.
*/
public
void
setKeyboard
()
{
if
(
mView
==
null
)
{
return
;
}
if
(
mAccessibilityNodeProvider
!=
null
)
{
mAccessibilityNodeProvider
.
setKeyboard
();
}
...
...
@@ -125,6 +129,10 @@ public final class AccessibleKeyboardViewProxy extends AccessibilityDelegateComp
* Called when the keyboard is hidden and accessibility is enabled.
*/
public
void
onHideWindow
()
{
if
(
mView
==
null
)
{
return
;
}
announceKeyboardHidden
();
}
...
...
@@ -179,10 +187,15 @@ public final class AccessibleKeyboardViewProxy extends AccessibilityDelegateComp
* version 15 (Build.VERSION_CODES.ICE_CREAM_SANDWICH_MR1) and higher to obtain the virtual
* node hierarchy provider.
*
* @param host The host view for the provider.
* @return The accessibility node provider for the current keyboard.
*/
@Override
public
AccessibilityEntityProvider
getAccessibilityNodeProvider
(
final
View
host
)
{
if
(
mView
==
null
)
{
return
null
;
}
return
getAccessibilityNodeProvider
();
}
...
...
@@ -206,6 +219,10 @@ public final class AccessibleKeyboardViewProxy extends AccessibilityDelegateComp
* @return {@code true} if the event is handled
*/
public
boolean
dispatchHoverEvent
(
final
MotionEvent
event
,
final
PointerTracker
tracker
)
{
if
(
mView
==
null
)
{
return
false
;
}
final
int
x
=
(
int
)
event
.
getX
();
final
int
y
=
(
int
)
event
.
getY
();
final
Key
previousKey
=
mLastHoverKey
;
...
...
@@ -326,6 +343,10 @@ public final class AccessibleKeyboardViewProxy extends AccessibilityDelegateComp
* Notifies the user of changes in the keyboard shift state.
*/
public
void
notifyShiftState
()
{
if
(
mView
==
null
)
{
return
;
}
final
Keyboard
keyboard
=
mView
.
getKeyboard
();
final
KeyboardId
keyboardId
=
keyboard
.
mId
;
final
int
elementId
=
keyboardId
.
mElementId
;
...
...
@@ -352,6 +373,10 @@ public final class AccessibleKeyboardViewProxy extends AccessibilityDelegateComp
* Notifies the user of changes in the keyboard symbols state.
*/
public
void
notifySymbolsState
()
{
if
(
mView
==
null
)
{
return
;
}
final
Keyboard
keyboard
=
mView
.
getKeyboard
();
final
Context
context
=
mView
.
getContext
();
final
KeyboardId
keyboardId
=
keyboard
.
mId
;
...
...
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