Commit 12e7b65
committed
Fixed|Changed(SmsInboxAPI)!: Fix exception for message address/from selection and use exact match
SQL does not seem to consider `?` placeholders if inside quotes.
```
java.lang.IllegalArgumentException: Cannot bind argument at index 1 because the index is out of range. The statement has 0 parameters.
at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:172)
at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:142)
at android.content.ContentProviderProxy.query(ContentProviderNative.java:472)
at android.content.ContentResolver.query(ContentResolver.java:1183)
at android.content.ContentResolver.query(ContentResolver.java:1115)
at android.content.ContentResolver.query(ContentResolver.java:1071)
at com.termux.api.apis.SmsInboxAPI.getAllSms(SmsInboxAPI.java:302)
```
Exact match is used by default so that only exactly matched entries are returned, users can use `%` wildcards in the address passed if they want to do prefix/contains/suffix matching.
- https://www.w3schools.com/sql/sql_like.asp1 parent 1b60b23 commit 12e7b65
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
292 | 292 | | |
293 | 293 | | |
294 | 294 | | |
295 | | - | |
| 295 | + | |
296 | 296 | | |
297 | 297 | | |
298 | 298 | | |
| |||
0 commit comments