Update src/dev/oxmc/configprovisioner/ProvisioningService.java

This commit is contained in:
2025-08-23 02:46:48 -07:00
parent 8edb0b6752
commit bd72b16ee9

View File

@@ -168,7 +168,19 @@ public class ProvisioningService extends Service {
boolean enableWizard = VendorConfig.isSetupWizardEnabled();
Log.i(TAG, "Configuring Setup Wizard: " + (enableWizard ? "ENABLED" : "DISABLED"));
if (!enableWizard) {
if (enableWizard) {
// Leave wizard enabled and mark setup as incomplete
try {
Settings.Secure.putInt(getContentResolver(),
Settings.Secure.USER_SETUP_COMPLETE, 0);
Settings.Global.putInt(getContentResolver(),
Settings.Global.DEVICE_PROVISIONED, 0);
Log.d(TAG, "Setup marked as NOT complete (wizard should run)");
} catch (Exception e) {
Log.w(TAG, "Failed to set setup incomplete flags", e);
}
} else {
// Disable wizard packages
disablePackage("com.android.setupwizard");
disablePackage("com.google.android.setupwizard");
disablePackage("org.lineageos.setupwizard");