From 70addd37a44b8148cd74c6361b3a3fd33f163970 Mon Sep 17 00:00:00 2001 From: Equip de Desenvolupadors de PBE Date: Tue, 8 Jan 2013 08:25:22 +0000 Subject: [PATCH] Removed useless code --- src/com/upc/pbe/upcnews/MainActivity.java | 24 +----------------------- src/com/upc/pbe/upcnews/ResourceAdapter.java | 4 +--- 2 files changed, 2 insertions(+), 26 deletions(-) diff --git a/src/com/upc/pbe/upcnews/MainActivity.java b/src/com/upc/pbe/upcnews/MainActivity.java index 8a043b0..598da46 100644 --- a/src/com/upc/pbe/upcnews/MainActivity.java +++ b/src/com/upc/pbe/upcnews/MainActivity.java @@ -71,29 +71,7 @@ public class MainActivity extends Activity implements OnClickListener public void onClick(View v) { //Al polsar el boto s'inicia la descarrega Log.d(TAG, "onClicked"); - Descarrega d = new Descarrega(this); - try - { - d.execute(new URL(((UpcApp)getApplication()).getUrl())); - html = d.get(); - } - catch (InterruptedException e) - { - e.printStackTrace(); - } - catch (ExecutionException e) - { - e.printStackTrace(); - } - catch (MalformedURLException e) - { - Toast.makeText(this, "URL Malformada", Toast.LENGTH_LONG).show(); - } - if(!html.equals("")) - { - ((UpcApp) getApplication()).setDesc(html); - startActivity(new Intent(this, Directoris.class)); - } + startActivity(new Intent(this, Directoris.class)); } public void onResume() { diff --git a/src/com/upc/pbe/upcnews/ResourceAdapter.java b/src/com/upc/pbe/upcnews/ResourceAdapter.java index db26ca3..647e58a 100644 --- a/src/com/upc/pbe/upcnews/ResourceAdapter.java +++ b/src/com/upc/pbe/upcnews/ResourceAdapter.java @@ -14,13 +14,11 @@ import android.widget.TextView; //Modificacio de l'Adapter d'Adnroid, creat al nostre gust per donar estil als elements de la ListView de directoris i arxius public class ResourceAdapter extends ArrayAdapter { - Context context; - int layoutResourceId; + Context context; String[] entries = null; public ResourceAdapter(Context context, int layoutResourceId, String[] data) { super(context, layoutResourceId, data); - this.layoutResourceId = layoutResourceId; this.context = context; entries = data; } -- libgit2 0.22.2