Take snapshot when device becomes dozing and pulsing

The device supports pulsing won't turn the screen off when sleeping
(TaskSnapshotController#screenTurningOff is not called). So add
another path to take a snapshot to avoid showing inconsistent
animation when unlocking.

Bug: 182571838
Test: 1. Enable "Always show time and info".
      2. Open any app and go to home.
      3. Launch the app again and make some changes to its content.
      4. Press power key to enter dozing.
      5. Unlock and check if the animation has the latest content.
Change-Id: I97aaed519091fa6e9d8fd4862301fcb3186efe14
2 files changed