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

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

Change-Id: I32d2d82e844b5a36dbf45fcd9bf161f354f88048