Why can’t strictmode capture SQLite read / write operations?
•
Android
In my app, I set the following settings for strictmode:
StrictMode.setThreadPolicy(new StrictMode.ThreadPolicy.Builder()
.detectDiskReads()
.detectDiskWrites()
.detectNetwork()
.penaltyLog()
.penaltyDeath()
.build());
At some point, I noticed that there are few places where I don't put SQLite operations in a separate thread, but they don't trigger strictmode violations. I have tested on real devices with Android 5.1.1 and genymotions with 4.4.4 and 5.1.1, and the results are the same. I recall that SQLite operations once triggered strictmode violations, But this is not the case now. Do you know why?
I see the following in the documentation:
Is that why?
resolvent:
SQLite is a library written in C, so all access to database files is indeed hidden in JNI calls
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码