From: kenstir Date: Tue, 6 Oct 2015 02:00:49 +0000 (-0400) Subject: Removing dead code X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=7a0265037620c381de91c7391c17ee53776492d8;p=working%2FEvergreen.git Removing dead code --- diff --git a/Open-ILS/src/Android/core/src/org/evergreen_ils/globals/Utils.java b/Open-ILS/src/Android/core/src/org/evergreen_ils/globals/Utils.java index b9435c8670..e9a0740065 100644 --- a/Open-ILS/src/Android/core/src/org/evergreen_ils/globals/Utils.java +++ b/Open-ILS/src/Android/core/src/org/evergreen_ils/globals/Utils.java @@ -117,80 +117,6 @@ public class Utils { return in; } - public static boolean checkIfNetAddressIsReachable(String url) { - - // The old method of fetching the URL to see if the net is "reachable" was not good; - // it wasted bandwidth and time. For now just check if the url is empty. - return (url.length() > 0); - } - - public static void bookCoverImage(ImageView picture, String imageID, - int size) { - - String urlS = (GlobalConfigs.httpAddress + "/opac/extras/ac/jacket/small/" + imageID); - Log.d(TAG, "cover image: " + urlS); - - Bitmap bmp = null; // create a new Bitmap variable called bmp, and - // initialize it to null - - try { - - URL url = new URL(urlS); // create a URL object from the urlS string - // above - URLConnection conn = url.openConnection(); // save conn as a - // URLConnection - - conn.connect(); // connect to the URLConnection conn - InputStream is = conn.getInputStream(); // get the image from the - // URLConnection conn using - // InputStream is - BufferedInputStream bis = new BufferedInputStream(is, 8*1024); // create a - // BufferedInputStream - // called bis - // from is - bmp = BitmapFactory.decodeStream(bis); // use bis to convert the - // stream to a bitmap image, - // and save it to bmp - int bmpHeight = bmp.getHeight(); // stores the original height of - // the image - if (bmpHeight != 1) { - double scale = size / (double) bmpHeight; // sets the scaling - // number to match the - // desired size - double bmpWidthh = (double) bmp.getWidth() * scale; // scales - // and - // stores - // the - // original - // width - // into the - // desired - // one - int bmpWidth = (int) bmpWidthh; // gets the width of the picture - // and saves it - bmp = Bitmap.createScaledBitmap(bmp, bmpWidth, size, true); // creates - // and - // stores - // a - // new - // bmp - // with - // desired - // dimensions - } - - } catch (MalformedURLException e) { // catch errors - e.printStackTrace(); - } catch (IOException e) { - e.printStackTrace(); - } catch (IllegalStateException e) { - e.printStackTrace(); - } - picture.setImageBitmap(bmp); // send the Bitmap image bmp to pic, and - // call the method to set the image. - - } - public static String getResponseTextcode(Object response) { String textcode = null; try { diff --git a/Open-ILS/src/Android/core/src/org/evergreen_ils/searchCatalog/SearchCatalogListView.java b/Open-ILS/src/Android/core/src/org/evergreen_ils/searchCatalog/SearchCatalogListView.java index 4ebddb6708..fe33ffbe9b 100644 --- a/Open-ILS/src/Android/core/src/org/evergreen_ils/searchCatalog/SearchCatalogListView.java +++ b/Open-ILS/src/Android/core/src/org/evergreen_ils/searchCatalog/SearchCatalogListView.java @@ -689,7 +689,6 @@ public class SearchCatalogListView extends ActionBarActivity { // Get reference to ImageView recordImage = (ImageView) row.findViewById(R.id.search_record_img); - //String imageHref = GlobalConfigs.httpAddress + "/opac/extras/ac/jacket/small/" + record.isbn; String imageHref = GlobalConfigs.httpAddress + "/opac/extras/ac/jacket/small/r/" + record.image; Log.d(TAG, "image url " + imageHref); diff --git a/Open-ILS/src/Android/core/src/org/evergreen_ils/utils/ui/BasicDetailsFragment.java b/Open-ILS/src/Android/core/src/org/evergreen_ils/utils/ui/BasicDetailsFragment.java index 804d3982f8..5d1bdcd4ef 100644 --- a/Open-ILS/src/Android/core/src/org/evergreen_ils/utils/ui/BasicDetailsFragment.java +++ b/Open-ILS/src/Android/core/src/org/evergreen_ils/utils/ui/BasicDetailsFragment.java @@ -183,7 +183,6 @@ public class BasicDetailsFragment extends Fragment { } }); - //String imageHref = GlobalConfigs.httpAddress + "/opac/extras/ac/jacket/large/" + record.isbn; String imageHref = GlobalConfigs.httpAddress + "/opac/extras/ac/jacket/large/r/" + record.image; // start async download of image