From db0301310bcb4fa238df4839d793162727270dc1 Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Fri, 8 Apr 2016 18:28:40 +0200 Subject: removed ernoexception in exchange for a regular exeption to prevent verify error on <5.0 --- src/main/java/eu/siacs/conversations/persistance/FileBackend.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main/java/eu/siacs/conversations/persistance/FileBackend.java b/src/main/java/eu/siacs/conversations/persistance/FileBackend.java index 69b81569..0861a3a8 100644 --- a/src/main/java/eu/siacs/conversations/persistance/FileBackend.java +++ b/src/main/java/eu/siacs/conversations/persistance/FileBackend.java @@ -15,7 +15,6 @@ import android.os.Build; import android.os.Environment; import android.os.ParcelFileDescriptor; import android.provider.OpenableColumns; -import android.system.ErrnoException; import android.system.Os; import android.system.StructStat; import android.util.Base64; @@ -673,10 +672,10 @@ public class FileBackend { FileDescriptor fd = ParcelFileDescriptor.open(file, ParcelFileDescriptor.MODE_READ_ONLY).getFileDescriptor(); StructStat st = Os.fstat(fd); return st.st_uid == android.os.Process.myUid(); - } catch (ErrnoException e) { - return true; } catch (FileNotFoundException e) { return false; + } catch (Exception e) { + return true; } } } -- cgit v1.2.3