am 8ae3f619: 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.

Merge commit '8ae3f6190244156bc6e750680654057bd7816309'

* commit '8ae3f6190244156bc6e750680654057bd7816309':
  Fix another crash in Gestures, this one caused by the data file
This commit is contained in:
Marco Nelissen
2009-05-27 10:42:13 -07:00
committed by The Android Open Source Project
2 changed files with 8 additions and 0 deletions

View File

@@ -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) {

View File

@@ -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];