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

Closed
opened 2025-11-26 23:39:33 -06:00 by GiteaMirror · 0 comments
Owner

Original Pull Request: https://github.com/bitwarden/android/pull/3069

State: closed
Merged: Yes


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
**Original Pull Request:** https://github.com/bitwarden/android/pull/3069 **State:** closed **Merged:** Yes --- ## 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
GiteaMirror added the pull-request label 2025-11-26 23:39:33 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/android#4005