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

Commit 8e75e307 authored by Diego Perez's avatar Diego Perez Committed by Android Git Automerger
Browse files

am 1bc7fb2d: Merge "Fix isThemeAppCompat NPE when using an invalid theme" into lmp-mr1-dev

* commit '1bc7fb2d':
  Fix isThemeAppCompat NPE when using an invalid theme
parents 46241071 1bc7fb2d
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -1199,15 +1199,15 @@ public class RenderSessionImpl extends RenderAction<SessionParams> {
          // between Theme.AppCompat.Light and Theme.AppCompat is Theme.Material (for v21).
            boolean isThemeAppCompat = false;
            for (int i = 0; i < 50; i++) {
                if (defaultTheme == null) {
                    break;
                }
                // for loop ensures that we don't run into cyclic theme inheritance.
                if (defaultTheme.getName().startsWith("Theme.AppCompat")) {
                    isThemeAppCompat = true;
                    break;
                }
                defaultTheme = resources.getParent(defaultTheme);
                if (defaultTheme == null) {
                    break;
                }
            }
            mIsThemeAppCompat = isThemeAppCompat;
        }