From 8bca94ad83f82682bc15df29dc25377fe43da17f Mon Sep 17 00:00:00 2001 From: Jeff Brown Date: Mon, 23 Apr 2012 16:12:32 -0700 Subject: More work on international keyboards. Changed the English US keymaps to implement a strict US key map with no additional ALT functions. Fixed a bug copying the alias in the InputDevice copy constructor. Added support for end of line comments in KCM and KL files. Added the German keyboard layout. Sorted the keys in the keyboard layout files by physical arrangement to make it easier to maintain them. Bug: 6110399 Change-Id: If44d83de5b98f2bf0016cbb8e12264387b286aaa --- libs/androidfw/KeyCharacterMap.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'libs/androidfw/KeyCharacterMap.cpp') diff --git a/libs/androidfw/KeyCharacterMap.cpp b/libs/androidfw/KeyCharacterMap.cpp index 2dc7507f352d..36cb6e11b210 100644 --- a/libs/androidfw/KeyCharacterMap.cpp +++ b/libs/androidfw/KeyCharacterMap.cpp @@ -713,8 +713,8 @@ status_t KeyCharacterMap::Parser::parse() { } mTokenizer->skipDelimiters(WHITESPACE); - if (!mTokenizer->isEol()) { - ALOGE("%s: Expected end of line, got '%s'.", + if (!mTokenizer->isEol() && mTokenizer->peekChar() != '#') { + ALOGE("%s: Expected end of line or trailing comment, got '%s'.", mTokenizer->getLocation().string(), mTokenizer->peekRemainderOfLine().string()); return BAD_VALUE; @@ -973,7 +973,7 @@ status_t KeyCharacterMap::Parser::parseKeyProperty() { } mTokenizer->skipDelimiters(WHITESPACE); - } while (!mTokenizer->isEol()); + } while (!mTokenizer->isEol() && mTokenizer->peekChar() != '#'); // Add the behavior. for (size_t i = 0; i < properties.size(); i++) { -- cgit v1.2.3-59-g8ed1b