Commit 70addd37a44b8148cd74c6361b3a3fd33f163970

Authored by Imanol-Mikel Barba Sabariego
1 parent 9a249d1b

Removed useless code

src/com/upc/pbe/upcnews/MainActivity.java
... ... @@ -71,29 +71,7 @@ public class MainActivity extends Activity implements OnClickListener
71 71 public void onClick(View v) {
72 72 //Al polsar el boto s'inicia la descarrega
73 73 Log.d(TAG, "onClicked");
74   - Descarrega d = new Descarrega(this);
75   - try
76   - {
77   - d.execute(new URL(((UpcApp)getApplication()).getUrl()));
78   - html = d.get();
79   - }
80   - catch (InterruptedException e)
81   - {
82   - e.printStackTrace();
83   - }
84   - catch (ExecutionException e)
85   - {
86   - e.printStackTrace();
87   - }
88   - catch (MalformedURLException e)
89   - {
90   - Toast.makeText(this, "URL Malformada", Toast.LENGTH_LONG).show();
91   - }
92   - if(!html.equals(""))
93   - {
94   - ((UpcApp) getApplication()).setDesc(html);
95   - startActivity(new Intent(this, Directoris.class));
96   - }
  74 + startActivity(new Intent(this, Directoris.class));
97 75 }
98 76  
99 77 public void onResume() {
... ...
src/com/upc/pbe/upcnews/ResourceAdapter.java
... ... @@ -14,13 +14,11 @@ import android.widget.TextView;
14 14 //Modificacio de l'Adapter d'Adnroid, creat al nostre gust per donar estil als elements de la ListView de directoris i arxius
15 15 public class ResourceAdapter extends ArrayAdapter<String> {
16 16  
17   - Context context;
18   - int layoutResourceId;
  17 + Context context;
19 18 String[] entries = null;
20 19  
21 20 public ResourceAdapter(Context context, int layoutResourceId, String[] data) {
22 21 super(context, layoutResourceId, data);
23   - this.layoutResourceId = layoutResourceId;
24 22 this.context = context;
25 23 entries = data;
26 24 }
... ...