SetupWizard: Refactor for better transitions out of OOBE

Change-Id: If91da3f44dbc5383236b54da529953d48a475250
This commit is contained in:
cretin45
2015-03-09 14:49:31 -07:00
parent 7732b7485d
commit 0d31b31aac
9 changed files with 92 additions and 28 deletions

View File

@@ -22,6 +22,8 @@ import android.app.StatusBarManager;
import android.content.Context;
import android.provider.Settings;
import com.cyanogenmod.setupwizard.util.SetupWizardUtils;
public class SetupWizardApp extends Application {
public static final String TAG = SetupWizardApp.class.getSimpleName();
@@ -55,8 +57,22 @@ public class SetupWizardApp extends Application {
@Override
public void onCreate() {
super.onCreate();
disableCaptivePortalDetection();
mStatusBarManager = (StatusBarManager)getSystemService(Context.STATUS_BAR_SERVICE);
try {
// Since this is a new component, we need to disable here if the user
// has already been through setup on a previous version.
if (SetupWizardUtils.isGuestUser(this)
|| Settings.Secure.getInt(getContentResolver(),
Settings.Secure.USER_SETUP_COMPLETE) == 1) {
SetupWizardUtils.disableSetupWizard(this);
} else {
disableCaptivePortalDetection();
}
} catch (Settings.SettingNotFoundException e) {
// Continue with setup
disableCaptivePortalDetection();
}
}
public void disableStatusBar() {