Merge pull request #832 from TomHennen/fix_829

reverting to tryLock for getPosition
This commit is contained in:
Tom Hennen 2015-05-25 20:51:47 -04:00
commit 985bde3fb7
1 changed files with 3 additions and 1 deletions

View File

@ -534,7 +534,9 @@ public class PlaybackServiceMediaPlayer {
* Returns the position of the current media object or INVALID_TIME if the position could not be retrieved.
*/
public int getPosition() {
playerLock.lock();
if (!playerLock.tryLock()) {
return INVALID_TIME;
}
int retVal = INVALID_TIME;
if (playerStatus == PlayerStatus.PLAYING