Always persist the last app state changer.

Bug: 273282505
Test: manual
Change-Id: I3d1ce0924b9aa4e621829b14af879eb3f59d84d4
This commit is contained in:
Alex Buynytskyy
2023-03-28 13:31:46 -07:00
parent 5308553f06
commit cf9139dfbe

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,