Fix transaction sanitization

Bug: 336648041
Bug: 336648613
Test: CredentialsTest
(cherry picked from commit 04e41761914c3c3aaca965103be3679b7a7af76f)
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:f1ad68a1a9fbdeb62999ccaee21643783101157c)
Merged-In: I53894d014bfabc9c958a6f533d7e3b3a6dcd0a34
Change-Id: I53894d014bfabc9c958a6f533d7e3b3a6dcd0a34
2 files changed