Commit b0bf2c5b8b8d9a552ca7da4fa5f5523522d95619

Authored by Imanol-Mikel Barba Sabariego
1 parent fc8980ed

--no commit message

src/com/upc/pbe/upcnews/BandwidthMeasurer.java
... ... @@ -6,7 +6,7 @@ import android.util.Log;
6 6 //Mesura la velocitat (Bandwidth) d'Internet
7 7 public class BandwidthMeasurer
8 8 {
9   - private final static String TAG = "Measurer";
  9 + private final static String TAG = "Mesurador";
10 10 public double Measure(long rxBytes, long Time)
11 11 {
12 12 long AfterTime = System.currentTimeMillis();
... ... @@ -14,13 +14,13 @@ public class BandwidthMeasurer
14 14 long TotalRxAfterTest = TrafficStats.getTotalRxBytes();
15 15 double TimeDifference = AfterTime - Time;
16 16 double rxDiff = TotalRxAfterTest - rxBytes;
17   - Log.d(TAG,"Time difference = " + TimeDifference/1000);
18   - Log.d(TAG, "Bytes difference = " + rxDiff);
  17 + Log.d(TAG,"Diferencia de temps = " + TimeDifference/1000);
  18 + Log.d(TAG, "Diferencia de bytes = " + rxDiff);
19 19 if(rxDiff != 0){
20   - bps = ((rxDiff*8) / (TimeDifference/1000)); // total rx bits per second.
  20 + bps = ((rxDiff*8) / (TimeDifference/1000)); // total de rx en bits per second.
21 21 }
22 22 else{
23   - bps = -1; //No transmitted data
  23 + bps = -1; //No s'han trasmes dades
24 24 }
25 25 return bps;
26 26 }
... ...
src/com/upc/pbe/upcnews/Directoris.java
... ... @@ -84,7 +84,7 @@ public class Directoris extends Activity implements OnItemClickListener {
84 84 startActivity(mIntent);
85 85 }
86 86 else {
87   - Toast.makeText(this, "HLS engine error", Toast.LENGTH_LONG).show();
  87 + Toast.makeText(this, "Error en gestor HLS", Toast.LENGTH_LONG).show();
88 88 }
89 89 }
90 90 catch (ErrorException e){
... ...
src/com/upc/pbe/upcnews/HLS.java
... ... @@ -28,10 +28,9 @@ public class HLS
28 28 String[] files = dir.list();
29 29 for (int i = 0; i < files.length; i++) {
30 30 File deleteme = new File(dir, files[i]);
31   - Log.d(TAG, "Deleted " + files[i].toString());
  31 + Log.d(TAG, "Esborrat " + files[i].toString());
32 32 deleteme.delete();
33 33 }
34   -
35 34 currentQuality = 0;
36 35 currentVideo = currentQuality = currentSegment = 0;
37 36 this.videos = parsed;
... ... @@ -64,7 +63,7 @@ public class HLS
64 63 long segmentBytes = TrafficStats.getTotalRxBytes();
65 64 d.descarregarguardar(seg.getURL(),localFolder);
66 65 double bps = bm.Measure(segmentBytes,startTime);
67   - Log.d(TAG, "Current KB/s: " + (bps/8e3));
  66 + Log.d(TAG, "Velocitat actual (KB/s): " + (bps/8e3));
68 67 if((bps < qualities.get(currentQuality).getQuality()) && (bps != -1)) {
69 68 currentQuality++;
70 69 }
... ...
src/com/upc/pbe/upcnews/HTMLParser.java
... ... @@ -52,7 +52,7 @@ public class HTMLParser {
52 52 if(!resources.contains(dirpath)) { //No siguem repetitius
53 53 resources.add(dirpath);
54 54 }
55   - Log.d(TAG, "DIRECTORY FOUND: " + dirpath);
  55 + Log.d(TAG, "DIRECTORI TROBAT: " + dirpath);
56 56 }
57 57 }
58 58 }
... ... @@ -88,7 +88,7 @@ public class HTMLParser {
88 88 {
89 89 resources.add(filepath);
90 90 }
91   - Log.d(TAG, "PLAYLIST FOUND: " + filepath);
  91 + Log.d(TAG, "PLAYLIST TROBADA: " + filepath);
92 92 }
93 93 }
94 94 }
... ...
src/com/upc/pbe/upcnews/Help.java
... ... @@ -15,7 +15,7 @@ public class Help extends Activity{
15 15 setContentView(R.layout.help);
16 16 }
17 17 public void onStop(){
18   - Log.d(TAG, "onStoped");
  18 + Log.d(TAG, "onStopped");
19 19 super.onStop();
20 20 }
21 21 }
... ...
src/com/upc/pbe/upcnews/MainActivity.java
... ... @@ -33,7 +33,7 @@ public class MainActivity extends Activity implements OnClickListener {
33 33 //Especifiquem la ruta de descarrega
34 34 File tempFolder = new File(((UpcApp)getApplication()).getLocalPath());
35 35 if(tempFolder.mkdirs()) {
36   - Log.d(TAG,"Directory " + tempFolder.toString() + " created");
  36 + Log.d(TAG,"Directori " + tempFolder.toString() + " creat");
37 37 }
38 38 //Creem els botons i text
39 39 URLText = (TextView) findViewById(R.id.textViewUrl);
... ... @@ -61,10 +61,10 @@ public class MainActivity extends Activity implements OnClickListener {
61 61 html = (String) d.doInBackground(((UpcApp)getApplication()).getUrl());
62 62 }
63 63 catch(MalformedURLException e) {
64   - Toast.makeText(this, "Invalid URL", Toast.LENGTH_LONG).show();
  64 + Toast.makeText(this, "URL invalida", Toast.LENGTH_LONG).show();
65 65 }
66 66 catch(IOException e) {
67   - Toast.makeText(this, "Can't find URL", Toast.LENGTH_LONG).show();
  67 + Toast.makeText(this, "No s'ha pogut trobar la URL", Toast.LENGTH_LONG).show();
68 68 }
69 69 }
70 70  
... ... @@ -89,7 +89,7 @@ public class MainActivity extends Activity implements OnClickListener {
89 89 switch (item.getItemId()) {
90 90 case R.id.itemprefs:
91 91 startActivity(new Intent(this, Prefs.class));
92   - Log.d(TAG, "Preferences");
  92 + Log.d(TAG, "Preferencies");
93 93 return true;
94 94 case R.id.itemhelp:
95 95 startActivity(new Intent(this, Help.class));
... ...
src/com/upc/pbe/upcnews/Prefs.java
... ... @@ -8,7 +8,7 @@ import android.view.Menu;
8 8 //Menu de preferencies
9 9 public class Prefs extends PreferenceActivity {
10 10  
11   - final static String TAG = "Preferences";
  11 + final static String TAG = "Preferencies";
12 12  
13 13 @Override
14 14 protected void onCreate(Bundle savedInstanceState) {
... ...
src/com/upc/pbe/upcnews/UpcApp.java
... ... @@ -11,7 +11,7 @@ import android.util.Log;
11 11 public class UpcApp extends Application implements
12 12 OnSharedPreferenceChangeListener {
13 13  
14   - final static String TAG = "Application";
  14 + final static String TAG = "Aplicacio";
15 15 private SharedPreferences prefs; // Conjunt de preferencies de l'aplicacio
16 16 private String url = null;
17 17 private String desc;
... ...