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 device controls crashing System UI on long press #2513

Merged

Conversation

jpelgrom
Copy link
Member

@jpelgrom jpelgrom commented May 9, 2022

Summary

Fixes #2251 (the functionality, not the System UI crash)

I've commented on the reason for these changes on the Google issue tracker, but the short version is: due to a security-related change the app needs to provide unique, mutable PendingIntents to the system for the device control app intents.

Tested on a device with Android 11 + an emulator with Android 12 on the November 2021 security patch (to make sure controls still work as they did before on those versions), as well as a device with Android 12 on the May 2022 security patch (to see if the changes 'fix' the issue).

Screenshots

n/a

Link to pull request in Documentation repository

n/a

Any other notes

@dshokouhi
Copy link
Member

I think this should also fix #2287 right?

@jpelgrom
Copy link
Member Author

jpelgrom commented May 9, 2022

I think this should also fix #2287 right?

It probably fixes the crash but this line for performControlAction was still missing in the logs, right? This change shouldn't affect the commands.

But still worth trying to see if it solves the issue :)

@TheDevFreak
Copy link

If it helps at all, just tested this on Android 13 Beta 1 and it works. 🎉

@JBassett JBassett merged commit 658f363 into home-assistant:master May 14, 2022
@jpelgrom jpelgrom deleted the controls-unique-pendingintent branch May 14, 2022 18:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

System UI crash when opening/using device controls
5 participants