MCPcopy Create free account
hub / github.com/Snapchat/Valdi / doCreateView

Method doCreateView

valdi/src/valdi/android/AndroidViewFactory.cpp:34–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32}
33
34AndroidViewFactory::~AndroidViewFactory() = default;
35
36Valdi::Ref<Valdi::View> AndroidViewFactory::doCreateView(Valdi::ViewNodeTree* viewNodeTree,
37 Valdi::ViewNode* /*viewNode*/) {
38 ValdiContext javaValdiContext(_viewFactory.getEnv(), nullptr);
39
40 if (viewNodeTree != nullptr) {
41 javaValdiContext = fromValdiContextUserData(viewNodeTree->getContext()->getUserData());
42 }
43
44 auto result = ValdiAndroid::JavaEnv::getCache().getViewFactoryCreateViewMethod().call(_viewFactory.toObject(),
45 javaValdiContext);
46 if (result.isNull()) {
47 return nullptr;
48 }
49 return ValdiAndroid::toValdiView(result, _viewManager);
50}
51

Callers

nothing calls this directly

Calls 8

fromValdiContextUserDataFunction · 0.85
toValdiViewFunction · 0.85
getUserDataMethod · 0.80
toObjectMethod · 0.80
callMethod · 0.65
getEnvMethod · 0.45
getContextMethod · 0.45
isNullMethod · 0.45

Tested by

no test coverage detected