Set view properties for Key node infos.

Bug: 6298716
Change-Id: Iae0616f0095d32e0ca61dcb55f2f84744e91f60e
main
alanv 2012-04-05 14:56:57 -07:00
parent af7d86c5b8
commit 26c80a1b9a
1 changed files with 4 additions and 0 deletions

View File

@ -95,6 +95,7 @@ public class AccessibilityEntityProvider extends AccessibilityNodeProviderCompat
event.setPackageName(mKeyboardView.getContext().getPackageName()); event.setPackageName(mKeyboardView.getContext().getPackageName());
event.setClassName(key.getClass().getName()); event.setClassName(key.getClass().getName());
event.getText().add(keyDescription); event.getText().add(keyDescription);
event.setEnabled(true);
final AccessibilityRecordCompat record = new AccessibilityRecordCompat(event); final AccessibilityRecordCompat record = new AccessibilityRecordCompat(event);
record.setSource(mKeyboardView, virtualViewId); record.setSource(mKeyboardView, virtualViewId);
@ -171,6 +172,9 @@ public class AccessibilityEntityProvider extends AccessibilityNodeProviderCompat
info.setSource(mKeyboardView, virtualViewId); info.setSource(mKeyboardView, virtualViewId);
info.setBoundsInScreen(boundsInScreen); info.setBoundsInScreen(boundsInScreen);
info.setText(keyDescription); info.setText(keyDescription);
info.setClickable(true);
info.setEnabled(true);
info.setLongClickable(true);
} }
return info; return info;