From b0bf2c5b8b8d9a552ca7da4fa5f5523522d95619 Mon Sep 17 00:00:00 2001 From: Equip de Desenvolupadors de PBE Date: Mon, 10 Dec 2012 14:22:36 +0000 Subject: [PATCH] --- src/com/upc/pbe/upcnews/BandwidthMeasurer.java | 10 +++++----- src/com/upc/pbe/upcnews/Directoris.java | 2 +- src/com/upc/pbe/upcnews/HLS.java | 5 ++--- src/com/upc/pbe/upcnews/HTMLParser.java | 4 ++-- src/com/upc/pbe/upcnews/Help.java | 2 +- src/com/upc/pbe/upcnews/MainActivity.java | 8 ++++---- src/com/upc/pbe/upcnews/Prefs.java | 2 +- src/com/upc/pbe/upcnews/UpcApp.java | 2 +- 8 files changed, 17 insertions(+), 18 deletions(-) diff --git a/src/com/upc/pbe/upcnews/BandwidthMeasurer.java b/src/com/upc/pbe/upcnews/BandwidthMeasurer.java index dbf968d..3912ae5 100644 --- a/src/com/upc/pbe/upcnews/BandwidthMeasurer.java +++ b/src/com/upc/pbe/upcnews/BandwidthMeasurer.java @@ -6,7 +6,7 @@ import android.util.Log; //Mesura la velocitat (Bandwidth) d'Internet public class BandwidthMeasurer { - private final static String TAG = "Measurer"; + private final static String TAG = "Mesurador"; public double Measure(long rxBytes, long Time) { long AfterTime = System.currentTimeMillis(); @@ -14,13 +14,13 @@ public class BandwidthMeasurer long TotalRxAfterTest = TrafficStats.getTotalRxBytes(); double TimeDifference = AfterTime - Time; double rxDiff = TotalRxAfterTest - rxBytes; - Log.d(TAG,"Time difference = " + TimeDifference/1000); - Log.d(TAG, "Bytes difference = " + rxDiff); + Log.d(TAG,"Diferencia de temps = " + TimeDifference/1000); + Log.d(TAG, "Diferencia de bytes = " + rxDiff); if(rxDiff != 0){ - bps = ((rxDiff*8) / (TimeDifference/1000)); // total rx bits per second. + bps = ((rxDiff*8) / (TimeDifference/1000)); // total de rx en bits per second. } else{ - bps = -1; //No transmitted data + bps = -1; //No s'han trasmes dades } return bps; } diff --git a/src/com/upc/pbe/upcnews/Directoris.java b/src/com/upc/pbe/upcnews/Directoris.java index 3a8c122..a63f585 100644 --- a/src/com/upc/pbe/upcnews/Directoris.java +++ b/src/com/upc/pbe/upcnews/Directoris.java @@ -84,7 +84,7 @@ public class Directoris extends Activity implements OnItemClickListener { startActivity(mIntent); } else { - Toast.makeText(this, "HLS engine error", Toast.LENGTH_LONG).show(); + Toast.makeText(this, "Error en gestor HLS", Toast.LENGTH_LONG).show(); } } catch (ErrorException e){ diff --git a/src/com/upc/pbe/upcnews/HLS.java b/src/com/upc/pbe/upcnews/HLS.java index d1e5ef3..676fec2 100644 --- a/src/com/upc/pbe/upcnews/HLS.java +++ b/src/com/upc/pbe/upcnews/HLS.java @@ -28,10 +28,9 @@ public class HLS String[] files = dir.list(); for (int i = 0; i < files.length; i++) { File deleteme = new File(dir, files[i]); - Log.d(TAG, "Deleted " + files[i].toString()); + Log.d(TAG, "Esborrat " + files[i].toString()); deleteme.delete(); } - currentQuality = 0; currentVideo = currentQuality = currentSegment = 0; this.videos = parsed; @@ -64,7 +63,7 @@ public class HLS long segmentBytes = TrafficStats.getTotalRxBytes(); d.descarregarguardar(seg.getURL(),localFolder); double bps = bm.Measure(segmentBytes,startTime); - Log.d(TAG, "Current KB/s: " + (bps/8e3)); + Log.d(TAG, "Velocitat actual (KB/s): " + (bps/8e3)); if((bps < qualities.get(currentQuality).getQuality()) && (bps != -1)) { currentQuality++; } diff --git a/src/com/upc/pbe/upcnews/HTMLParser.java b/src/com/upc/pbe/upcnews/HTMLParser.java index 422a365..04f40d6 100644 --- a/src/com/upc/pbe/upcnews/HTMLParser.java +++ b/src/com/upc/pbe/upcnews/HTMLParser.java @@ -52,7 +52,7 @@ public class HTMLParser { if(!resources.contains(dirpath)) { //No siguem repetitius resources.add(dirpath); } - Log.d(TAG, "DIRECTORY FOUND: " + dirpath); + Log.d(TAG, "DIRECTORI TROBAT: " + dirpath); } } } @@ -88,7 +88,7 @@ public class HTMLParser { { resources.add(filepath); } - Log.d(TAG, "PLAYLIST FOUND: " + filepath); + Log.d(TAG, "PLAYLIST TROBADA: " + filepath); } } } diff --git a/src/com/upc/pbe/upcnews/Help.java b/src/com/upc/pbe/upcnews/Help.java index f542609..ca2eaf1 100644 --- a/src/com/upc/pbe/upcnews/Help.java +++ b/src/com/upc/pbe/upcnews/Help.java @@ -15,7 +15,7 @@ public class Help extends Activity{ setContentView(R.layout.help); } public void onStop(){ - Log.d(TAG, "onStoped"); + Log.d(TAG, "onStopped"); super.onStop(); } } diff --git a/src/com/upc/pbe/upcnews/MainActivity.java b/src/com/upc/pbe/upcnews/MainActivity.java index 979f81f..6c89628 100644 --- a/src/com/upc/pbe/upcnews/MainActivity.java +++ b/src/com/upc/pbe/upcnews/MainActivity.java @@ -33,7 +33,7 @@ public class MainActivity extends Activity implements OnClickListener { //Especifiquem la ruta de descarrega File tempFolder = new File(((UpcApp)getApplication()).getLocalPath()); if(tempFolder.mkdirs()) { - Log.d(TAG,"Directory " + tempFolder.toString() + " created"); + Log.d(TAG,"Directori " + tempFolder.toString() + " creat"); } //Creem els botons i text URLText = (TextView) findViewById(R.id.textViewUrl); @@ -61,10 +61,10 @@ public class MainActivity extends Activity implements OnClickListener { html = (String) d.doInBackground(((UpcApp)getApplication()).getUrl()); } catch(MalformedURLException e) { - Toast.makeText(this, "Invalid URL", Toast.LENGTH_LONG).show(); + Toast.makeText(this, "URL invalida", Toast.LENGTH_LONG).show(); } catch(IOException e) { - Toast.makeText(this, "Can't find URL", Toast.LENGTH_LONG).show(); + Toast.makeText(this, "No s'ha pogut trobar la URL", Toast.LENGTH_LONG).show(); } } @@ -89,7 +89,7 @@ public class MainActivity extends Activity implements OnClickListener { switch (item.getItemId()) { case R.id.itemprefs: startActivity(new Intent(this, Prefs.class)); - Log.d(TAG, "Preferences"); + Log.d(TAG, "Preferencies"); return true; case R.id.itemhelp: startActivity(new Intent(this, Help.class)); diff --git a/src/com/upc/pbe/upcnews/Prefs.java b/src/com/upc/pbe/upcnews/Prefs.java index b954bc6..f489524 100644 --- a/src/com/upc/pbe/upcnews/Prefs.java +++ b/src/com/upc/pbe/upcnews/Prefs.java @@ -8,7 +8,7 @@ import android.view.Menu; //Menu de preferencies public class Prefs extends PreferenceActivity { - final static String TAG = "Preferences"; + final static String TAG = "Preferencies"; @Override protected void onCreate(Bundle savedInstanceState) { diff --git a/src/com/upc/pbe/upcnews/UpcApp.java b/src/com/upc/pbe/upcnews/UpcApp.java index 2614399..d233894 100644 --- a/src/com/upc/pbe/upcnews/UpcApp.java +++ b/src/com/upc/pbe/upcnews/UpcApp.java @@ -11,7 +11,7 @@ import android.util.Log; public class UpcApp extends Application implements OnSharedPreferenceChangeListener { - final static String TAG = "Application"; + final static String TAG = "Aplicacio"; private SharedPreferences prefs; // Conjunt de preferencies de l'aplicacio private String url = null; private String desc; -- libgit2 0.22.2