MCPcopy Create free account
hub / github.com/antvis/F2Native / BridgeRailingAndroid

Method BridgeRailingAndroid

core/android/BridgeRailingAndroid.cpp:17–40  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15using namespace xg::bridge;
16
17BridgeRailingAndroid::BridgeRailingAndroid(jobject nativeRailObject) {
18 env_ = GetJniEnvSafe();
19 nativeRailObject_ = new xg::jni::ScopedJavaGlobalRef<jobject>(env_, nativeRailObject);
20
21 jclass contextCls = env_->GetObjectClass(nativeRailObject_->obj());
22
23 if (env_->ExceptionCheck()) { return; }
24 playAnimation_ = env_->GetMethodID(contextCls, "playAnimation", "(Ljava/lang/String;)V");
25 F2ASSERT(playAnimation_, "playAnimation_ method is null");
26
27 if (env_->ExceptionCheck()) { return; }
28 swap_ = env_->GetMethodID(contextCls, "swap", "()V");
29 F2ASSERT(swap_, "swap_ method is null");
30
31 if (env_->ExceptionCheck()) { return; }
32 getTimezoneOffset_ = env_->GetMethodID(contextCls, "getTimezoneOffset",
33 "(Ljava/lang/String;)J");
34 F2ASSERT(getTimezoneOffset_, "getTimezoneOffset_ method is null");
35
36 if (env_->ExceptionCheck()) { return; }
37 formatTime_ = env_->GetMethodID(contextCls, "formatTime",
38 "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;");
39 F2ASSERT(formatTime_, "formatTime_ method is null");
40}
41
42BridgeRailingAndroid::~BridgeRailingAndroid() {
43 XG_RELEASE_POINTER(nativeRailObject_);

Callers

nothing calls this directly

Calls 2

GetJniEnvSafeFunction · 0.85
objMethod · 0.45

Tested by

no test coverage detected