Skip to content

Commit

Permalink
Merge pull request #4550 from bijupmb/TIMOB-13046-AudioPlayerProgress…
Browse files Browse the repository at this point in the history
…NotFiredInLocalMedia

TIMOB-13046 remove remote  flag check
  • Loading branch information
hieupham007 committed Aug 20, 2013
2 parents fb8c8d8 + 74f48d3 commit 0f60983
Showing 1 changed file with 8 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -177,11 +177,9 @@ public void pause()
{
try {
if (mp != null) {
if(mp.isPlaying()) {
if (mp.isPlaying()) {
Log.d(TAG, "audio is playing, pause", Log.DEBUG_MODE);
if (remote) {
stopProgressTimer();
}
stopProgressTimer();
mp.pause();
paused = true;
setState(STATE_PAUSED);
Expand All @@ -207,9 +205,7 @@ public void play()
mp.start();
setState(STATE_PLAYING);
paused = false;
if (remote) {
startProgressTimer();
}
startProgressTimer();
}
setState(STATE_PLAYING);
}
Expand All @@ -223,9 +219,7 @@ public void reset()
{
try {
if (mp != null) {
if (remote) {
stopProgressTimer();
}
stopProgressTimer();

setState(STATE_STOPPING);
mp.seekTo(0);
Expand All @@ -234,7 +228,7 @@ public void reset()
setState(STATE_STOPPED);
}
} catch (Throwable t) {
Log.w(TAG, "Issue while resetting : " , t);
Log.w(TAG, "Issue while resetting : ", t);
}
}

Expand Down Expand Up @@ -393,9 +387,7 @@ public void stop()
setState(STATE_STOPPING);
mp.stop();
setState(STATE_STOPPED);
if (remote) {
stopProgressTimer();
}
stopProgressTimer();
try {
mp.prepare();
mp.seekTo(0);
Expand All @@ -406,12 +398,12 @@ public void stop()
}
}

if(isPaused()) {
if (isPaused()) {
paused = false;
}
}
} catch (Throwable t) {
Log.e(TAG, "Error : " , t);
Log.e(TAG, "Error : ", t);
}
}

Expand Down

0 comments on commit 0f60983

Please sign in to comment.