diff options
author | cretin45 <cretin45@gmail.com> | 2015-03-05 13:58:01 -0800 |
---|---|---|
committer | cretin45 <cretin45@gmail.com> | 2015-03-05 13:58:01 -0800 |
commit | 226687c0b2cb905ed6017632704ba29f9b76e208 (patch) | |
tree | d8e6842e7920d57860a336f03e353da34ef24a81 /src/com/cyanogenmod/setupwizard/ui/SetupWizardActivity.java | |
parent | ef4cd78d5f5ca98cb2fdaa9e86d564bacb7f5f45 (diff) | |
download | packages_apps_SetupWizard-226687c0b2cb905ed6017632704ba29f9b76e208.zip packages_apps_SetupWizard-226687c0b2cb905ed6017632704ba29f9b76e208.tar.gz packages_apps_SetupWizard-226687c0b2cb905ed6017632704ba29f9b76e208.tar.bz2 |
SetupWizard: Make sure we have this activities themechange listener
Change-Id: Iae69f1d7df2b3c032a187eda3593ea83fe0d9196
Diffstat (limited to 'src/com/cyanogenmod/setupwizard/ui/SetupWizardActivity.java')
-rw-r--r-- | src/com/cyanogenmod/setupwizard/ui/SetupWizardActivity.java | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/src/com/cyanogenmod/setupwizard/ui/SetupWizardActivity.java b/src/com/cyanogenmod/setupwizard/ui/SetupWizardActivity.java index 93c5f31..16fefc7 100644 --- a/src/com/cyanogenmod/setupwizard/ui/SetupWizardActivity.java +++ b/src/com/cyanogenmod/setupwizard/ui/SetupWizardActivity.java @@ -76,20 +76,7 @@ public class SetupWizardActivity extends Activity implements SetupDataCallbacks private final ArrayList<Runnable> mFinishRunnables = new ArrayList<Runnable>(); - private ThemeManager.ThemeChangeListener mThemeChangeListener = new ThemeManager.ThemeChangeListener() { - @Override - public void onProgress(int progress) { - if (progress > 0) { - mFinishingProgressBar.setIndeterminate(false); - mFinishingProgressBar.setProgress(progress); - } - } - - @Override - public void onFinish(boolean isSuccess) { - finishSetup(); - } - }; + private ThemeManager.ThemeChangeListener mThemeChangeListener; public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); @@ -305,6 +292,20 @@ public class SetupWizardActivity extends Activity implements SetupDataCallbacks mFinishingProgressBar.setIndeterminate(true); mFinishingProgressBar.startAnimation(fadeIn); final ThemeManager tm = (ThemeManager) getSystemService(Context.THEME_SERVICE); + mThemeChangeListener = new ThemeManager.ThemeChangeListener() { + @Override + public void onProgress(int progress) { + if (progress > 0) { + mFinishingProgressBar.setIndeterminate(false); + mFinishingProgressBar.setProgress(progress); + } + } + + @Override + public void onFinish(boolean isSuccess) { + finishSetup(); + } + }; tm.addClient(mThemeChangeListener); mSetupData.finishPages(); SetupStats.addEvent(SetupStats.Categories.APP_FINISHED, TAG, |