-
Notifications
You must be signed in to change notification settings - Fork 9
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
Querying "content://settings/..." With filter Does Not Work under android-6 and newer #7
Comments
on my non-rooted android-10 i have the same issue: provider "content://settings/global"
Errorlog (enabled in Settings/copyErrormessageToClipboard) LoadResultsTask.onPostExecute : |
"content://settings/..." does not suport "filtering by fieldname" .Some content provider do not support "filtering by fieldname." Among these are "content://settings/..." (since android-6) On my android-10 filtering "content://sms/inbox" and "content://media/external/images/media" works as expected |
I know you have closed this but...
content query --uri content://settings/global --projection name:value --where "name='mobile_data0'" --sort "name ASC" I get a single line result: Row: 0 name=mobile_data0, value=1 So it would appear that, strictly speaking, the statement 'Some content provider do not support "filtering by fieldname."' may not be true in general. Clearly, using the content query command (via adb shell) does this just fine.
Thanks |
I certainly see here comments that agree with your statement above. And I see the exception being thrown around line 1595 here in the constructor of the internal Arguments class. However, I have not quite been able to decipher all of what is happening there. But I have tested an equals (=) filter on content://settings/secure where name is 'missed_call_msg_alert' in your app and I get a single line result. So it seems like the class WILL accept some filtering but, at least at first glance of the REs I see, only equals (=) can be specified and the where can include only the name column. This MAY be due to the shift from SQL to XML for storage of this information after some point as described in the stackoverflow thread above. And this is confirmed using adb shell and executing: content query --uri content://settings/global --projection name:value --where "name like 'mobile_data%'" --sort "name ASC" which throws the exception. |
My phone is on Android 9 and is rooted, not that I think this should make any difference.
I had hoped this app would be more useful than the Content Provider viewer app I have been using for years - mostly due to the inclusion of filtering in the content provider queries. However, none of my attempts to use querying have succeeded. No matter what the query, I get something like this:
The text was updated successfully, but these errors were encountered: