am 3b161b25: Parse the shortcuts list file. (B2)

* commit '3b161b2526ee7f867c887462dc826d2edc118f3d':
  Parse the shortcuts list file. (B2)
This commit is contained in:
Jean Chalard 2012-01-05 00:29:35 -08:00 committed by Android Git Automerger
commit 8dc3a544bd

View file

@ -180,6 +180,26 @@ public class XmlDictInputOutput {
}
}
/**
* SAX handler for a shortcut XML file.
*/
static private class ShortcutHandler extends AssociativeListHandler {
private final static String ENTRY_TAG = "entry";
private final static String ENTRY_ATTRIBUTE = "shortcut";
private final static String TARGET_TAG = "target";
private final static String REPLACEMENT_ATTRIBUTE = "replacement";
private final static String TARGET_PRIORITY_ATTRIBUTE = "priority";
public ShortcutHandler() {
super(ENTRY_TAG, ENTRY_ATTRIBUTE, TARGET_TAG, REPLACEMENT_ATTRIBUTE,
TARGET_PRIORITY_ATTRIBUTE);
}
public HashMap<String, ArrayList<WeightedString>> getShortcutMap() {
return getAssocMap();
}
}
/**
* Reads a dictionary from an XML file.
*