Merge "Check whether doze is enabled before starting the screen off animation." into sc-dev am: ba255e63d8

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

Change-Id: I9edc63a9cd17b59daed113edd8334b272e2dc6c4