Import upstream Android Auto messaging notification support - #2
Closed
michaave wants to merge 2 commits into
Closed
Conversation
🚀 Features & Improvements • Unified Messaging Style: Migrated all chat notifications (including images) to use NotificationCompat.MessagingStyle. This ensures that text and image messages from the same conversation are correctly stacked in the notification shade and work seamlessly with Android Auto. • Efficient Avatar Loading: Optimized the notification flow by loading the sender's profile picture once and reusing it for the notification style, the large icon, and the conversation shortcut. • Image Previews in Conversations: Implemented a secure mechanism to share image previews in MessagingStyle by saving them to a temporary cache and sharing them via FileProvider. • Modern Conversation Shortcuts: Enhanced the pushConversationShortcut logic to include the sender's avatar, improving the "People" integration in Android 11+. 🛡️ Security • PendingIntent Hardening: Performed a security audit and updated all PendingIntent flags to FLAG_IMMUTABLE by default. FLAG_MUTABLE is now only used where strictly necessary (e.g., for direct replies from notifications). 🧹 Code Quality • Refactoring: Consolidated duplicate styling logic into a single styleConversationNotification function. • Cleanup: Removed obsolete styling methods and unused imports. • Static Analysis: Verified all changes with ktlint and detekt. Added necessary suppressions for legacy complexity in NotificationWorker.kt to ensure a clean build. AI-assistant: Gemini 2.0 Flash (plan: Gemini 2.0 Flash, edit: Gemini 2.0 Flash) Signed-off-by: rapterjet2004 <juliuslinus1@gmail.com>
Signed-off-by: rapterjet2004 <juliuslinus1@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Imported successfully into
android-autovia a three-way patch in commit5af798b96b979640383805dbf941ed344686b6b4. Closing this helper PR because its changes are now present without rolling back newer upstream Talk changes.