Merge "Use the try catch to deal with the StaleDataException." am: 1fa847ad64 am: 15698dd32d

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

Change-Id: Ifc2e286c0d1fe184ad3cd21325424fc085bc79ce