summaryrefslogtreecommitdiff
authorXiaoliang Wang <xiaoliang.wang@amlogic.com>2017-06-29 13:07:16 (GMT)
committer Xiaoliang Wang <xiaoliang.wang@amlogic.com>2017-06-30 05:44:49 (GMT)
commit1cf42901d0065cfa2c79c0c772485e4f4fae04e8 (patch)
tree26255755fa02d6b523171b35a92813b71d266bcb
parent1ffa41821da2da36aef2542aee32a61596bbd1d4 (diff)
downloadVideoPlayer-1cf42901d0065cfa2c79c0c772485e4f4fae04e8.zip
VideoPlayer-1cf42901d0065cfa2c79c0c772485e4f4fae04e8.tar.gz
VideoPlayer-1cf42901d0065cfa2c79c0c772485e4f4fae04e8.tar.bz2
PD#146618: fix wrong next file index and add permission check before play
Change-Id: I09717a79478be721dd044b4e30286d25f6d9ad02
Diffstat
-rw-r--r--src/com/droidlogic/videoplayer/VideoPlayer.java9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/com/droidlogic/videoplayer/VideoPlayer.java b/src/com/droidlogic/videoplayer/VideoPlayer.java
index 9064c17..314cd32 100644
--- a/src/com/droidlogic/videoplayer/VideoPlayer.java
+++ b/src/com/droidlogic/videoplayer/VideoPlayer.java
@@ -2259,10 +2259,11 @@ public class VideoPlayer extends Activity {
}
private void playFile (String path) {
- LOGI (TAG, "[playFile]resume mode:" + mOption.getResumeMode() + ",path:" + path);
- if (mOption == null) {
+ if (mOption == null || path == null || !mPermissionGranted) {
return;
}
+ LOGI(TAG, "[playFile]resume mode:" + mOption.getResumeMode() + ",path:" + path);
+
resetVariate();
if (mResumePlay.getEnable() == true) {
setVideoPath (path);
@@ -2371,7 +2372,7 @@ public class VideoPlayer extends Activity {
mStateBac = STATE_STOP;
mPath = mPlayList.moveprev();
//sendPlayFileMsg();
- playFile(mPlayList.moveprev());
+ playFile(mPath);
}
else {
LOGI (TAG, "[playPrev]mState=STATE_PREPARING, error status do nothing only waitting");
@@ -2391,7 +2392,7 @@ public class VideoPlayer extends Activity {
mStateBac = STATE_STOP;
mPath = mPlayList.movenext();
//sendPlayFileMsg();
- playFile(mPlayList.movenext());
+ playFile(mPath);
}
else {
LOGI (TAG, "[playNext]mState=STATE_PREPARING, error status do nothing only waitting");