MCPcopy Create free account
hub / github.com/NativeScript/android / PostCallback

Method PostCallback

test-app/runtime/src/main/cpp/CallbackHandlers.cpp:1641–1658  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1639CallbackHandlers::func_AChoreographer_postFrameCallbackDelayed64 AChoreographer_postFrameCallbackDelayed64_;
1640
1641void CallbackHandlers::PostCallback(const FunctionCallbackInfo<v8::Value> &args, CallbackHandlers::FrameCallbackCacheEntry* entry, v8::Local<v8::Context> context){
1642 ALooper_prepare(0);
1643 auto instance = AChoreographer_getInstance_();
1644 auto delay = args[1];
1645 if(android_get_device_api_level() >= 29){
1646 if(!delay.IsEmpty() && delay->IsNumber()){
1647 AChoreographer_postFrameCallbackDelayed64_(instance, entry->frameCallback64_, entry, delay->Uint32Value(context).FromMaybe(0));
1648 }else {
1649 AChoreographer_postFrameCallback64_(instance, entry->frameCallback64_, entry);
1650 }
1651 }else {
1652 if(!delay.IsEmpty() && delay->IsNumber()){
1653 AChoreographer_postFrameCallbackDelayed_(instance, entry->frameCallback_, entry, (long)delay->IntegerValue(context).FromMaybe(0));
1654 }else {
1655 AChoreographer_postFrameCallback_(instance, entry->frameCallback_, entry);
1656 }
1657 }
1658}
1659
1660
1661void CallbackHandlers::PostFrameCallback(const FunctionCallbackInfo<v8::Value> &args) {

Callers

nothing calls this directly

Calls 2

IsEmptyMethod · 0.45
FromMaybeMethod · 0.45

Tested by

no test coverage detected