Merge "Fix an issue that caused an NPE" into sc-v2-dev am: f1e8bc69c0 am: e1db27eb4f

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

Change-Id: I15c52a5a38b101ca7dee1f9317a22e74d18c6400