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

Fixes: ActivityNotFoundException for camera #20744

Merged
merged 1 commit into from
May 2, 2024
Merged

Fixes: ActivityNotFoundException for camera #20744

merged 1 commit into from
May 2, 2024

Conversation

pantstamp
Copy link
Contributor

@pantstamp pantstamp commented May 1, 2024

Fixes #20279

This PR tries to fix the crash reported in this Sentry issue.

This seems to be a minor crash that occurs when a device is trying to launch camera but it cannot access it.

Adds a onCameraError(String errorMessage); function in the interface LaunchCameraCallback that can be used also with other camera related errors in the future.


To Test:

  1. Check the code
  2. Try to launch camera and take a photo from the following screens and verify that everything works as it should
    MediaBrowserActivity
    MediaPickerActivity
    PhotoPickerActivity
    EditPostActivity

Regression Notes

  1. Potential unintended areas of impact

    • N/A
  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)

    • Relied on the existing tests

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 (strike-out the not-applying and unnecessary ones):

  • 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)

@pantstamp pantstamp added this to the 24.9 milestone May 1, 2024
@pantstamp pantstamp requested a review from zwarm May 1, 2024 14:31
@dangermattic
Copy link
Collaborator

1 Warning
⚠️ strings.xml files should only be updated on release branches, when the translations are downloaded by our automation.

Generated by 🚫 Danger

Copy link

sonarqubecloud bot commented May 1, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@wpmobilebot
Copy link
Contributor

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
Versionpr20744-02b6100
Commit02b6100
Direct Downloadjetpack-prototype-build-pr20744-02b6100.apk
Note: Google Login is not supported on these builds.

@wpmobilebot
Copy link
Contributor

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
Versionpr20744-02b6100
Commit02b6100
Direct Downloadwordpress-prototype-build-pr20744-02b6100.apk
Note: Google Login is not supported on these builds.

Copy link

codecov bot commented May 1, 2024

Codecov Report

Attention: Patch coverage is 0% with 3 lines in your changes are missing coverage. Please review.

Project coverage is 40.62%. Comparing base (3be32da) to head (02b6100).

Files Patch % Lines
.../java/org/wordpress/android/util/WPMediaUtils.java 0.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##            trunk   #20744      +/-   ##
==========================================
- Coverage   40.62%   40.62%   -0.01%     
==========================================
  Files        1489     1489              
  Lines       68531    68533       +2     
  Branches    11326    11327       +1     
==========================================
  Hits        27841    27841              
- Misses      38161    38163       +2     
  Partials     2529     2529              

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

@zwarm zwarm self-assigned this May 2, 2024
Copy link
Contributor

@zwarm zwarm left a comment

Choose a reason for hiding this comment

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

👍 All is working as expected. I did not experience any issues with camera launch. Thanks @pantstamp

@zwarm zwarm merged commit f079c77 into trunk May 2, 2024
20 of 26 checks passed
@zwarm zwarm deleted the issue/20279 branch May 2, 2024 12:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants