Use proper "limit" param in call log queries starting from Android 8.1

This commit is contained in:
xynngh 2021-07-31 21:48:53 +04:00
parent 1d6e475eb5
commit 5b377d8238
2 changed files with 5 additions and 1 deletions

View File

@ -22,6 +22,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Updated Hebrew translation thanks to Tzvika ([@shiloni](https://hosted.weblate.org/user/shiloni/)). - Updated Hebrew translation thanks to Tzvika ([@shiloni](https://hosted.weblate.org/user/shiloni/)).
- Updated Slovenian translation thanks to bojanopatje (@bojanopatje). - Updated Slovenian translation thanks to bojanopatje (@bojanopatje).
### Fixed
- Fixed a startup crash on [a recent update](https://review.lineageos.org/c/LineageOS/android_packages_providers_ContactsProvider/+/313438/) of LineageOS 15.1-17.1 (introduced in [0.5.7](#057-2020-10-02)).
## [0.5.15] - 2021-06-07 ## [0.5.15] - 2021-06-07

View File

@ -47,7 +47,7 @@ public class CallLogHelper {
String sortOrder = CallLog.Calls.DATE + " " + (reverseOrder ? "ASC" : "DESC"); String sortOrder = CallLog.Calls.DATE + " " + (reverseOrder ? "ASC" : "DESC");
// should probably work since JELLY_BEAN_MR1 // should probably work since JELLY_BEAN_MR1
if (Build.VERSION.SDK_INT > Build.VERSION_CODES.Q) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O_MR1) {
uri = uri.buildUpon() uri = uri.buildUpon()
.appendQueryParameter(CallLog.Calls.LIMIT_PARAM_KEY, String.valueOf(limit)) .appendQueryParameter(CallLog.Calls.LIMIT_PARAM_KEY, String.valueOf(limit))
.build(); .build();