lwb
2021-03-23 d8fc939d4e6e0a8748a5a87e32c2d0bf219d0a5f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
package com.secondworld.sdk.command;
 
import com.secondworld.sdk.utils.CodeU2A;
import com.secondworld.sdk.utils.WebViewUtil;
 
import org.json.JSONException;
import org.json.JSONObject;
 
public class CmdOpenWebView implements ICommand {
    @Override
    public int getCode() {
        return CodeU2A.OpenWebView;
    }
 
    @Override
    public void process(JSONObject json) throws JSONException {
        String url = json.getString("url");
        if (json.has("delay")) {
            boolean delay = json.getBoolean("delay");
            WebViewUtil.I.open(url, delay);
        } else
            WebViewUtil.I.open(url, true);
    }
}