summaryrefslogtreecommitdiffstats
path: root/src/com/cyanogenmod/setupwizard/setup/FinishPage.java
diff options
context:
space:
mode:
authorJoey Rizzoli <joey@lineageos.it>2016-12-29 17:28:02 +0100
committerAbhisek Devkota <ciwrl@lineageos.org>2017-01-14 18:36:57 -0800
commitd1331884a16916a36b16ca4d53d4c72d2bda6738 (patch)
tree3fe040402b001a5aa55b5bfd80a9089408158469 /src/com/cyanogenmod/setupwizard/setup/FinishPage.java
parent65d6ac1299720f8cc8e40cc8cc875fe3da2337dd (diff)
downloadpackages_apps_SetupWizard-d1331884a16916a36b16ca4d53d4c72d2bda6738.zip
packages_apps_SetupWizard-d1331884a16916a36b16ca4d53d4c72d2bda6738.tar.gz
packages_apps_SetupWizard-d1331884a16916a36b16ca4d53d4c72d2bda6738.tar.bz2
SetupWizard: rebrand to LineageOS
* Rebrand UI * Add privacy guard to setup * Disable Cyngn inc MOD platform and account setup * Make privacy policy view-able again Change-Id: Iacd60886992ca72d3f75bb21a905d612432751fc Signed-off-by: Joey Rizzoli <joey@lineageos.it>
Diffstat (limited to 'src/com/cyanogenmod/setupwizard/setup/FinishPage.java')
-rw-r--r--src/com/cyanogenmod/setupwizard/setup/FinishPage.java54
1 files changed, 8 insertions, 46 deletions
diff --git a/src/com/cyanogenmod/setupwizard/setup/FinishPage.java b/src/com/cyanogenmod/setupwizard/setup/FinishPage.java
index 3cb5a3f..2a7e0e7 100644
--- a/src/com/cyanogenmod/setupwizard/setup/FinishPage.java
+++ b/src/com/cyanogenmod/setupwizard/setup/FinishPage.java
@@ -1,5 +1,6 @@
/*
* Copyright (C) 2013 The CyanogenMod Project
+ * Copyright (C) 2017 The LineageOS Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -40,16 +41,12 @@ public class FinishPage extends SetupPage {
public static final String TAG = "FinishPage";
- private static final int WHAT_EXPLORE_MOD_GUIDE = 1;
private static final String KEY_MESSENGER = "key_messenger";
- private static final String MODGUIDE_PACKAGE_NAME = "com.cyngn.modguide";
private FinishFragment mFinishFragment;
- private final boolean mShowingModGuide;
public FinishPage(Context context, SetupDataCallbacks callbacks) {
super(context, callbacks);
- mShowingModGuide = SetupWizardUtils.canHasModMOD(context);
}
@Override
@@ -78,10 +75,6 @@ public class FinishPage extends SetupPage {
@Override
public void handleMessage(final Message msg) {
- final FinishPage page = mPage.get();
- if ((page != null) && (msg.what == WHAT_EXPLORE_MOD_GUIDE)) {
- page.doExploreModGuide();
- }
}
}
@@ -91,13 +84,13 @@ public class FinishPage extends SetupPage {
}
@Override
- public int getButtonBarBackgroundColorId() {
- return mShowingModGuide ? R.color.mod_button_bar_background : R.color.primary;
+ public int getTitleResId() {
+ return R.string.setup_complete;
}
@Override
- public int getTitleResId() {
- return R.string.setup_complete;
+ public int getIconResId() {
+ return -1;
}
@Override
@@ -106,55 +99,24 @@ public class FinishPage extends SetupPage {
return true;
}
- private void doExploreModGuide() {
- final SetupWizardActivity activity =
- (SetupWizardActivity) mFinishFragment.getActivity();
- final Intent intent =
- activity.getPackageManager().getLaunchIntentForPackage(MODGUIDE_PACKAGE_NAME);
- activity.setFinishIntent(intent);
- getCallbacks().onFinish();
- }
-
@Override
public int getNextButtonTitleResId() {
- return mShowingModGuide ? R.string.done : R.string.start;
+ return R.string.start;
}
public static class FinishFragment extends SetupPageFragment {
- private boolean mShowingModGuide;
-
@Override
protected void initializePage() {
final Activity activity = getActivity();
- if (!mShowingModGuide || (activity == null)) {
+ if (activity == null) {
return;
}
- mRootView.findViewById(R.id.explore_mod_guide)
- .setOnClickListener(new View.OnClickListener() {
- @Override
- public void onClick(View v) {
- final Messenger messenger = getArguments().getParcelable(KEY_MESSENGER);
- if (messenger == null) {
- return;
- }
- final Message message = Message.obtain();
- message.what = WHAT_EXPLORE_MOD_GUIDE;
- try {
- messenger.send(message);
- } catch (final RemoteException e) {
- Log.e(TAG, "Couldn't send message to start MOD Guide", e);
- }
- }
- });
}
@Override
protected int getLayoutResource() {
- final Context context = getContext();
- mShowingModGuide = (context != null) && SetupWizardUtils.canHasModMOD(context);
- return mShowingModGuide ?
- R.layout.setup_modguide_page : R.layout.setup_finished_page;
+ return R.layout.setup_finished_page;
}
}