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

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

Change-Id: I49f5241d403b5f2b959a2967612e0c5790076c29