SUW: Change WizardManager activity default state to disabled

Google's suw handles the LOAD and NEXT actions, so this creates
duplicate tasks and crashes google suw when finish() is attempted.

Change-Id: Ifdbd9365fba7f299dc041e42ae27a91da071aa99
This commit is contained in:
razorloves
2019-02-12 03:17:52 -06:00
committed by Paul Keith
parent 6c2dd2f452
commit 85465bc433
3 changed files with 5 additions and 12 deletions

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2013 The CyanogenMod Project
Copyright (C) 2017 The LineageOS Project
Copyright (C) 2017,2019 The LineageOS Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -63,6 +63,7 @@
<activity android:theme="@style/NoDisplay"
android:label="@string/activity_label_empty"
android:name=".wizardmanager.WizardManager"
android:enabled="false"
android:exported="false"
android:excludeFromRecents="true"
android:configChanges="keyboard|keyboardHidden|mcc|mnc|orientation|screenSize"

View File

@@ -1,6 +1,6 @@
/*
* Copyright (C) 2016 The CyanogenMod Project
* Copyright (C) 2017 The LineageOS Project
* Copyright (C) 2017,2019 The LineageOS Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -43,17 +43,14 @@ public class SetupWizardActivity extends BaseSetupWizardActivity {
Log.v(TAG, "onCreate savedInstanceState=" + savedInstanceState);
}
if (SetupWizardUtils.hasGMS(this)) {
if (LOGV) {
Log.v(TAG, "Has GMS disabling local wizard manager");
}
SetupWizardUtils.disableComponentsForGMS(this);
SetupWizardUtils.disableHome(this);
finish();
} else if (WizardManagerHelper.isUserSetupComplete(this)) {
SetupWizardUtils.finishSetupWizard(this);
finish();
} else {
onSetupStart();
SetupWizardUtils.resetComponent(this, WizardManager.class);
SetupWizardUtils.enableComponent(this, WizardManager.class);
Intent intent = new Intent(ACTION_LOAD);
if (isPrimaryUser()) {
intent.putExtra(EXTRA_SCRIPT_URI, getString(R.string.lineage_wizard_script_uri));

View File

@@ -263,11 +263,6 @@ public class SetupWizardUtils {
}
}
public static void disableComponentsForGMS(Context context) {
disableComponent(context, WizardManager.class);
disableHome(context);
}
public static void disableHome(Context context) {
ComponentName homeComponent = getHomeComponent(context);
if (homeComponent != null) {