cros: Speculative fix for app movement crash

The check can only be hit if item_count() is 1, but the to/from indices
are not equal.

If item_count() is 1, we shouldn't be doing a move anyways, so return
early.

This crash is likely occurring because a sync is coming in to delete the
second item in a 2-item folder during the drag reorder.

Bug: 937431
Change-Id: I2521f2e89ace9ca8c9218bfd050c04cc6bb89d2d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1575776
Auto-Submit: Alex Newcomer <newcomer@chromium.org>
Reviewed-by: Xiyuan Xia <xiyuan@chromium.org>
Commit-Queue: Xiyuan Xia <xiyuan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#652692}
1 file changed