cros: CancelPreviewWallpaper should return early if not in preview mode

Without the early return, observers are notified of
OnWallpaperPreviewEnded even if it's not in preview mode. This may
cause potential bugs if the observer doesn't have a guard itself.

In addition, slightly adjust the logic in wallpaper picker.

Bug: None
Change-Id: I17f01bd800ec55d969d927b8ede5a06c8ee61676
Reviewed-on: https://chromium-review.googlesource.com/c/1386148
Reviewed-by: Xiaoqian Dai <xdai@chromium.org>
Commit-Queue: Wenzhao (Colin) Zang <wzang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#622595}
2 files changed