Merge "Fix issue with saving protos to disk during shutdown." am: 68e0de029a am: 26fcba8c97

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

Change-Id: I0d4a3409eec94a6dd4c25b617bec0f0cff84a8e6