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

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

Change-Id: I7785f21c7d67e3bdfcef03615993836297a99b50