removed ernoexception in exchange for a regular exeption to prevent verify error on <5.0
This commit is contained in:
parent
7a84cfdfa2
commit
db0301310b
|
@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue