-
-
Notifications
You must be signed in to change notification settings - Fork 156
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[android] crash fix on array out of bounds.
- Loading branch information
Showing
1 changed file
with
20 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15fcb77
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for this problem, that's it, and I left this class there just in case.
15fcb77
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I know this is the alternate branch, but I rather understand the problem to fix it accordingly. It seems to my that the reason is that
ProfileSongAdapter.VIEW_TYPE_COUNT
is3
and then one needs to subtract2
to the count instead of1
. If that's the case, we should be able to replicate it.15fcb77
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
well, I'm also starting to believe that this is the real cause of the issue (not the adapter being altered on a parallel thread), I was thinking about it in the supermarket, but because of something that started manifesting later with the player. On my branch, now by (bad) luck I'm able to replicate a bug that I sometimes see in the master branch.
Use the music player, and slide the music progress bar all the way to the right. On the main branch, most of the times the player will continue playing the next song, but sometimes, the next song doesn't start.
On this branch, now it won't play further, my guess is that it has to do with a similar issue as this one, with the faux element at 0.
I'll give it a try on this part of the code and see. Going back to this specific fix, perhaps I should just always subtract
ProfileSongAdapter.VIEW_TYPE_COUNT - 1