|
1 /* This Source Code Form is subject to the terms of the Mozilla Public |
|
2 * License, v. 2.0. If a copy of the MPL was not distributed with this |
|
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
|
4 |
|
5 package org.mozilla.gecko.sync.setup.activities; |
|
6 |
|
7 import org.mozilla.gecko.R; |
|
8 import org.mozilla.gecko.sync.setup.Constants; |
|
9 import org.mozilla.gecko.sync.setup.SyncAccounts; |
|
10 |
|
11 import android.os.Bundle; |
|
12 import android.view.View; |
|
13 import android.widget.TextView; |
|
14 |
|
15 public class SetupSuccessActivity extends SyncActivity { |
|
16 private TextView setupSubtitle; |
|
17 |
|
18 @Override |
|
19 public void onCreate(Bundle savedInstanceState) { |
|
20 super.onCreate(savedInstanceState); |
|
21 Bundle extras = this.getIntent().getExtras(); |
|
22 setContentView(R.layout.sync_setup_success); |
|
23 setupSubtitle = ((TextView) findViewById(R.id.setup_success_subtitle)); |
|
24 if (extras != null) { |
|
25 boolean isSetup = extras.getBoolean(Constants.INTENT_EXTRA_IS_SETUP); |
|
26 if (!isSetup) { |
|
27 setupSubtitle.setText(getString(R.string.sync_subtitle_manage)); |
|
28 } |
|
29 } |
|
30 } |
|
31 |
|
32 @Override |
|
33 public void onDestroy() { |
|
34 super.onDestroy(); |
|
35 } |
|
36 |
|
37 /* Click Handlers */ |
|
38 public void settingsClickHandler(View target) { |
|
39 SyncAccounts.openSyncSettings(this); |
|
40 } |
|
41 |
|
42 public void launchBrowser(View target) { |
|
43 ActivityUtils.openURLInFennec(this, null); |
|
44 } |
|
45 } |