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

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

Change-Id: Ibd352a7d0cbb4ad6b5a8724bad64561ceb609e17