summaryrefslogtreecommitdiffstats
path: root/core/java/com
diff options
context:
space:
mode:
authorJeff Brown <jeffbrown@google.com>2012-04-17 11:52:29 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-04-17 11:52:29 -0700
commit0192e966ff9df6d8da2a07e26f06fedcc8fdafbd (patch)
tree052da9d7fe8f6a55ea1b314950abba66950cd0d9 /core/java/com
parent1645ee2473e6264d83122ed262e1f7485541c995 (diff)
parenta3bc565882dd3984e995363642b1295fe3d24d10 (diff)
downloadframeworks_base-0192e966ff9df6d8da2a07e26f06fedcc8fdafbd.zip
frameworks_base-0192e966ff9df6d8da2a07e26f06fedcc8fdafbd.tar.gz
frameworks_base-0192e966ff9df6d8da2a07e26f06fedcc8fdafbd.tar.bz2
Merge "Add persistence for selected keyboard layout."
Diffstat (limited to 'core/java/com')
-rw-r--r--core/java/com/android/internal/util/XmlUtils.java15
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;
+ }
+ }
+ }
}