|
@@ -6,6 +6,7 @@ import android.app.Activity;
|
|
|
import android.content.Intent;
|
|
|
import android.net.Uri;
|
|
|
import android.text.TextUtils;
|
|
|
+import android.util.Log;
|
|
|
import android.view.Window;
|
|
|
import android.view.WindowManager;
|
|
|
import android.webkit.JavascriptInterface;
|
|
@@ -239,7 +240,7 @@ public class JsInterfaceUtils extends Object {
|
|
|
JSONObject content = jsonObject.getJSONObject("content");
|
|
|
|
|
|
if (onListener != null) {
|
|
|
- onListener.savePicture(content.getString("base64"),content.getString("uuid"));
|
|
|
+ onListener.savePicture(content.getString("base64"), content.getString("uuid"));
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -252,6 +253,21 @@ public class JsInterfaceUtils extends Object {
|
|
|
}
|
|
|
return;
|
|
|
}
|
|
|
+
|
|
|
+ if (TextUtils.equals(WebApi.LIMIT_SCREEN_RECORD, api)) {
|
|
|
+ //录屏截屏事件控制
|
|
|
+ JSONObject content = jsonObject.getJSONObject("content");
|
|
|
+ String type = content.optString("type");
|
|
|
+ if (activity == null) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (TextUtils.equals(type, "1")) {
|
|
|
+ activity.getWindow().addFlags(WindowManager.LayoutParams.FLAG_SECURE);
|
|
|
+ } else {
|
|
|
+ activity.getWindow().clearFlags(WindowManager.LayoutParams.FLAG_SECURE);
|
|
|
+ }
|
|
|
+ return;
|
|
|
+ }
|
|
|
} catch (Exception e) {
|
|
|
}
|
|
|
});
|
|
@@ -349,9 +365,10 @@ public class JsInterfaceUtils extends Object {
|
|
|
|
|
|
/**
|
|
|
* 保存图片
|
|
|
+ *
|
|
|
* @param base64
|
|
|
*/
|
|
|
- void savePicture(String base64,String uuid);
|
|
|
+ void savePicture(String base64, String uuid);
|
|
|
}
|
|
|
|
|
|
}
|