diff options
author | cretin45 <cretin45@gmail.com> | 2015-02-23 14:33:07 -0800 |
---|---|---|
committer | cretin45 <cretin45@gmail.com> | 2015-02-23 14:33:07 -0800 |
commit | d7e70040b79dafe475de5205836d714a52a2506a (patch) | |
tree | d07f74a9a3e54dff8a848818f156edde28d120cb /src/com/cyanogenmod/setupwizard/setup/SetupPage.java | |
parent | c4584a78e30444b336dd6788334af6432b1ca466 (diff) | |
download | packages_apps_SetupWizard-d7e70040b79dafe475de5205836d714a52a2506a.zip packages_apps_SetupWizard-d7e70040b79dafe475de5205836d714a52a2506a.tar.gz packages_apps_SetupWizard-d7e70040b79dafe475de5205836d714a52a2506a.tar.bz2 |
SetupWizard: Refactor context type
Context is assumed to be SetupWizardActivity and blindly cast. Just make the Context reference a SetupWizardActivity.
Change-Id: I3d7ffd08980fbff0fbea51b45b28002b49813038
Diffstat (limited to 'src/com/cyanogenmod/setupwizard/setup/SetupPage.java')
-rw-r--r-- | src/com/cyanogenmod/setupwizard/setup/SetupPage.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/com/cyanogenmod/setupwizard/setup/SetupPage.java b/src/com/cyanogenmod/setupwizard/setup/SetupPage.java index 4479ab4..fe3fca3 100644 --- a/src/com/cyanogenmod/setupwizard/setup/SetupPage.java +++ b/src/com/cyanogenmod/setupwizard/setup/SetupPage.java @@ -17,6 +17,7 @@ package com.cyanogenmod.setupwizard.setup; import com.cyanogenmod.setupwizard.R; +import com.cyanogenmod.setupwizard.ui.SetupWizardActivity; import android.app.Activity; import android.app.Fragment; @@ -37,9 +38,9 @@ public abstract class SetupPage implements Page { private boolean mRequired = false; private boolean mHidden = false; - protected final Context mContext; + protected final SetupWizardActivity mContext; - protected SetupPage(Context context, SetupDataCallbacks callbacks) { + protected SetupPage(SetupWizardActivity context, SetupDataCallbacks callbacks) { mContext = context; mCallbacks = callbacks; } @@ -73,7 +74,7 @@ public abstract class SetupPage implements Page { public void onFinishSetup() {} @Override - public void doLoadAction(Activity context, int action) { + public void doLoadAction(SetupWizardActivity context, int action) { if (context == null || context.isFinishing()) { return; } final FragmentManager fragmentManager = context.getFragmentManager(); Fragment fragment = getFragment(fragmentManager, action); |