Skip to content

Commit 3fbc7e1

Browse files
committed
DebugDialog开启report功能
1 parent bce714e commit 3fbc7e1

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

VideoOS/VenvyLibrary/src/main/java/cn/com/venvy/common/debug/DebugDialogView.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
import android.widget.CompoundButton;
99
import android.widget.FrameLayout;
1010
import android.widget.LinearLayout;
11+
12+
import cn.com.venvy.common.report.Report;
1113
import cn.com.venvy.common.utils.VenvyLog;
1214
import cn.com.venvy.common.utils.VenvyUIUtil;
1315

@@ -141,6 +143,11 @@ void updateCheckBoxTxt(DebugStatus.EnvironmentStatus environmentStatus) {
141143
mPreCheckoutBox.setText(openPreTxt);
142144
break;
143145
}
146+
if (Report.isReportAble()) {
147+
mReportCheckBox.setText("是否关闭日志上报功能?");
148+
} else {
149+
mReportCheckBox.setText("是否打开日志上报功能?");
150+
}
144151
}
145152

146153
private class PositiveClickListener implements DialogInterface.OnClickListener {
@@ -163,7 +170,7 @@ public void onClick(DialogInterface dialog, int which) {
163170

164171
DebugStatus.changeEnvironmentStatus(status);
165172
if (mReportCheckBox.isChecked()) {
166-
173+
Report.setReportAble(!Report.isReportAble());
167174
}
168175

169176
//根据选中与否来决定是否打开LOG

VideoOS/VenvyLibrary/src/main/java/cn/com/venvy/common/report/ReportHelper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ class ReportHelper {
7474
}
7575

7676
boolean isEnable() {
77-
return DebugStatus.isRelease() && enable;
77+
return !DebugStatus.isPreView() && enable;
7878
}
7979

8080
public void report(@NonNull final ReportInfo reportInfo) {

0 commit comments

Comments
 (0)