diff options
author | Deepanshu Gupta <deepanshu@google.com> | 2015-07-07 13:10:14 -0700 |
---|---|---|
committer | Deepanshu Gupta <deepanshu@google.com> | 2015-07-07 13:13:48 -0700 |
commit | c71450114131c59bb3a8d65968faae4995cd2345 (patch) | |
tree | a23d9f1f33f4232b891712034a67ec59a8b2f94d /tools/layoutlib | |
parent | 008e1fb9ed9ab18726762839bcfc74cb0feb82c8 (diff) | |
download | frameworks_base-c71450114131c59bb3a8d65968faae4995cd2345.zip frameworks_base-c71450114131c59bb3a8d65968faae4995cd2345.tar.gz frameworks_base-c71450114131c59bb3a8d65968faae4995cd2345.tar.bz2 |
Revert "Replace infinite loop with foreach."
This reverts commit c77f9c76e4142db8dd76a28ad99b8f0395b82eba.
Class.getDeclaredClasses() doesn't return anonymous inner class and
hence the change was wrong.
The revert doesn't undo the typo fixed in the original change.
Change-Id: Id0595c4bc3db1185dd1ce39808a6b8c3610a1e11
Diffstat (limited to 'tools/layoutlib')
-rw-r--r-- | tools/layoutlib/create/src/com/android/tools/layoutlib/create/AsmGenerator.java | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/tools/layoutlib/create/src/com/android/tools/layoutlib/create/AsmGenerator.java b/tools/layoutlib/create/src/com/android/tools/layoutlib/create/AsmGenerator.java index dae5509..f6c2626 100644 --- a/tools/layoutlib/create/src/com/android/tools/layoutlib/create/AsmGenerator.java +++ b/tools/layoutlib/create/src/com/android/tools/layoutlib/create/AsmGenerator.java @@ -94,8 +94,14 @@ public class AsmGenerator { ListIterator<Class<?>> iter = injectedClasses.listIterator(); while (iter.hasNext()) { Class<?> clazz = iter.next(); - for (Class<?> aClass : clazz.getDeclaredClasses()) { - iter.add(aClass); + try { + int i = 1; + while(i < 100) { + iter.add(Class.forName(clazz.getName() + "$" + i)); + i++; + } + } catch (ClassNotFoundException ignored) { + // Expected. } } mInjectClasses = injectedClasses.toArray(new Class<?>[0]); |