Fix playlist issues.

If an item was removed from a playlist, the play_order field of the following
items would not be adjusted. Because of a bug in the code for reordering items
in playlists, this would prevent reordering of items after the deleted item,
and could confuse apps that appended more items to the playlist after that,
causing them to insert with duplicate play_order values.
This change both makes it safe to have gaps in the play_order sequence, and
ensures that when deleting items, the following items have their play_order
adjusted downward so as to not leave any gaps if there weren't any before.

b/6299084

Change-Id: I0709fa7167790a86b966059184e15b97da2ed74f
1 file changed