Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 41e8dc02 authored by Jim Miller's avatar Jim Miller
Browse files

Fix for 2137900: Be more conservative about poking the wakelock.

Updated after review: white space, check for null pattern listener.
parent b80fbd44
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -212,6 +212,12 @@ public class LockPatternView extends View {
         */
        void onPatternCleared();

        /**
         * The user extended the pattern currently being drawn by one cell.
         * @param pattern The pattern with newly added cell.
         */
        void onPatternCellAdded(List<Cell> pattern);

        /**
         * A pattern was detected from the user.
         * @param pattern The pattern.
@@ -447,6 +453,9 @@ public class LockPatternView extends View {
    private void addCellToPattern(Cell newCell) {
        mPatternDrawLookup[newCell.getRow()][newCell.getColumn()] = true;
        mPattern.add(newCell);
        if (mOnPatternListener != null) {
            mOnPatternListener.onPatternCellAdded(mPattern);
        }
    }

    // helper method to find which cell a point maps to