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:
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<!--
|
<!--
|
||||||
Copyright (C) 2013 The CyanogenMod Project
|
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");
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
you may not use this file except in compliance with the License.
|
you may not use this file except in compliance with the License.
|
||||||
@@ -63,6 +63,7 @@
|
|||||||
<activity android:theme="@style/NoDisplay"
|
<activity android:theme="@style/NoDisplay"
|
||||||
android:label="@string/activity_label_empty"
|
android:label="@string/activity_label_empty"
|
||||||
android:name=".wizardmanager.WizardManager"
|
android:name=".wizardmanager.WizardManager"
|
||||||
|
android:enabled="false"
|
||||||
android:exported="false"
|
android:exported="false"
|
||||||
android:excludeFromRecents="true"
|
android:excludeFromRecents="true"
|
||||||
android:configChanges="keyboard|keyboardHidden|mcc|mnc|orientation|screenSize"
|
android:configChanges="keyboard|keyboardHidden|mcc|mnc|orientation|screenSize"
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2016 The CyanogenMod Project
|
* 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");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with 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);
|
Log.v(TAG, "onCreate savedInstanceState=" + savedInstanceState);
|
||||||
}
|
}
|
||||||
if (SetupWizardUtils.hasGMS(this)) {
|
if (SetupWizardUtils.hasGMS(this)) {
|
||||||
if (LOGV) {
|
SetupWizardUtils.disableHome(this);
|
||||||
Log.v(TAG, "Has GMS disabling local wizard manager");
|
|
||||||
}
|
|
||||||
SetupWizardUtils.disableComponentsForGMS(this);
|
|
||||||
finish();
|
finish();
|
||||||
} else if (WizardManagerHelper.isUserSetupComplete(this)) {
|
} else if (WizardManagerHelper.isUserSetupComplete(this)) {
|
||||||
SetupWizardUtils.finishSetupWizard(this);
|
SetupWizardUtils.finishSetupWizard(this);
|
||||||
finish();
|
finish();
|
||||||
} else {
|
} else {
|
||||||
onSetupStart();
|
onSetupStart();
|
||||||
SetupWizardUtils.resetComponent(this, WizardManager.class);
|
SetupWizardUtils.enableComponent(this, WizardManager.class);
|
||||||
Intent intent = new Intent(ACTION_LOAD);
|
Intent intent = new Intent(ACTION_LOAD);
|
||||||
if (isPrimaryUser()) {
|
if (isPrimaryUser()) {
|
||||||
intent.putExtra(EXTRA_SCRIPT_URI, getString(R.string.lineage_wizard_script_uri));
|
intent.putExtra(EXTRA_SCRIPT_URI, getString(R.string.lineage_wizard_script_uri));
|
||||||
|
@@ -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) {
|
public static void disableHome(Context context) {
|
||||||
ComponentName homeComponent = getHomeComponent(context);
|
ComponentName homeComponent = getHomeComponent(context);
|
||||||
if (homeComponent != null) {
|
if (homeComponent != null) {
|
||||||
|
Reference in New Issue
Block a user