}
if (AccessibilityManager.getInstance(mContext).isEnabled()) {
String targetContentDescription = getTargetDescription(activeTarget);
- announceText(targetContentDescription);
+ announceForAccessibility(targetContentDescription);
}
}
}
String text = String.format(directionDescription, targetDescription);
utterance.append(text);
}
- if (utterance.length() > 0) {
- announceText(utterance.toString());
- }
}
- }
-
- private void announceText(String text) {
- setContentDescription(text);
- sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_FOCUSED);
- setContentDescription(null);
+ if (utterance.length() > 0) {
+ announceForAccessibility(utterance.toString());
+ }
}
private String getTargetDescription(int index) {
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:gravity="center"
+ android:focusable="true"
android:targetDrawables="@array/lockscreen_targets_with_camera"
android:targetDescriptions="@array/lockscreen_target_descriptions_with_camera"
android:layout_rowSpan="7"
android:layout_gravity="center_vertical|right"
android:gravity="center"
+ android:focusable="true"
android:targetDrawables="@array/lockscreen_targets_with_camera"
android:targetDescriptions="@array/lockscreen_target_descriptions_with_camera"
android:layout_height="match_parent"
android:layout_alignParentBottom="true"
android:gravity="top"
+ android:focusable="true"
android:targetDrawables="@array/lockscreen_targets_with_camera"
android:targetDescriptions="@array/lockscreen_target_descriptions_with_camera"
android:layout_height="match_parent"
android:layout_rowSpan="7"
android:gravity="left|center_vertical"
+ android:focusable="true"
android:targetDrawables="@array/lockscreen_targets_with_camera"
android:targetDescriptions="@array/lockscreen_target_descriptions_with_camera"