Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create the transient channel used for upload notification when notifications are disabled #20168

Conversation

antonis
Copy link

@antonis antonis commented Feb 9, 2024

Fixes #18495

Description

This PR creates the transient notification channel used for upload notification events when notifications are disabled.


To Test:

  1. Set the shouldShowNotifications method to return false (you ca use this patch
    disablenotifications.patch)
  2. Remove the WordPress app from your device if installed
  3. Compile and run the WordPress app
  4. Log in
  5. Create a post
  6. Add a video
  7. Verify that the app does not crash
  8. Verify that the video uploads correctly

Regression Notes

  1. Potential unintended areas of impact

    • Notification services
  2. What I did to test those areas of impact (or what existing automated tests I relied on)

    • Manual testing
  3. What automated tests I added (or what prevented me from doing so)

    • I couldn't find a meaningful way to test this part of the code

PR Submission Checklist:

  • I have completed the Regression Notes.
  • I have considered adding accessibility improvements for my changes.
  • I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.

Testing Checklist:

  • WordPress.com sites and self-hosted Jetpack sites.
  • Portrait and landscape orientations.
  • Light and dark modes.
  • Fonts: Larger, smaller and bold text.
  • High contrast.
  • Talkback.
  • Languages with large words or with letters/accents not frequently used in English.
  • Right-to-left languages. (Even if translation isn’t complete, formatting should still respect the right-to-left layout)
  • Large and small screen sizes. (Tablet and smaller phones)
  • Multi-tasking: Split screen and Pop-up view. (Android 10 or higher)

@wpmobilebot
Copy link
Contributor

wpmobilebot commented Feb 9, 2024

Jetpack📲 You can test the changes from this Pull Request in Jetpack by scanning the QR code below to install the corresponding build.
App NameJetpack Jetpack
FlavorJalapeno
Build TypeDebug
Versionpr20168-07d89b5
Commit07d89b5
Direct Downloadjetpack-prototype-build-pr20168-07d89b5.apk
Note: Google Login is not supported on these builds.

@wpmobilebot
Copy link
Contributor

wpmobilebot commented Feb 9, 2024

WordPress📲 You can test the changes from this Pull Request in WordPress by scanning the QR code below to install the corresponding build.
App NameWordPress WordPress
FlavorJalapeno
Build TypeDebug
Versionpr20168-07d89b5
Commit07d89b5
Direct Downloadwordpress-prototype-build-pr20168-07d89b5.apk
Note: Google Login is not supported on these builds.

Copy link

codecov bot commented Feb 9, 2024

Codecov Report

Attention: 45 lines in your changes are missing coverage. Please review.

Comparison is base (b52d837) 40.21% compared to head (07d89b5) 40.20%.

Files Patch % Lines
.../main/java/org/wordpress/android/AppInitializer.kt 0.00% 45 Missing ⚠️
Additional details and impacted files
@@               Coverage Diff                @@
##           release/24.2   #20168      +/-   ##
================================================
- Coverage         40.21%   40.20%   -0.01%     
================================================
  Files              1469     1469              
  Lines             67568    67584      +16     
  Branches          11191    11196       +5     
================================================
  Hits              27174    27174              
- Misses            37902    37918      +16     
  Partials           2492     2492              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@antonis antonis marked this pull request as ready for review February 9, 2024 14:11
@dangermattic
Copy link
Collaborator

dangermattic commented Feb 9, 2024

1 Warning
⚠️ This PR is assigned to the milestone 24.2 ❄️. The due date for this milestone has already passed.
Please make sure to get it merged by then or assign it to a milestone with a later deadline.

Generated by 🚫 Danger

@peril-wordpress-mobile
Copy link

Warnings
⚠️ This PR is assigned to a milestone which is closing in less than 4 days Please, make sure to get it merged by then or assign it to a later expiring milestone

Generated by 🚫 dangerJS

Copy link
Contributor

@mkevins mkevins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work fixing this Antonis! The code makes sense (thanks for leaving a comment about the rationale for the version specific logic).

I tested this on a Pixel 3a (emulated device) with API 33, first by reproducing the issue on release/24.2 via these steps, and then confirming that these changes fixed the issue. 👍

@mkevins mkevins merged commit db61f3b into release/24.2 Feb 11, 2024
23 of 24 checks passed
@mkevins mkevins deleted the fix/18495-CannotPostForegroundServiceNotificationException branch February 11, 2024 23:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants