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

not support for queryIntentActivities(Intent intent, ResolveInfoFlags flags) of Android 13 #8215

Closed
qq549631030 opened this issue May 16, 2023 · 4 comments · Fixed by #8409
Closed

Comments

@qq549631030
Copy link
Contributor

Description

when calling packageManager.queryIntentActivities(intent, ResolveInfoFlags.of(PackageManager.MATCH_DEFAULT_ONLY)) on Android 13,it is fail

Caused by: java.lang.UnsupportedOperationException: sorry, not supporting public abstract android.content.pm.ParceledListSlice android.content.pm.IPackageManager.queryIntentActivities(android.content.Intent,java.lang.String,long,int) throws android.os.RemoteException yet!
	at org.robolectric.shadows.ShadowActivityThread$1.invoke(ShadowActivityThread.java:89)
	at jdk.proxy4/jdk.proxy4.$Proxy82.queryIntentActivities(Unknown Source)
	at android.app.ApplicationPackageManager.queryIntentActivitiesAsUser(ApplicationPackageManager.java:1432)
	at android.app.ApplicationPackageManager.queryIntentActivities(ApplicationPackageManager.java:1417)

Steps to Reproduce

just call packageManager.queryIntentActivities(intent, ResolveInfoFlags.of(PackageManager.MATCH_DEFAULT_ONLY)) on Android 13

Robolectric & Android Version

robolectric 4.10.2

Link to a public git repo demonstrating the problem:

none

@utzcoz
Copy link
Member

utzcoz commented Jun 2, 2023

I think it needs an extra support at ShadowActivityThread#getPackageManager. @qq549631030 Would you like to send a PR to support it?

@qq549631030
Copy link
Contributor Author

here is the PR 8409

@mikehardy
Copy link

I just bumped into this! Thank you @qq549631030 for logging it and for a PR, and @utzcoz for the responsive review, magnificent. Looking forward to the next release

mikehardy added a commit to mikehardy/Anki-Android that referenced this issue Aug 18, 2023
@utzcoz
Copy link
Member

utzcoz commented Aug 19, 2023

@mikehardy @qq549631030 You can check 4.11 snapshot to check it resolves your issues.

david-allison pushed a commit to ankidroid/Anki-Android that referenced this issue Aug 25, 2023
mikehardy added a commit to ankidroid/Anki-Android that referenced this issue Aug 25, 2023
n1snt pushed a commit to n1snt/Anki-Android that referenced this issue Sep 7, 2023
mikunimaru pushed a commit to mikunimaru/Anki-Android that referenced this issue Sep 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants