diff options
author | Jeff Brown <jeffbrown@google.com> | 2012-04-17 11:42:25 -0700 |
---|---|---|
committer | Jeff Brown <jeffbrown@google.com> | 2012-04-17 11:42:25 -0700 |
commit | a3bc565882dd3984e995363642b1295fe3d24d10 (patch) | |
tree | e2894e12724075687867545d988c0eae4769b8e5 /core/java/com | |
parent | 4481d9c10ceaf3b886fb5cab1d20941932af5b0f (diff) | |
download | frameworks_base-a3bc565882dd3984e995363642b1295fe3d24d10.zip frameworks_base-a3bc565882dd3984e995363642b1295fe3d24d10.tar.gz frameworks_base-a3bc565882dd3984e995363642b1295fe3d24d10.tar.bz2 |
Add persistence for selected keyboard layout.
Bug: 6110399
Change-Id: I99544bf05e9755385bee478b5f047ccec2e5cae3
Diffstat (limited to 'core/java/com')
-rw-r--r-- | core/java/com/android/internal/util/XmlUtils.java | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/core/java/com/android/internal/util/XmlUtils.java b/core/java/com/android/internal/util/XmlUtils.java index e00a853..6a09fe0 100644 --- a/core/java/com/android/internal/util/XmlUtils.java +++ b/core/java/com/android/internal/util/XmlUtils.java @@ -888,4 +888,19 @@ public class XmlUtils ; } } + + public static boolean nextElementWithin(XmlPullParser parser, int outerDepth) + throws IOException, XmlPullParserException { + for (;;) { + int type = parser.next(); + if (type == XmlPullParser.END_DOCUMENT + || (type == XmlPullParser.END_TAG && parser.getDepth() == outerDepth)) { + return false; + } + if (type == XmlPullParser.START_TAG + && parser.getDepth() == outerDepth + 1) { + return true; + } + } + } } |