summaryrefslogtreecommitdiff
path: root/library/main/src/com/android/setupwizardlib/items/ItemInflater.java
diff options
context:
space:
mode:
authorXin Li <delphij@google.com>2019-09-04 13:34:16 -0700
committerXin Li <delphij@google.com>2019-09-04 13:34:16 -0700
commit3343873fa161579562e82b8fa8963094bac042fb (patch)
treed4d0f1ccfa3d6b82ef0a0be0a353328a3001714d /library/main/src/com/android/setupwizardlib/items/ItemInflater.java
parent3df8ec6322b20b4b09010145980c6b4c1ce8a448 (diff)
parentaa06a98b9387bf7cda7948de3f3949e82c151856 (diff)
downloadsetupwizard-3343873fa161579562e82b8fa8963094bac042fb.tar.gz
DO NOT MERGE - Merge Android 10 into masterndk-sysroot-r21
Bug: 139893257 Change-Id: I38429ee13989d447b1350d9f098d22786c2e9447
Diffstat (limited to 'library/main/src/com/android/setupwizardlib/items/ItemInflater.java')
-rw-r--r--library/main/src/com/android/setupwizardlib/items/ItemInflater.java32
1 files changed, 15 insertions, 17 deletions
diff --git a/library/main/src/com/android/setupwizardlib/items/ItemInflater.java b/library/main/src/com/android/setupwizardlib/items/ItemInflater.java
index 618d785..26cdbbd 100644
--- a/library/main/src/com/android/setupwizardlib/items/ItemInflater.java
+++ b/library/main/src/com/android/setupwizardlib/items/ItemInflater.java
@@ -18,26 +18,24 @@ package com.android.setupwizardlib.items;
import android.content.Context;
-/**
- * Inflate {@link Item} hierarchies from XML files.
- */
+/** Inflate {@link Item} hierarchies from XML files. */
public class ItemInflater extends ReflectionInflater<ItemHierarchy> {
- public interface ItemParent {
- void addChild(ItemHierarchy child);
- }
+ public interface ItemParent {
+ void addChild(ItemHierarchy child);
+ }
- public ItemInflater(Context context) {
- super(context);
- setDefaultPackage(Item.class.getPackage().getName() + ".");
- }
+ public ItemInflater(Context context) {
+ super(context);
+ setDefaultPackage(Item.class.getPackage().getName() + ".");
+ }
- @Override
- protected void onAddChildItem(ItemHierarchy parent, ItemHierarchy child) {
- if (parent instanceof ItemParent) {
- ((ItemParent) parent).addChild(child);
- } else {
- throw new IllegalArgumentException("Cannot add child item to " + parent);
- }
+ @Override
+ protected void onAddChildItem(ItemHierarchy parent, ItemHierarchy child) {
+ if (parent instanceof ItemParent) {
+ ((ItemParent) parent).addChild(child);
+ } else {
+ throw new IllegalArgumentException("Cannot add child item to " + parent);
}
+ }
}