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

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

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