Skip to content
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

fix(call-log): Fix query call log raise Exception #440

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

@KunoiSayami KunoiSayami marked this pull request as ready for review August 23, 2021 15:39
@thunder-coding
Copy link
Member

I have no idea how this works, probably you can review this @Grimler91

@ghost
Copy link

ghost commented Oct 28, 2021

There is a number of identical statements under if block for APIs >= Build.VERSION_CODES.O and others. I guess it would be better to refactor code in way that would allow reuse them and keep under conditional only parts that differ.

@KunoiSayami
Copy link
Author

I guess it would be better to refactor code in way that would allow reuse them and keep under conditional only parts that differ.

I tried by I failed, maybe you will have a better way to refactor it

@Grimler91
Copy link
Member

The offset parameter doesn't work with this implementation, and there is an issue with the sort descending arg:

11-21 14:15:43.872  9470  9510 W Bundle  : Attempt to cast generated internal exception:
11-21 14:15:43.872  9470  9510 W Bundle  : java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.String
11-21 14:15:43.872  9470  9510 W Bundle  : 	at android.os.BaseBundle.getString(BaseBundle.java:1199)
11-21 14:15:43.872  9470  9510 W Bundle  : 	at android.content.ContentProvider.query(ContentProvider.java:1470)
11-21 14:15:43.872  9470  9510 W Bundle  : 	at android.content.ContentProvider$Transport.query(ContentProvider.java:278)
11-21 14:15:43.872  9470  9510 W Bundle  : 	at android.content.ContentProviderNative.onTransact(ContentProviderNative.java:106)
11-21 14:15:43.872  9470  9510 W Bundle  : 	at android.os.Binder.execTransactInternal(Binder.java:1159)
11-21 14:15:43.872  9470  9510 W Bundle  : 	at android.os.Binder.execTransact(Binder.java:1123)

For the latter, maybe QUERY_ARG_SORT_COLUMNS should be used instead of QUERY_ARG_SQL_SORT_ORDER.

I've played around with it but haven't managed to solve the offset issue, yet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

termux-call-log doesn't work
3 participants