| 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; |
| 11 import android.view.View; | 11 import android.view.View; |
| 12 import android.view.View.OnClickListener; | 12 import android.view.View.OnClickListener; |
| 13 import android.view.ViewGroup; | 13 import android.view.ViewGroup; |
| 14 import android.widget.Button; | 14 import android.widget.Button; |
| 15 import android.widget.CheckBox; | 15 import android.widget.CheckBox; |
| 16 import android.widget.TextView; | 16 import android.widget.TextView; |
| 17 | 17 |
| 18 import org.chromium.base.ApiCompatibilityUtils; | 18 import org.chromium.base.ApiCompatibilityUtils; |
| 19 import org.chromium.chrome.R; | 19 import org.chromium.chrome.R; |
| 20 import org.chromium.chrome.browser.ChromeVersionInfo; | 20 import org.chromium.chrome.browser.ChromeVersionInfo; |
| 21 import org.chromium.chrome.browser.preferences.PrefServiceBridge; | |
| 22 import org.chromium.ui.text.NoUnderlineClickableSpan; | 21 import org.chromium.ui.text.NoUnderlineClickableSpan; |
| 23 import org.chromium.ui.text.SpanApplier; | 22 import org.chromium.ui.text.SpanApplier; |
| 24 import org.chromium.ui.text.SpanApplier.SpanInfo; | 23 import org.chromium.ui.text.SpanApplier.SpanInfo; |
| 25 | 24 |
| 26 /** | 25 /** |
| 27 * The First Run Experience fragment that allows the user to accept Terms of Ser
vice ("ToS") and | 26 * The First Run Experience fragment that allows the user to accept Terms of Ser
vice ("ToS") and |
| 28 * Privacy Notice, and to opt-in to the usage statistics and crash reports colle
ction ("UMA", | 27 * Privacy Notice, and to opt-in to the usage statistics and crash reports colle
ction ("UMA", |
| 29 * User Metrics Analysis) as defined in the Chrome Privacy Notice. | 28 * User Metrics Analysis) as defined in the Chrome Privacy Notice. |
| 30 */ | 29 */ |
| 31 public class ToSAndUMAFirstRunFragment extends FirstRunPage { | 30 public class ToSAndUMAFirstRunFragment extends FirstRunPage { |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 R.string.chrome_privacy_notice_url); | 86 R.string.chrome_privacy_notice_url); |
| 88 } | 87 } |
| 89 }; | 88 }; |
| 90 mTosAndPrivacy.setText(SpanApplier.applySpans(getString(R.string.fre_tos
_and_privacy), | 89 mTosAndPrivacy.setText(SpanApplier.applySpans(getString(R.string.fre_tos
_and_privacy), |
| 91 new SpanInfo("<LINK1>", "</LINK1>", clickableTermsSpan), | 90 new SpanInfo("<LINK1>", "</LINK1>", clickableTermsSpan), |
| 92 new SpanInfo("<LINK2>", "</LINK2>", clickablePrivacySpan))); | 91 new SpanInfo("<LINK2>", "</LINK2>", clickablePrivacySpan))); |
| 93 } | 92 } |
| 94 | 93 |
| 95 @Override | 94 @Override |
| 96 public boolean shouldSkipPageOnCreate(Context appContext) { | 95 public boolean shouldSkipPageOnCreate(Context appContext) { |
| 97 return PrefServiceBridge.getInstance().isFirstRunEulaAccepted(); | 96 return FirstRunStatus.getSkipWelcomePage(appContext); |
| 98 } | 97 } |
| 99 } | 98 } |
| OLD | NEW |