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

Commit 46286874 authored by Tadashi G. Takaoka's avatar Tadashi G. Takaoka
Browse files

Add guard to prevent possible IllegalStateException

Bug: 5227682
Change-Id: Iff93b425f52981b5e2c65e309b07bcfe4485eeb1
parent ed23cc7f
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -495,6 +495,9 @@ public class LatinKeyboardView extends KeyboardView implements PointerTracker.Ke

    @Override
    public boolean onTouchEvent(MotionEvent me) {
        if (getKeyboard() == null) {
            return false;
        }
        return mTouchScreenRegulator.onTouchEvent(me);
    }

+1 −1
Original line number Diff line number Diff line
@@ -283,7 +283,7 @@ public class PointerTracker {
        mListener.onCancelInput();
    }

    public void setKeyDetectorInner(KeyDetector keyDetector) {
    private void setKeyDetectorInner(KeyDetector keyDetector) {
        mKeyDetector = keyDetector;
        mKeyboard = keyDetector.getKeyboard();
        mKeys = mKeyboard.mKeys;