[
https://issues.apache.org/jira/browse/WEEX-199?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16334034#comment-16334034
]
ASF GitHub Bot commented on WEEX-199:
-------------------------------------
Github user weex-bot commented on the issue:
https://github.com/apache/incubator-weex/pull/995
<!--
0 failure:
2 warning: No Changelog chan..., This PR should up...
1 messages
-->
<table>
<thead>
<tr>
<th width="50"></th>
<th width="100%" data-danger-table="true">Warnings</th>
</tr>
</thead>
<tbody><tr>
<td>:warning:</td>
<td>No Changelog changes!</td>
</tr>
<tr>
<td>:warning:</td>
<td>This PR should update related documents as well. </td>
</tr>
</tbody>
</table>
<table>
<thead>
<tr>
<th width="50"></th>
<th width="100%" data-danger-table="true">Messages</th>
</tr>
</thead>
<tbody><tr>
<td>:book:</td>
<td>danger test finished.</td>
</tr>
</tbody>
</table>
<p align="right">
Generated by :no_entry_sign: <a
href="http://github.com/danger/danger-js/">dangerJS</a>
</p>
> Add Global Switch Control Wson on or off
> ----------------------------------------
>
> Key: WEEX-199
> URL: https://issues.apache.org/jira/browse/WEEX-199
> Project: Weex
> Issue Type: Improvement
> Reporter: codefurture
> Assignee: Adam Feng
> Priority: Trivial
>
> Add Global Switch Control Wson on or off
>
> public static void updateGlobalConfig(String config){
> if(TextUtils.isEmpty(config)){
> config = "none";
> }
> if(!TextUtils.equals(config, globalConfig)){
> globalConfig = config;
> WXEnvironment.getCustomOptions().put(GLOBAL_CONFIG_KEY, globalConfig);
> Runnable runnable = new Runnable() {
> @Override
> public void run() {
> if(mBridgeManager != null){
> if(mBridgeManager.isJSFrameworkInit()){
> if(mBridgeManager.mWXBridge instanceof WXBridge) {
> final WXBridge bridge = (WXBridge) mBridgeManager.mWXBridge;
> bridge.updateGlobalConfig(globalConfig);
> }
> }
> }
> if(globalConfig.contains("wson_off")){
> WXJsonUtils.USE_WSON = false;
> }else{
> WXJsonUtils.USE_WSON = true;
> }
> }
> };
> if(mBridgeManager != null && mBridgeManager.isJSFrameworkInit()){
> mBridgeManager.post(runnable);
> }else{
> runnable.run();
> }
> }
> }
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)