OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |