diff options
author | Diego Perez <diegoperez@google.com> | 2015-05-07 00:34:32 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2015-05-07 00:34:32 +0000 |
commit | d7a53dab44babb38acc7cd0cc3067ae95152614d (patch) | |
tree | 902c215f6a36acd36fcd93b74c6632d5526c6130 /tools/layoutlib | |
parent | 15432daa6e35d8978393da083f934848957f147c (diff) | |
parent | 9efcb308615c0adaf418d430adabea3d271bcbb4 (diff) | |
download | frameworks_base-d7a53dab44babb38acc7cd0cc3067ae95152614d.zip frameworks_base-d7a53dab44babb38acc7cd0cc3067ae95152614d.tar.gz frameworks_base-d7a53dab44babb38acc7cd0cc3067ae95152614d.tar.bz2 |
am 9efcb308: am 21246bd9: am 8e75e307: am 1bc7fb2d: Merge "Fix isThemeAppCompat NPE when using an invalid theme" into lmp-mr1-dev
* commit '9efcb308615c0adaf418d430adabea3d271bcbb4':
Fix isThemeAppCompat NPE when using an invalid theme
Diffstat (limited to 'tools/layoutlib')
-rw-r--r-- | tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/RenderSessionImpl.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/RenderSessionImpl.java b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/RenderSessionImpl.java index 44ff400..f6e5ef1 100644 --- a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/RenderSessionImpl.java +++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/RenderSessionImpl.java @@ -1210,15 +1210,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; } |