[Android] Lighter code

Geoffrey Métais git at videolan.org
Fri Feb 5 16:13:11 CET 2016


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Fri Feb  5 15:50:12 2016 +0100| [3b3c55a1eb518371b0b05bc89ba78dccdabb898f] | committer: Geoffrey Métais

Lighter code

> https://code.videolan.org/videolan/vlc-android/commit/3b3c55a1eb518371b0b05bc89ba78dccdabb898f
---

 vlc-android/src/org/videolan/vlc/util/Util.java | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/vlc-android/src/org/videolan/vlc/util/Util.java b/vlc-android/src/org/videolan/vlc/util/Util.java
index faf4685..f15cd65 100644
--- a/vlc-android/src/org/videolan/vlc/util/Util.java
+++ b/vlc-android/src/org/videolan/vlc/util/Util.java
@@ -75,16 +75,12 @@ public class Util {
     }
 
     public static boolean close(Closeable closeable) {
-        if (closeable != null) {
+        if (closeable != null)
             try {
                 closeable.close();
                 return true;
-            } catch (IOException e) {
-                return false;
-            }
-        } else {
-            return false;
-        }
+            } catch (IOException e) {}
+        return false;
     }
 
     public static boolean isCallable(Intent intent) {



More information about the Android mailing list