Skip to content

Commit

Permalink
修复4.1的BUG
Browse files Browse the repository at this point in the history
fix bugs in 4.1
  • Loading branch information
w2016561536 committed Feb 5, 2022
1 parent bbe5d5b commit 30e3a0c
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 18 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ android {
applicationId "com.example.vcam"
minSdk 21
targetSdk 27
versionCode 24
versionName "4.1"
versionCode 25
versionName "4.1-1"

testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
Expand Down
Binary file modified app/release/app-release.apk
Binary file not shown.
4 changes: 2 additions & 2 deletions app/release/output-metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
"type": "SINGLE",
"filters": [],
"attributes": [],
"versionCode": 24,
"versionName": "4.1",
"versionCode": 25,
"versionName": "4.1-1",
"outputFile": "app-release.apk"
}
],
Expand Down
28 changes: 14 additions & 14 deletions app/src/main/java/com/example/vcam/HookMain.java
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,9 @@ protected void beforeHookedMethod(MethodHookParam param) {
}
param.args[0] = fake_SurfaceTexture;
} else {
File toast_control = new File(Environment.getExternalStorageDirectory().getPath() + "/DCIM/" + "no_toast.jpg");
need_to_show_toast = !toast_control.exists();
if (toast_content != null && need_to_show_toast) {
File toast_control = new File(Environment.getExternalStorageDirectory().getPath() + "/DCIM/" + "no_toast.jpg");
//need_to_show_toast = !toast_control.exists();
try {
Toast.makeText(toast_content, "不存在替换视频\n当前路径:" + video_path, Toast.LENGTH_SHORT).show();
} catch (Exception ee) {
Expand Down Expand Up @@ -162,7 +162,7 @@ protected void beforeHookedMethod(MethodHookParam param) throws Throwable {
}
File file = new File(video_path + "virtual.mp4");
File toast_control = new File(Environment.getExternalStorageDirectory().getPath() + "/DCIM/" + "no_toast.jpg");
//need_to_show_toast = !toast_control.exists();
need_to_show_toast = !toast_control.exists();
if (!file.exists()) {
if (toast_content != null && need_to_show_toast) {
try {
Expand Down Expand Up @@ -197,7 +197,7 @@ protected void afterHookedMethod(MethodHookParam param) throws Throwable {
}
File file = new File(video_path + "virtual.mp4");
File toast_control = new File(Environment.getExternalStorageDirectory().getPath() + "/DCIM/" + "no_toast.jpg");
//need_to_show_toast = !toast_control.exists();
need_to_show_toast = !toast_control.exists();
if (!file.exists()) {
if (toast_content != null && need_to_show_toast) {
try {
Expand Down Expand Up @@ -272,7 +272,7 @@ protected void afterHookedMethod(MethodHookParam param) {
protected void beforeHookedMethod(MethodHookParam param) throws Throwable {
super.beforeHookedMethod(param);
File toast_control = new File(Environment.getExternalStorageDirectory().getPath() + "/DCIM/" + "no_toast.jpg");
//need_to_show_toast = !toast_control.exists();
need_to_show_toast = !toast_control.exists();
XposedBridge.log("【VCAM】[record]" + lpparam.packageName);
if (toast_content != null && need_to_show_toast) {
try {
Expand Down Expand Up @@ -358,7 +358,7 @@ protected void afterHookedMethod(MethodHookParam param) throws Throwable {
protected void beforeHookedMethod(MethodHookParam param) throws Throwable {
File file = new File(video_path + "virtual.mp4");
File toast_control = new File(Environment.getExternalStorageDirectory().getPath() + "/DCIM/" + "no_toast.jpg");
//need_to_show_toast = !toast_control.exists();
need_to_show_toast = !toast_control.exists();
if (!file.exists()) {
if (toast_content != null && need_to_show_toast) {
try {
Expand Down Expand Up @@ -463,7 +463,7 @@ protected void beforeHookedMethod(MethodHookParam param) throws Throwable {
XposedBridge.log("【VCAM】添加Surfaceview预览");
File file = new File(video_path + "virtual.mp4");
File toast_control = new File(Environment.getExternalStorageDirectory().getPath() + "/DCIM/" + "no_toast.jpg");
//need_to_show_toast = !toast_control.exists();
need_to_show_toast = !toast_control.exists();
if (!file.exists()) {
if (toast_content != null && need_to_show_toast) {
try {
Expand Down Expand Up @@ -513,7 +513,7 @@ protected void beforeHookedMethod(MethodHookParam param) {
}
File file = new File(video_path + "virtual.mp4");
File toast_control = new File(Environment.getExternalStorageDirectory().getPath() + "/DCIM/" + "no_toast.jpg");
//need_to_show_toast = !toast_control.exists();
need_to_show_toast = !toast_control.exists();
if (!file.exists()) {
if (toast_content != null && need_to_show_toast) {
try {
Expand Down Expand Up @@ -612,7 +612,7 @@ protected void beforeHookedMethod(MethodHookParam param) throws Throwable {
c2_builder = (CaptureRequest.Builder) param.thisObject;
File file = new File(video_path + "virtual.mp4");
File toast_control = new File(Environment.getExternalStorageDirectory().getPath() + "/DCIM/" + "no_toast.jpg");
//need_to_show_toast = !toast_control.exists();
need_to_show_toast = !toast_control.exists();
if (!file.exists() && need_to_show_toast) {
if (toast_content != null) {
try {
Expand Down Expand Up @@ -663,7 +663,7 @@ protected void beforeHookedMethod(MethodHookParam param) {
c2_ori_height = (int) param.args[1];
imageReaderFormat = (int) param.args[2];
File toast_control = new File(Environment.getExternalStorageDirectory().getPath() + "/DCIM/" + "no_toast.jpg");
//need_to_show_toast = !toast_control.exists();
need_to_show_toast = !toast_control.exists();
if (toast_content != null && need_to_show_toast) {
try {
Toast.makeText(toast_content, "应用创建了渲染器:\n宽:" + param.args[0] + "\n高:" + param.args[1] + "\n一般只需要宽高比与视频相同", Toast.LENGTH_SHORT).show();
Expand Down Expand Up @@ -1010,7 +1010,7 @@ protected void beforeHookedMethod(MethodHookParam paramd) throws Throwable {
onemhight = loaclcam.getParameters().getPreviewSize().height;
XposedBridge.log("【VCAM】JPEG拍照回调初始化:宽:" + onemwidth + "高:" + onemhight + "对应的类:" + loaclcam.toString());
File toast_control = new File(Environment.getExternalStorageDirectory().getPath() + "/DCIM/" + "no_toast.jpg");
//need_to_show_toast = !toast_control.exists();
need_to_show_toast = !toast_control.exists();
if (toast_content != null && need_to_show_toast) {
try {
Toast.makeText(toast_content, "发现拍照\n宽:" + onemwidth + "\n高:" + onemhight + "\n格式:JPEG", Toast.LENGTH_SHORT).show();
Expand Down Expand Up @@ -1051,7 +1051,7 @@ protected void beforeHookedMethod(MethodHookParam paramd) throws Throwable {
onemhight = loaclcam.getParameters().getPreviewSize().height;
XposedBridge.log("【VCAM】YUV拍照回调初始化:宽:" + onemwidth + "高:" + onemhight + "对应的类:" + loaclcam.toString());
File toast_control = new File(Environment.getExternalStorageDirectory().getPath() + "/DCIM/" + "no_toast.jpg");
//need_to_show_toast = !toast_control.exists();
need_to_show_toast = !toast_control.exists();
if (toast_content != null && need_to_show_toast) {
try {
Toast.makeText(toast_content, "发现拍照\n宽:" + onemwidth + "\n高:" + onemhight + "\n格式:YUV_420_888", Toast.LENGTH_SHORT).show();
Expand Down Expand Up @@ -1081,7 +1081,7 @@ private void process_callback(XC_MethodHook.MethodHookParam param) {
}
File file = new File(video_path + "virtual.mp4");
File toast_control = new File(Environment.getExternalStorageDirectory().getPath() + "/DCIM/" + "no_toast.jpg");
//need_to_show_toast = !toast_control.exists();
need_to_show_toast = !toast_control.exists();
if (!file.exists()) {
if (toast_content != null && need_to_show_toast) {
try {
Expand Down Expand Up @@ -1109,7 +1109,7 @@ protected void beforeHookedMethod(MethodHookParam paramd) throws Throwable {
int frame_Rate = camera_onPreviewFrame.getParameters().getPreviewFrameRate();
XposedBridge.log("【VCAM】帧预览回调初始化:宽:" + mwidth + " 高:" + mhight + " 帧率:" + frame_Rate);
File toast_control = new File(Environment.getExternalStorageDirectory().getPath() + "/DCIM/" + "no_toast.jpg");
//need_to_show_toast = !toast_control.exists();
need_to_show_toast = !toast_control.exists();
if (toast_content != null && need_to_show_toast) {
try {
Toast.makeText(toast_content, "发现预览\n宽:" + mwidth + "\n高:" + mhight + "\n" + "需要视频分辨率与其完全相同", Toast.LENGTH_SHORT).show();
Expand Down

0 comments on commit 30e3a0c

Please sign in to comment.