Merge "Preserve attributes on rollback." am: b1e8640f7e am: 70da2fc349

Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/1927454

Change-Id: If5935cec109edfff51e6a05ece2e6eefc81b9813