Skip to content

Commit 1189311

Browse files
committed
LockPatternView: Fix a11y+BiometricPrompt related OOB exception
Fixes: https://gitlab.com/LineageOS/issues/android/-/issues/4007 Change-Id: Ifcae0a46430915c93b9e65ad968ca7e90504a9fb
1 parent 3b46ef1 commit 1189311

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

core/java/com/android/internal/widget/LockPatternView.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1587,7 +1587,9 @@ private boolean isClickable(int virtualViewId) {
15871587
if (virtualViewId != ExploreByTouchHelper.INVALID_ID) {
15881588
int row = (virtualViewId - VIRTUAL_BASE_VIEW_ID) / 3;
15891589
int col = (virtualViewId - VIRTUAL_BASE_VIEW_ID) % 3;
1590-
return !mPatternDrawLookup[row][col];
1590+
if (row < 3) {
1591+
return !mPatternDrawLookup[row][col];
1592+
}
15911593
}
15921594
return false;
15931595
}
@@ -1633,7 +1635,6 @@ private Rect getBoundsForVirtualView(int virtualViewId) {
16331635
final Rect bounds = mTempRect;
16341636
final int row = ordinal / 3;
16351637
final int col = ordinal % 3;
1636-
final CellState cell = mCellStates[row][col];
16371638
float centerX = getCenterXForColumn(col);
16381639
float centerY = getCenterYForRow(row);
16391640
float cellheight = mSquareHeight * mHitFactor * 0.5f;

0 commit comments

Comments
 (0)