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

Commit 8ae3f619 authored by Marco Nelissen's avatar Marco Nelissen
Browse files

Fix another crash in Gestures, this one caused by the data file

having the wrong version. I made the loader print a message to
the log for this, and made the calling code disable gestures
for the listview instead of crashing.
parent f0e7e4a9
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -153,6 +153,10 @@ public class LetterRecognizer {
                case 1:
                    classifier = readV1(in);
                    break;
                default:
                    Log.d(LOG_TAG, "Couldn't load handwriting data: version " + version +
                            " not supported");
                    break;
            }

        } catch (IOException e) {
+4 −0
Original line number Diff line number Diff line
@@ -3864,6 +3864,10 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te
        GesturesProcessor() {
            mRecognizer = LetterRecognizer.getLetterRecognizer(getContext(),
                    LetterRecognizer.RECOGNIZER_LATIN_LOWERCASE);
            if (mRecognizer == null) {
                dismissGesturesPopup();
                mGestures = GESTURES_NONE;
            }
            if (mGestures == GESTURES_FILTER) {
                mKeyMap = KeyCharacterMap.load(KeyCharacterMap.BUILT_IN_KEYBOARD);
                mHolder = new char[1];