[PR #3069] [MERGED] [PM-6726][PM-6752] Fix for Android 14 devices crashing when using the Tiles #56757

Closed
opened 2026-05-10 19:46:47 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/bitwarden/android/pull/3069
Author: @dinisvieira
Created: 3/9/2024
Status: Merged
Merged: 3/11/2024
Merged by: @fedemkr

Base: mainHead: bug/fix-tile-service-crashing-android14


📝 Commits (4)

  • bb73c94 Fix for Android 14 devices crashing when using the TileService.
  • 7a6e440 Shared StartActivityAndCollapseFromTileService in AndroidHelpers
  • 9d1f05f Update src/App/Platforms/Android/Utilities/AndroidHelpers.cs
  • 78f8f9d Updated name of StartActivityAndCollapseWithIntent method name used by TileService

📊 Changes

5 files changed (+31 additions, -22 deletions)

View changed files

📝 src/App/Platforms/Android/Autofill/AutofillHelpers.cs (+1 -1)
📝 src/App/Platforms/Android/Tiles/AutofillTileService.cs (+2 -1)
📝 src/App/Platforms/Android/Tiles/GeneratorTileService.cs (+3 -10)
📝 src/App/Platforms/Android/Tiles/MyVaultTileService.cs (+3 -10)
📝 src/App/Platforms/Android/Utilities/AndroidHelpers.cs (+22 -0)

📄 Description

Type of change

  • Bug fix
  • New feature development
  • Tech debt (refactoring, code cleanup, dependency upgrades, etc)
  • Build/deploy pipeline (DevOps)
  • Other

Objective

When using Android Tiles on Android 14+ the TileService crashes.

Code changes

Android now requires that TileServices using PendingIntent instead of Intent for StartActivityAndCollapse()
Doing this change avoids the crash. We still keep the "old" Intent code for older versions of Android.

There was also a background crash on AccessibilityService due to a PendingIntent being mutable which also seems to no longer being allowed in Android14 for that specific scenario.

  • AutofillTileService.cs: Added if scenario for Android 14 to use PendingIntent instead of Intent.
  • MyVaultTileService.cs: Added if scenario for Android 14 to use PendingIntent instead of Intent
  • GeneratorTileService.cs: Added if scenario for Android 14 to use PendingIntent instead of Intent
  • AutofillHelpers.cs: Changed InlinePresentationBuilder PendingItent to be Immutable to avoid crash in Android 14

Before you submit

  • Please check for formatting errors (dotnet format --verify-no-changes) (required)
  • Please add unit tests where it makes sense to do so (encouraged but not required)
  • If this change requires a documentation update - notify the documentation team
  • If this change has particular deployment requirements - notify the DevOps team

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/bitwarden/android/pull/3069 **Author:** [@dinisvieira](https://github.com/dinisvieira) **Created:** 3/9/2024 **Status:** ✅ Merged **Merged:** 3/11/2024 **Merged by:** [@fedemkr](https://github.com/fedemkr) **Base:** `main` ← **Head:** `bug/fix-tile-service-crashing-android14` --- ### 📝 Commits (4) - [`bb73c94`](https://github.com/bitwarden/android/commit/bb73c940aed4a834b6cce7e8a71cc0e347143fa2) Fix for Android 14 devices crashing when using the TileService. - [`7a6e440`](https://github.com/bitwarden/android/commit/7a6e440cfcc7909f71fbef0e5896f2919addb3c1) Shared StartActivityAndCollapseFromTileService in AndroidHelpers - [`9d1f05f`](https://github.com/bitwarden/android/commit/9d1f05f89c938ff3fa22b371d2e9cee00bf678ea) Update src/App/Platforms/Android/Utilities/AndroidHelpers.cs - [`78f8f9d`](https://github.com/bitwarden/android/commit/78f8f9de045b8fc6077a4199671922e901cb8e34) Updated name of StartActivityAndCollapseWithIntent method name used by TileService ### 📊 Changes **5 files changed** (+31 additions, -22 deletions) <details> <summary>View changed files</summary> 📝 `src/App/Platforms/Android/Autofill/AutofillHelpers.cs` (+1 -1) 📝 `src/App/Platforms/Android/Tiles/AutofillTileService.cs` (+2 -1) 📝 `src/App/Platforms/Android/Tiles/GeneratorTileService.cs` (+3 -10) 📝 `src/App/Platforms/Android/Tiles/MyVaultTileService.cs` (+3 -10) 📝 `src/App/Platforms/Android/Utilities/AndroidHelpers.cs` (+22 -0) </details> ### 📄 Description ## Type of change - [x] Bug fix - [ ] New feature development - [ ] Tech debt (refactoring, code cleanup, dependency upgrades, etc) - [ ] Build/deploy pipeline (DevOps) - [ ] Other ## Objective When using Android Tiles on Android 14+ the TileService crashes. ## Code changes Android now requires that TileServices using `PendingIntent` instead of Intent for `StartActivityAndCollapse()` Doing this change avoids the crash. We still keep the "old" Intent code for older versions of Android. There was also a background crash on AccessibilityService due to a PendingIntent being mutable which also seems to no longer being allowed in Android14 for that specific scenario. * **AutofillTileService.cs:** Added if scenario for Android 14 to use `PendingIntent` instead of `Intent`. * **MyVaultTileService.cs:** Added if scenario for Android 14 to use `PendingIntent` instead of `Intent` * **GeneratorTileService.cs:** Added if scenario for Android 14 to use `PendingIntent` instead of `Intent` * **AutofillHelpers.cs:** Changed InlinePresentationBuilder PendingItent to be Immutable to avoid crash in Android 14 ## Before you submit - Please check for formatting errors (`dotnet format --verify-no-changes`) (required) - Please add **unit tests** where it makes sense to do so (encouraged but not required) - If this change requires a **documentation update** - notify the documentation team - If this change has particular **deployment requirements** - notify the DevOps team --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-05-10 19:46:47 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/android#56757