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.
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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];
|
||||
|
||||
Reference in New Issue
Block a user