Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(216)

Side by Side Diff: chrome/android/java/src/org/chromium/chrome/browser/firstrun/ToSAndUMAFirstRunFragment.java

Issue 2275513003: Move usage and crash reporting to opt-out by default. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix unittests Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package org.chromium.chrome.browser.firstrun; 5 package org.chromium.chrome.browser.firstrun;
6 6
7 import android.content.Context; 7 import android.content.Context;
8 import android.os.Bundle; 8 import android.os.Bundle;
9 import android.text.method.LinkMovementMethod; 9 import android.text.method.LinkMovementMethod;
10 import android.view.LayoutInflater; 10 import android.view.LayoutInflater;
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 55
56 if (ChromeVersionInfo.isOfficialBuild()) { 56 if (ChromeVersionInfo.isOfficialBuild()) {
57 int paddingStart = getResources().getDimensionPixelSize( 57 int paddingStart = getResources().getDimensionPixelSize(
58 R.dimen.fre_tos_checkbox_padding); 58 R.dimen.fre_tos_checkbox_padding);
59 ApiCompatibilityUtils.setPaddingRelative(mSendReportCheckBox, 59 ApiCompatibilityUtils.setPaddingRelative(mSendReportCheckBox,
60 ApiCompatibilityUtils.getPaddingStart(mSendReportCheckBox) + paddingStart, 60 ApiCompatibilityUtils.getPaddingStart(mSendReportCheckBox) + paddingStart,
61 mSendReportCheckBox.getPaddingTop(), 61 mSendReportCheckBox.getPaddingTop(),
62 ApiCompatibilityUtils.getPaddingEnd(mSendReportCheckBox), 62 ApiCompatibilityUtils.getPaddingEnd(mSendReportCheckBox),
63 mSendReportCheckBox.getPaddingBottom()); 63 mSendReportCheckBox.getPaddingBottom());
64 64
65 mSendReportCheckBox.setChecked(!getPageDelegate().isNeverUploadCrash Dump()); 65 mSendReportCheckBox.setChecked(FirstRunActivity.DEFAULT_USAGE_CRASH_ REPORTING);
66 } else { 66 } else {
67 mSendReportCheckBox.setVisibility(View.GONE); 67 mSendReportCheckBox.setVisibility(View.GONE);
68 } 68 }
69 69
70 mTosAndPrivacy.setMovementMethod(LinkMovementMethod.getInstance()); 70 mTosAndPrivacy.setMovementMethod(LinkMovementMethod.getInstance());
71 71
72 NoUnderlineClickableSpan clickableTermsSpan = new NoUnderlineClickableSp an() { 72 NoUnderlineClickableSpan clickableTermsSpan = new NoUnderlineClickableSp an() {
73 @Override 73 @Override
74 public void onClick(View widget) { 74 public void onClick(View widget) {
75 if (!isAdded()) return; 75 if (!isAdded()) return;
(...skipping 13 matching lines...) Expand all
89 mTosAndPrivacy.setText(SpanApplier.applySpans(getString(R.string.fre_tos _and_privacy), 89 mTosAndPrivacy.setText(SpanApplier.applySpans(getString(R.string.fre_tos _and_privacy),
90 new SpanInfo("<LINK1>", "</LINK1>", clickableTermsSpan), 90 new SpanInfo("<LINK1>", "</LINK1>", clickableTermsSpan),
91 new SpanInfo("<LINK2>", "</LINK2>", clickablePrivacySpan))); 91 new SpanInfo("<LINK2>", "</LINK2>", clickablePrivacySpan)));
92 } 92 }
93 93
94 @Override 94 @Override
95 public boolean shouldSkipPageOnCreate(Context appContext) { 95 public boolean shouldSkipPageOnCreate(Context appContext) {
96 return FirstRunStatus.shouldSkipWelcomePage(appContext); 96 return FirstRunStatus.shouldSkipWelcomePage(appContext);
97 } 97 }
98 } 98 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698