Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c77f9c76 authored by Deepanshu Gupta's avatar Deepanshu Gupta
Browse files

Replace infinite loop with foreach.

A method call exists to find all inner classes. Use it instead of
manually enumerating the possibilities and checking.

Also fix a typo.

Change-Id: I2af678e92ea0c11b53617b247d8cda324391c185
parent 5d1eaf4a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -151,7 +151,7 @@ public class AppCompatActionBar extends BridgeActionBar {

    @Override
    public void createMenuPopup() {
        // it's hard to addd menus to appcompat's actionbar, since it'll use a lot of reflection.
        // it's hard to add menus to appcompat's actionbar, since it'll use a lot of reflection.
        // so we skip it for now.
    }

+2 −8
Original line number Diff line number Diff line
@@ -94,14 +94,8 @@ public class AsmGenerator {
        ListIterator<Class<?>> iter = injectedClasses.listIterator();
        while (iter.hasNext()) {
            Class<?> clazz = iter.next();
            try {
                int i = 1;
                while(i < 100) {
                    iter.add(Class.forName(clazz.getName() + "$" + i));
                    i++;
                }
            } catch (ClassNotFoundException ignored) {
                // Expected.
            for (Class<?> aClass : clazz.getDeclaredClasses()) {
                iter.add(aClass);
            }
        }
        mInjectClasses = injectedClasses.toArray(new Class<?>[0]);