summaryrefslogtreecommitdiffstats
path: root/src/com/cyanogenmod/setupwizard/ui/SetupWizardActivity.java
diff options
context:
space:
mode:
authorcretin45 <cretin45@gmail.com>2015-01-30 10:55:05 -0800
committercretin45 <cretin45@gmail.com>2015-01-30 10:55:05 -0800
commita96968d9960806fc0f126c1046e910fd7ab4b169 (patch)
treed7454076ef1deb6c7b2c84084449fba21d286544 /src/com/cyanogenmod/setupwizard/ui/SetupWizardActivity.java
parente39d98bdb3d0a735fced80df36bee39c08ee398b (diff)
downloadpackages_apps_SetupWizard-a96968d9960806fc0f126c1046e910fd7ab4b169.zip
packages_apps_SetupWizard-a96968d9960806fc0f126c1046e910fd7ab4b169.tar.gz
packages_apps_SetupWizard-a96968d9960806fc0f126c1046e910fd7ab4b169.tar.bz2
SetupWizard: Let cyanogen settings page handle finish action
Change-Id: I84e383cb3db7ef32c6097e6b1912d71a5eafb4c4
Diffstat (limited to 'src/com/cyanogenmod/setupwizard/ui/SetupWizardActivity.java')
-rw-r--r--src/com/cyanogenmod/setupwizard/ui/SetupWizardActivity.java32
1 files changed, 1 insertions, 31 deletions
diff --git a/src/com/cyanogenmod/setupwizard/ui/SetupWizardActivity.java b/src/com/cyanogenmod/setupwizard/ui/SetupWizardActivity.java
index 83179b2..4f5ebe8 100644
--- a/src/com/cyanogenmod/setupwizard/ui/SetupWizardActivity.java
+++ b/src/com/cyanogenmod/setupwizard/ui/SetupWizardActivity.java
@@ -25,7 +25,6 @@ import android.content.res.Resources;
import android.os.Bundle;
import android.os.Handler;
import android.provider.Settings;
-import android.util.Log;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewAnimationUtils;
@@ -34,13 +33,10 @@ import android.widget.Button;
import com.cyanogenmod.setupwizard.R;
import com.cyanogenmod.setupwizard.SetupWizardApp;
import com.cyanogenmod.setupwizard.setup.CMSetupWizardData;
-import com.cyanogenmod.setupwizard.setup.CyanogenServicesPage;
-import com.cyanogenmod.setupwizard.setup.CyanogenSettingsPage;
import com.cyanogenmod.setupwizard.setup.Page;
import com.cyanogenmod.setupwizard.setup.SetupDataCallbacks;
import com.cyanogenmod.setupwizard.util.EnableAccessibilityController;
import com.cyanogenmod.setupwizard.util.SetupWizardUtils;
-import com.cyanogenmod.setupwizard.util.WhisperPushUtils;
public class SetupWizardActivity extends Activity implements SetupDataCallbacks {
@@ -263,35 +259,9 @@ public class SetupWizardActivity extends Activity implements SetupDataCallbacks
anim.start();
}
- private void handleWhisperPushRegistration() {
- Page page = getPage(CyanogenServicesPage.TAG);
- if (page == null) {
- return;
- }
- Bundle privacyData = page.getData();
- if (privacyData != null && privacyData.getBoolean(CyanogenSettingsPage.KEY_REGISTER_WHISPERPUSH)) {
- Log.d(TAG, "Registering with WhisperPush");
- WhisperPushUtils.startRegistration(this);
- }
- }
-
- public void handleEnableMetrics() {
- Page page = getPage(CyanogenServicesPage.TAG);
- if (page == null) {
- return;
- }
- Bundle privacyData = page.getData();
- if (privacyData != null
- && privacyData.getBoolean(CyanogenSettingsPage.KEY_SEND_METRICS)) {
- Settings.System.putInt(getContentResolver(), CyanogenSettingsPage.SETTING_METRICS,
- privacyData.getBoolean(CyanogenSettingsPage.KEY_SEND_METRICS) ? 1 : 0);
- }
- }
-
private void finishSetup() {
getApplication().sendBroadcast(new Intent(SetupWizardApp.ACTION_FINISHED));
- handleWhisperPushRegistration();
- handleEnableMetrics();
+ mSetupData.finishPages();
Settings.Global.putInt(getContentResolver(), Settings.Global.DEVICE_PROVISIONED, 1);
Settings.Secure.putInt(getContentResolver(), Settings.Secure.USER_SETUP_COMPLETE, 1);
((SetupWizardApp)AppGlobals.getInitialApplication()).enableStatusBar();