diff options
author | Jerome Gaillard <jgaillard@google.com> | 2023-02-16 12:03:34 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2023-02-16 12:03:34 +0000 |
commit | 9ec38a0fb69d756a49f19e2762f54a4f5edf37f2 (patch) | |
tree | 734a0e2b78859de42284801103689111bb326f75 | |
parent | 433076f6bc3f6b7c823805bd50ce69ec1c27e129 (diff) | |
parent | 319a9dc184ee6a2656f2c576a4ed5b8b307934f2 (diff) | |
download | layoutlib-9ec38a0fb69d756a49f19e2762f54a4f5edf37f2.tar.gz |
Merge "Allow for non-existent style in obtainStyledAttributes"
-rw-r--r-- | bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java b/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java index 73eee52b9b..3bef2fb5ce 100644 --- a/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java +++ b/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java @@ -713,7 +713,7 @@ public class BridgeContext extends Context { * Same as Context#obtainStyledAttributes. We do not override the base method to give the * original Context the chance to override the theme when needed. */ - @Nullable + @NonNull public final BridgeTypedArray internalObtainStyledAttributes(int resId, int[] attrs) throws Resources.NotFoundException { StyleResourceValue style = null; @@ -730,9 +730,8 @@ public class BridgeContext extends Context { } if (style == null) { - Bridge.getLog().error(ILayoutLog.TAG_RESOURCES_RESOLVE, + Bridge.getLog().warning(ILayoutLog.TAG_INFO, "Failed to find style with " + resId, null, null); - return null; } } |