android
android copied to clipboard
Use Adaptive Icon in shortcuts
Summary
This PR is making sure we use the AdaptiveIcon in shortcuts, it probably doesn't fix the issue https://github.com/home-assistant/android/issues/5295 like it is describe in this comment https://github.com/home-assistant/android/issues/5295#issuecomment-2991367949.
Checklist
- [ ] New or updated tests have been added to cover the changes following the testing guidelines.
- [x] The code follows the project's code style and best_practices.
- [x] The changes have been thoroughly tested, and edge cases have been considered.
- [x] Changes are backward compatible whenever feasible. Any breaking changes are documented in the changelog for users and/or in the code for developers depending on the relevance.
Screenshots
With dynamic theme enabled for the icon it only works icons that uses resources and not Bitmap.
Any other notes
Users will have to update the shortcuts for this to take effect, since the Icon are created with a dynamic Bitmap, they needs to be re-created to get the Adaptive ones.
I migrate to the compat library so that I don't have to add another edge case to use Icon.createWithAdaptiveBitmap