Coffee
Coffee copied to clipboard
Stops working as assistant app
I think coffee is causing the bug because I haven't ran into it while using other assistant apps. Please let me know if there's a logged event you'd be looking for to reproduce the bug. The bug occurs after couple of hours of being set as the default assistant app.
Steps to reproduce the behavior:
- Select as default assistant app.
- Use gestures to activate/deactivate coffee.
- Works initially, indicated by toast & notification.
- Assistant gesture still flashes the screen but toast & notification don't occur.
- Only way to get coffee to work as assistant again is to deselect/reselect it as default assistant app.
Additional context
- Device: Lineage OS
- Android version: 13
Is result code -92 expected? Checking the logs when it doesn't launch properly yields the following:
ActivityTaskManager(1748): START u0 {act=android.intent.action.ASSIST flg=0x10000000 cmp=com.github.muellerma.coffee/.InteractionService (has extras)} with LAUNCH_MULTIPLE from uid 10361 result code=-92
I'm able to reproduce the bug whenever I restart my device (without the arbitrary wait time). If coffee is set as assistant it never works via assistant calls upon restart. Only way to make it work as assistant app again is setting assistant to another app/none, then setting it as coffee again.
When I implemented this feature I didn't find a lot of documentation for this. It worked on my device, but after an update it didn't work at all. I didn't spend a lot of time in fixing it, but I'd review PRs improving the situation.