am 26884df7: Merge "Send LockPatternView accessibility announcements before callbacks" into jb-mr1-dev
* commit '26884df75c69587561e397ec4da6b5b463e37fe9': Send LockPatternView accessibility announcements before callbacks
This commit is contained in:
@@ -375,31 +375,31 @@ public class LockPatternView extends View {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void notifyCellAdded() {
|
private void notifyCellAdded() {
|
||||||
|
sendAccessEvent(R.string.lockscreen_access_pattern_cell_added);
|
||||||
if (mOnPatternListener != null) {
|
if (mOnPatternListener != null) {
|
||||||
mOnPatternListener.onPatternCellAdded(mPattern);
|
mOnPatternListener.onPatternCellAdded(mPattern);
|
||||||
}
|
}
|
||||||
sendAccessEvent(R.string.lockscreen_access_pattern_cell_added);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void notifyPatternStarted() {
|
private void notifyPatternStarted() {
|
||||||
|
sendAccessEvent(R.string.lockscreen_access_pattern_start);
|
||||||
if (mOnPatternListener != null) {
|
if (mOnPatternListener != null) {
|
||||||
mOnPatternListener.onPatternStart();
|
mOnPatternListener.onPatternStart();
|
||||||
}
|
}
|
||||||
sendAccessEvent(R.string.lockscreen_access_pattern_start);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void notifyPatternDetected() {
|
private void notifyPatternDetected() {
|
||||||
|
sendAccessEvent(R.string.lockscreen_access_pattern_detected);
|
||||||
if (mOnPatternListener != null) {
|
if (mOnPatternListener != null) {
|
||||||
mOnPatternListener.onPatternDetected(mPattern);
|
mOnPatternListener.onPatternDetected(mPattern);
|
||||||
}
|
}
|
||||||
sendAccessEvent(R.string.lockscreen_access_pattern_detected);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void notifyPatternCleared() {
|
private void notifyPatternCleared() {
|
||||||
|
sendAccessEvent(R.string.lockscreen_access_pattern_cleared);
|
||||||
if (mOnPatternListener != null) {
|
if (mOnPatternListener != null) {
|
||||||
mOnPatternListener.onPatternCleared();
|
mOnPatternListener.onPatternCleared();
|
||||||
}
|
}
|
||||||
sendAccessEvent(R.string.lockscreen_access_pattern_cleared);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -799,9 +799,7 @@ public class LockPatternView extends View {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void sendAccessEvent(int resId) {
|
private void sendAccessEvent(int resId) {
|
||||||
setContentDescription(mContext.getString(resId));
|
announceForAccessibility(mContext.getString(resId));
|
||||||
sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_SELECTED);
|
|
||||||
setContentDescription(null);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void handleActionUp(MotionEvent event) {
|
private void handleActionUp(MotionEvent event) {
|
||||||
|
|||||||
Reference in New Issue
Block a user