Merge "Clear data from failed commits and recommits properly." into rvc-dev am: fc424b9a32

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11859962

Change-Id: I65c5fc620b8aab66f9036fb21e80ec7d2d34cd18