Merge "Always persist the last app state changer." into udc-dev

This commit is contained in:
Alex Buynytskyy
2023-03-30 16:03:05 +00:00
committed by Android (Google) Code Review

View File

@@ -2217,10 +2217,10 @@ public final class Settings implements Watchable, Snappable, ResilientAtomicFile
}
if (ustate.getEnabledState() != COMPONENT_ENABLED_STATE_DEFAULT) {
serializer.attributeInt(null, ATTR_ENABLED, ustate.getEnabledState());
if (ustate.getLastDisableAppCaller() != null) {
serializer.attribute(null, ATTR_ENABLED_CALLER,
ustate.getLastDisableAppCaller());
}
}
if (ustate.getLastDisableAppCaller() != null) {
serializer.attribute(null, ATTR_ENABLED_CALLER,
ustate.getLastDisableAppCaller());
}
if (ustate.getInstallReason() != PackageManager.INSTALL_REASON_UNKNOWN) {
serializer.attributeInt(null, ATTR_INSTALL_REASON,