Merge "Bug fix: fix System crash due to NullPointerException." into sc-dev am: 6791ed0112 am: 9aa7694408

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

Change-Id: Id4ce45b30e682b57ce63db7432efbe2c84c50a29