From cb06119f85fcc534170d2c89f9610a3bc6125a02 Mon Sep 17 00:00:00 2001 From: Equip de Desenvolupadors de PBE Date: Sat, 15 Dec 2012 21:51:45 +0000 Subject: [PATCH] Bug fixed cuando se quedaba sin buffer --- res/values/strings.xml | 2 +- src/com/upc/pbe/upcnews/VideoActivity.java | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/res/values/strings.xml b/res/values/strings.xml index 9bbcb14..7ec4741 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -29,6 +29,6 @@ Alerta! Llibreries de Vitamio no instal·lades! Alerta! Item type - Buffering… + Buffering... \ No newline at end of file diff --git a/src/com/upc/pbe/upcnews/VideoActivity.java b/src/com/upc/pbe/upcnews/VideoActivity.java index 9c1b39f..11f805e 100644 --- a/src/com/upc/pbe/upcnews/VideoActivity.java +++ b/src/com/upc/pbe/upcnews/VideoActivity.java @@ -99,7 +99,7 @@ public class VideoActivity extends Activity { public void toggleBuffering(boolean b) { - if(b) + if(b && pd == null) { pd = new ProgressDialog(VideoActivity.this); pd.setCancelable(false); @@ -123,6 +123,7 @@ public class VideoActivity extends Activity { public void buffer() { buffering = true; + toggleBuffering(true); video.suspend(); } public void play(String path) @@ -152,7 +153,10 @@ public class VideoActivity extends Activity { { buffer(); } - play(queue.get(0)); + else + { + play(queue.get(0)); + } } else if(currentPos < 0) { @@ -210,7 +214,7 @@ public class VideoActivity extends Activity { { if(queue.isEmpty() && !ended) { - toggleBuffering(true); + buffer(); } } -- libgit2 0.22.2