removed ernoexception in exchange for a regular exeption to prevent verify error on <5.0

This commit is contained in:
Daniel Gultsch 2016-04-08 18:28:40 +02:00
parent 7a84cfdfa2
commit db0301310b
1 changed files with 2 additions and 3 deletions

View File

@ -15,7 +15,6 @@ import android.os.Build;
import android.os.Environment; import android.os.Environment;
import android.os.ParcelFileDescriptor; import android.os.ParcelFileDescriptor;
import android.provider.OpenableColumns; import android.provider.OpenableColumns;
import android.system.ErrnoException;
import android.system.Os; import android.system.Os;
import android.system.StructStat; import android.system.StructStat;
import android.util.Base64; import android.util.Base64;
@ -673,10 +672,10 @@ public class FileBackend {
FileDescriptor fd = ParcelFileDescriptor.open(file, ParcelFileDescriptor.MODE_READ_ONLY).getFileDescriptor(); FileDescriptor fd = ParcelFileDescriptor.open(file, ParcelFileDescriptor.MODE_READ_ONLY).getFileDescriptor();
StructStat st = Os.fstat(fd); StructStat st = Os.fstat(fd);
return st.st_uid == android.os.Process.myUid(); return st.st_uid == android.os.Process.myUid();
} catch (ErrnoException e) {
return true;
} catch (FileNotFoundException e) { } catch (FileNotFoundException e) {
return false; return false;
} catch (Exception e) {
return true;
} }
} }
} }