Merge "[Settings] Prevent crash from abnormal behavior." into sc-dev am: 0279a99e43

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/14980880

Change-Id: Ibbc6055e51e67b590df4cffb0f9d2f17a62e1748