summaryrefslogtreecommitdiffstats
path: root/src/com/cyanogenmod/setupwizard/ui/SetupWizardActivity.java
diff options
context:
space:
mode:
authorcretin45 <cretin45@gmail.com>2015-02-04 14:00:52 -0800
committercretin45 <cretin45@gmail.com>2015-02-04 14:00:52 -0800
commit508cfbb0f348febfea88a994af4dfcb9d84b65d6 (patch)
tree6e22d780d5a87b036aa64444b0b08bc9a73e30f5 /src/com/cyanogenmod/setupwizard/ui/SetupWizardActivity.java
parentc117b980c447721f0c7bf4c26a430122de05df05 (diff)
downloadpackages_apps_SetupWizard-508cfbb0f348febfea88a994af4dfcb9d84b65d6.zip
packages_apps_SetupWizard-508cfbb0f348febfea88a994af4dfcb9d84b65d6.tar.gz
packages_apps_SetupWizard-508cfbb0f348febfea88a994af4dfcb9d84b65d6.tar.bz2
SetupWizard: Fix AccessibilityController regression and service leak
Change-Id: Ic8e419792d2468b937feb08d6678608c936d9f98
Diffstat (limited to 'src/com/cyanogenmod/setupwizard/ui/SetupWizardActivity.java')
-rw-r--r--src/com/cyanogenmod/setupwizard/ui/SetupWizardActivity.java11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/com/cyanogenmod/setupwizard/ui/SetupWizardActivity.java b/src/com/cyanogenmod/setupwizard/ui/SetupWizardActivity.java
index 3c36328..76c69a3 100644
--- a/src/com/cyanogenmod/setupwizard/ui/SetupWizardActivity.java
+++ b/src/com/cyanogenmod/setupwizard/ui/SetupWizardActivity.java
@@ -88,7 +88,8 @@ public class SetupWizardActivity extends Activity implements SetupDataCallbacks
mSetupData.load(savedInstanceState.getBundle("data"));
}
if (EnableAccessibilityController.canEnableAccessibilityViaGesture(this)) {
- mEnableAccessibilityController = new EnableAccessibilityController(this);
+ mEnableAccessibilityController =
+ EnableAccessibilityController.getInstance(getApplicationContext());
mRootView.setOnTouchListener(new View.OnTouchListener() {
@Override
public boolean onTouch(View v, MotionEvent event) {
@@ -119,9 +120,6 @@ public class SetupWizardActivity extends Activity implements SetupDataCallbacks
@Override
protected void onDestroy() {
super.onDestroy();
- if (mEnableAccessibilityController != null) {
- mEnableAccessibilityController.onDestroy();
- }
mSetupData.unregisterListener(this);
unregisterReceiver(mSetupData);
}
@@ -273,7 +271,10 @@ public class SetupWizardActivity extends Activity implements SetupDataCallbacks
Settings.Global.putInt(getContentResolver(), Settings.Global.DEVICE_PROVISIONED, 1);
Settings.Secure.putInt(getContentResolver(), Settings.Secure.USER_SETUP_COMPLETE, 1);
((SetupWizardApp)AppGlobals.getInitialApplication()).enableStatusBar();
- SetupWizardUtils.disableSetupWizards(this);
finish();
+ if (mEnableAccessibilityController != null) {
+ mEnableAccessibilityController.onDestroy();
+ }
+ SetupWizardUtils.disableSetupWizards(this);
}
}