Skip to content
This repository has been archived by the owner on Jun 3, 2021. It is now read-only.

Commit

Permalink
* [android] Fix windmill container to debug weex page (#2077)
Browse files Browse the repository at this point in the history
* * [android] Rename WMLBridge to WeexBridge
* * [android] Fix windmill container to debug weex page
  • Loading branch information
miomin authored and YorkShen committed Jan 24, 2019
1 parent 709e948 commit f20382a
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 23 deletions.
Binary file added android/sdk/libs/armeabi/libweexcore.so
Binary file not shown.
Binary file modified android/sdk/libs/armeabi/libweexjss.so
Binary file not shown.
2 changes: 1 addition & 1 deletion weex_core/Source/android/wrap/wml_bridge.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ namespace WeexCore {

WMLBridge* WMLBridge::g_instance = nullptr;

const char kWMLBridgeClassPath[] = "com/taobao/windmill/bridge/WMLBridge";
const char kWMLBridgeClassPath[] = "com/taobao/windmill/bundle/bridge/WeexBridge";
jclass g_WMLBridge_clazz = nullptr;

static JNINativeMethod gWMMethods[] = {
Expand Down
30 changes: 8 additions & 22 deletions weex_core/Source/core/bridge/script/core_side_in_script.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,32 +50,18 @@ void CoreSideInScript::CallNative(const char *page_id, const char *task,
const char *callback) {
if (page_id == nullptr || task == nullptr) return;

// WeexCoreManager::Instance()->script_thread()->message_loop()->PostTask(
// weex::base::MakeCopyable(
// [pageId = std::unique_ptr<char[]>(copyStr(page_id)),
// taskS = std::unique_ptr<char[]>(copyStr(task)),
// callbackS = std::unique_ptr<char[]>(copyStr(callback))] {
// if (strcmp(taskS.get(),
// "[{\"module\":\"dom\",\"method\":\"createFinish\","
// "\"args\":[]}]") == 0) {
// RenderManager::GetInstance()->CreateFinish(pageId.get()) ? 0 :
// -1;
// } else {
// WeexCoreManager::Instance()
// ->getPlatformBridge()
// ->platform_side()
// ->CallNative(pageId.get(), taskS.get(), callbackS.get());
// }
// }));
if (strcmp(task,
"[{\"module\":\"dom\",\"method\":\"createFinish\","
"\"args\":[]}]") == 0) {
RenderManager::GetInstance()->CreateFinish(page_id);
} else {
std::string task_str(task);
std::string target_str("[{\"module\":\"dom\",\"method\":\"createFinish\","
"\"args\":[]}]");
std::string::size_type idx = task_str.find(target_str);

if(idx == std::string::npos) {
WeexCoreManager::Instance()
->getPlatformBridge()
->platform_side()
->CallNative(page_id, task, callback);
} else {
RenderManager::GetInstance()->CreateFinish(page_id);
}
}

Expand Down

0 comments on commit f20382a

Please sign in to comment.