Commit 55054e08 authored by Wenyu Fu's avatar Wenyu Fu Committed by Chromium LUCI CQ

[FirstRun] Allow crash upload should not depending on visibility

Fix the issue when accepting ToS before native initialized caused UMA
reporting to be disabled.

Change-Id: Ifc05b8acbdf2da88952297f191f3afb2545374be
Bug: 1162308
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2606602
Commit-Queue: Wenyu Fu <wenyufu@chromium.org>
Reviewed-by: default avatarSky Malice <skym@chromium.org>
Cr-Commit-Position: refs/heads/master@{#839795}
parent 286a7797
......@@ -81,7 +81,6 @@ public class ToSAndUMAFirstRunFragment extends Fragment implements FirstRunFragm
});
mSendReportCheckBox.setChecked(FirstRunActivity.DEFAULT_METRICS_AND_CRASH_REPORTING);
if (!canShowUmaCheckBox()) {
mSendReportCheckBox.setVisibility(View.GONE);
}
......@@ -177,8 +176,7 @@ public class ToSAndUMAFirstRunFragment extends Fragment implements FirstRunFragm
}
mTriggerAcceptAfterNativeInit = false;
boolean allowCrashUpload = (mSendReportCheckBox.getVisibility() == View.VISIBLE)
&& mSendReportCheckBox.isChecked();
boolean allowCrashUpload = canShowUmaCheckBox() && mSendReportCheckBox.isChecked();
getPageDelegate().acceptTermsOfService(allowCrashUpload);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment