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;
|
}
|
}
|