-
Notifications
You must be signed in to change notification settings - Fork 567
SQLiteContentHelper.getBlobColumnAsAssetFile should return AssetFileDescriptor? #7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
You can convert a MemoryFile to AssetFileDescriptor using : ParcelFileDescriptor fd = memoryFile.getParcelFileDescriptor(); |
Hi Karan Yes, I know I can do that. But by definition getBlobColumnAsAssetFile is supposed to return AssetFileDescriptor. Is there any reason why this was changed for sqlcipher? Thx Danilo -----Original Message----- You can convert a MemoryFile to AssetFileDescriptor using : ParcelFileDescriptor fd = memoryFile.getParcelFileDescriptor(); Reply to this email directly or view it on GitHub: |
Danilo: Please test out our Developer Preview 3 release, and see if this has resolved your concern: In many cases before, we were reimplementing core pieces of the android.database.* API. However, we have been trying to reuse or just build upon existing code in android.database.* where and when we can. Our goal is as close to 100% API compatibility when we can get it, but we cannot always. Thanks. |
ok. will give it a go and let you know. thx dt
|
Hi Nathan I checked the SQLiteContentHelper.java and the method getBlobColumnAsAssetFile is still returning a MemoryFile instead of the normal AssetFileDescriptor. thx Danilo |
Btw, this is what i did for getBlobColumnAsAssetFile to keep the API consistent...
|
Ah right. Just digging into this more, and the reason we couldn't return the AssetFileDescriptor, as you realized, was that the needed method was within the "hidden" android.os package. Your use of reflection does seem to solve it. Will consider integration. |
Your code has been included and committed. Thanks for the fix! |
Great! Glad to help. Btw, something you may want to consider as well. I had replaced all references to SQLiteException to use the android The reason is I hit a case where the framework (I forget which one) Anyway, since the sqlcipher version of the exception is the same (except thx dt On 11/02/2011 11:11 AM, n8fr8 wrote:
|
Yes, we are slowly figuring out which redundant classes we should remove. Seems like SQLiteException might be a good candidate. |
I am looking at an error in my build and found that SQLCipher's implementation of SQLiteContentHelper.getBlobColumnAsAssetFile is returning a MemoryFile instead of AssetFileDescriptor.
I have googled this and all the src I've seen return AssetFileDescriptor.
The text was updated successfully, but these errors were encountered: