| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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.app.Activity; | 7 import android.app.Activity; |
| 8 import android.content.Intent; | 8 import android.content.Intent; |
| 9 import android.os.Bundle; | 9 import android.os.Bundle; |
| 10 import android.text.method.LinkMovementMethod; | 10 import android.text.method.LinkMovementMethod; |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 .setText(SpanApplier.applySpans(getString(R.string.lightweight_f
re_tos_and_privacy), | 55 .setText(SpanApplier.applySpans(getString(R.string.lightweight_f
re_tos_and_privacy), |
| 56 new SpanInfo("<LINK1>", "</LINK1>", clickableTermsSpan), | 56 new SpanInfo("<LINK1>", "</LINK1>", clickableTermsSpan), |
| 57 new SpanInfo("<LINK2>", "</LINK2>", clickablePrivacySpan
))); | 57 new SpanInfo("<LINK2>", "</LINK2>", clickablePrivacySpan
))); |
| 58 ((TextView) findViewById(R.id.lightweight_fre_tos_and_privacy)) | 58 ((TextView) findViewById(R.id.lightweight_fre_tos_and_privacy)) |
| 59 .setMovementMethod(LinkMovementMethod.getInstance()); | 59 .setMovementMethod(LinkMovementMethod.getInstance()); |
| 60 | 60 |
| 61 ((Button) findViewById(R.id.lightweight_fre_terms_accept)) | 61 ((Button) findViewById(R.id.lightweight_fre_terms_accept)) |
| 62 .setOnClickListener(new OnClickListener() { | 62 .setOnClickListener(new OnClickListener() { |
| 63 @Override | 63 @Override |
| 64 public void onClick(View v) { | 64 public void onClick(View v) { |
| 65 sGlue.acceptTermsOfService(LightweightFirstRunActivity.t
his, false); | 65 sGlue.acceptTermsOfService(false); |
| 66 completeFirstRunExperience(); | 66 completeFirstRunExperience(); |
| 67 } | 67 } |
| 68 }); | 68 }); |
| 69 | 69 |
| 70 ((Button) findViewById(R.id.lightweight_fre_cancel)) | 70 ((Button) findViewById(R.id.lightweight_fre_cancel)) |
| 71 .setOnClickListener(new OnClickListener() { | 71 .setOnClickListener(new OnClickListener() { |
| 72 @Override | 72 @Override |
| 73 public void onClick(View v) { | 73 public void onClick(View v) { |
| 74 abortFirstRunExperience(); | 74 abortFirstRunExperience(); |
| 75 } | 75 } |
| 76 }); | 76 }); |
| 77 } | 77 } |
| 78 | 78 |
| 79 @Override | 79 @Override |
| 80 public void completeFirstRunExperience() { | 80 public void completeFirstRunExperience() { |
| 81 FirstRunStatus.setLightweightFirstRunFlowComplete(LightweightFirstRunAct
ivity.this, true); | 81 FirstRunStatus.setLightweightFirstRunFlowComplete(LightweightFirstRunAct
ivity.this, true); |
| 82 Intent intent = new Intent(); | 82 Intent intent = new Intent(); |
| 83 intent.putExtras(mFreProperties); | 83 intent.putExtras(mFreProperties); |
| 84 finishAllTheActivities(getLocalClassName(), Activity.RESULT_OK, intent); | 84 finishAllTheActivities(getLocalClassName(), Activity.RESULT_OK, intent); |
| 85 } | 85 } |
| 86 } | 86 } |
| OLD | NEW |