summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorcretin45 <cretin45@gmail.com>2016-04-26 11:14:38 -0700
committercretin45 <cretin45@gmail.com>2016-04-26 11:15:48 -0700
commit941aa1e1e2459c83c19a27aac2de1bf0370a2717 (patch)
tree3908e3feb00910e3cf3cba514b4bcb3d00ae3798 /src
parent2e75c4ee0479d723e429ac29328ae884ecc51dd0 (diff)
downloadpackages_apps_SetupWizard-941aa1e1e2459c83c19a27aac2de1bf0370a2717.zip
packages_apps_SetupWizard-941aa1e1e2459c83c19a27aac2de1bf0370a2717.tar.gz
packages_apps_SetupWizard-941aa1e1e2459c83c19a27aac2de1bf0370a2717.tar.bz2
SetupWizard: Handle register theme change listener crash
Issue-id: FEIJ-84 Change-Id: I8ffca77418702f04328ae7d0581ab8cc316a04e8
Diffstat (limited to 'src')
-rw-r--r--src/com/cyanogenmod/setupwizard/ui/SetupWizardActivity.java9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/com/cyanogenmod/setupwizard/ui/SetupWizardActivity.java b/src/com/cyanogenmod/setupwizard/ui/SetupWizardActivity.java
index 908fc2a..7ba58e0 100644
--- a/src/com/cyanogenmod/setupwizard/ui/SetupWizardActivity.java
+++ b/src/com/cyanogenmod/setupwizard/ui/SetupWizardActivity.java
@@ -32,6 +32,7 @@ import android.os.UserHandle;
import android.preference.PreferenceManager;
import android.provider.Settings;
import android.text.TextUtils;
+import android.util.Log;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewAnimationUtils;
@@ -355,7 +356,11 @@ public class SetupWizardActivity extends Activity implements SetupDataCallbacks,
mFinishingProgressBar.setIndeterminate(true);
mFinishingProgressBar.startAnimation(fadeIn);
final ThemeManager tm = ThemeManager.getInstance(this);
- tm.addClient(this);
+ try {
+ tm.registerThemeChangeListener(this);
+ } catch (Exception e) {
+ Log.w(TAG, "ThemeChangeListener already registered");
+ }
mSetupData.finishPages();
}
@@ -473,7 +478,7 @@ public class SetupWizardActivity extends Activity implements SetupDataCallbacks,
mEnableAccessibilityController.onDestroy();
}
final ThemeManager tm = ThemeManager.getInstance(SetupWizardActivity.this);
- tm.removeClient(SetupWizardActivity.this);
+ tm.unregisterThemeChangeListener(SetupWizardActivity.this);
SetupStats.sendEvents(SetupWizardActivity.this);
SetupWizardUtils.disableGMSSetupWizard(SetupWizardActivity.this);
final WallpaperManager wallpaperManager =