Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 85465bc4 authored by razorloves's avatar razorloves Committed by Paul Keith
Browse files

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
parent 6c2dd2f4
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
<?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"
+3 −6
Original line number Diff line number Diff line
/*
 * 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));
+0 −5
Original line number Diff line number Diff line
@@ -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) {