Removing dead code
authorkenstir <kenstir@gmail.com>
Tue, 6 Oct 2015 02:00:49 +0000 (22:00 -0400)
committerkenstir <kenstir@gmail.com>
Tue, 6 Oct 2015 02:00:49 +0000 (22:00 -0400)
Open-ILS/src/Android/core/src/org/evergreen_ils/globals/Utils.java
Open-ILS/src/Android/core/src/org/evergreen_ils/searchCatalog/SearchCatalogListView.java
Open-ILS/src/Android/core/src/org/evergreen_ils/utils/ui/BasicDetailsFragment.java

index b9435c8..e9a0740 100644 (file)
@@ -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 {
index 4ebddb6..fe33ffb 100644 (file)
@@ -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);
 
index 804d398..5d1bdcd 100644 (file)
@@ -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