admin
2021-05-11 e5ca87e89fef96c827ec37d1d91082f626cbb17d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
package com.tejia.lijin.app.util.x5;
 
import android.content.Context;
 
public abstract class SecurityJsBridgeBundle {
 
    // add js
    private final static String DEFAULT_JS_BRIDGE = "JsBridge";
    public static final String METHOD = "method";
    public static final String BLOCK = "block";
    public static final String CALLBACK = "callback";
 
    public static final String PROMPT_START_OFFSET = "local_js_bridge::";
 
    private Context mContext;
    private String mJsBlockName;
    private String mMethodName;
 
    public abstract void onCallMethod();
 
    public SecurityJsBridgeBundle(String JsBlockName, String methodName)
            throws Exception {
        if (methodName == null) {
            throw new Exception("methodName can not be null!");
        }
 
        if (JsBlockName != null) {
            this.mJsBlockName = JsBlockName;
        } else {
            this.mJsBlockName = DEFAULT_JS_BRIDGE;
        }
 
    }
 
    public String getMethodName() {
        return this.mMethodName;
    }
 
    public String getJsBlockName() {
        return this.mJsBlockName;
    }
}