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

Commit 62ea5e80 authored by Dianne Hackborn's avatar Dianne Hackborn Committed by Android (Google) Code Review
Browse files

Merge "Fix issue #4999574: Disabled system app not listed in Settings after reboot"

parents 116b208b b8f40002
Loading
Loading
Loading
Loading
+16 −13
Original line number Diff line number Diff line
@@ -1093,8 +1093,7 @@ final class Settings {
            serializer.attribute(null, "uidError", "true");
        }
        if (pkg.enabled != COMPONENT_ENABLED_STATE_DEFAULT) {
            serializer.attribute(null, "enabled",
                    pkg.enabled == COMPONENT_ENABLED_STATE_ENABLED ? "true" : "false");
            serializer.attribute(null, "enabled", Integer.toString(pkg.enabled));
        }
        if (pkg.installStatus == PackageSettingBase.PKG_INSTALL_INCOMPLETE) {
            serializer.attribute(null, "installStatus", "false");
@@ -1644,6 +1643,9 @@ final class Settings {
            packageSetting.nativeLibraryPathString = nativeLibraryPathStr;
            final String enabledStr = parser.getAttributeValue(null, "enabled");
            if (enabledStr != null) {
                try {
                    packageSetting.enabled = Integer.parseInt(enabledStr);
                } catch (NumberFormatException e) {
                    if (enabledStr.equalsIgnoreCase("true")) {
                        packageSetting.enabled = COMPONENT_ENABLED_STATE_ENABLED;
                    } else if (enabledStr.equalsIgnoreCase("false")) {
@@ -1656,6 +1658,7 @@ final class Settings {
                                        + " has bad enabled value: " + idStr + " at "
                                        + parser.getPositionDescription());
                    }
                }
            } else {
                packageSetting.enabled = COMPONENT_ENABLED_STATE_DEFAULT;
            }