Merge "Fix NPE when runnin testActivity" into nyc-dev

am: 2155ad8

* commit '2155ad82042eb2f69b9c9d2a9ecf3884d265ad7b':
  Fix NPE when runnin testActivity

Change-Id: I5b0c4b2686ebee6814866edf0c9e30e12ea14d26
This commit is contained in:
Diego Perez
2016-04-07 19:06:38 +00:00
committed by android-build-merger

View File

@@ -639,7 +639,8 @@ public final class BridgeContext extends Context {
}
// Add value to defaultPropsMap if needed
if (typeArrayAndPropertiesPair.getSecond() != null) {
Object key = getCurrentParser().getViewCookie();
BridgeXmlBlockParser parser = getCurrentParser();
Object key = parser != null ? parser.getViewCookie() : null;
if (key != null) {
PropertiesMap defaultPropMap = mDefaultPropMaps.get(key);
if (defaultPropMap == null) {