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

Fix camera permission issue #18290

Merged
merged 3 commits into from
Apr 24, 2023
Merged

Fix camera permission issue #18290

merged 3 commits into from
Apr 24, 2023

Conversation

irfano
Copy link
Member

@irfano irfano commented Apr 20, 2023

This fixes recording video for a post. All places using Camera permission now use PermissionUtils class from WordPress-Utils library.

The issue was fixed on the WordPress-Utils PR, and this PR updates the WordPress-Utils library for the fix.

Internal discussion: pcdRpT-2lO-p2#comment-4158

To test:
All these test cases should be done on Android 13, Android 11, Android 10, and a lower version than Android 10.

Warning
It's not working on Android 12. It's a known issue and was not introduced with #18183

If you know any screen missing from these instructions, please test them as well.

Media Browser

  1. Launch the JP app. (clean install)
  2. Navigate to "My Site → Media".
  3. Tap "Take video" and allow permissions.
  4. Record a video and add it to the list.
  5. Ensure your video is added to the screen.

Media Picker

  1. Launch the JP app. (clean install)
  2. Create a blog post.
  3. Add a Video block.
  4. Tap on the block and tap "Take a video".
  5. Allow permissions.
  6. Record a video and add it to the post.
  7. Ensure your video is added to the post.

Story

  1. Launch the JP app.
  2. Tap the green floating button at the bottom of the screen.
  3. Tap "Story post". If you see a popup, tap Create Post button to continue.
  4. Allow permissions and ensure you can see your media on the device.
  5. Tap the green camera button.
  6. Record a video and publish it.
  7. Ensure it doesn't crash and your story is posted.

Regression Notes

  1. Potential unintended areas of impact
    All features use camera permissions.

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

  3. What automated tests I added (or what prevented me from doing so)
    This does not introduce a new feature, and we don't cover permissions in UI 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.

UI Changes testing checklist:

  • 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 Apr 20, 2023

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
Versionpr18290-d2d18da
Commitd2d18da
Direct Downloadjetpack-prototype-build-pr18290-d2d18da.apk
Note: Google Login is not supported on these builds.

@wpmobilebot
Copy link
Contributor

wpmobilebot commented Apr 20, 2023

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
Versionpr18290-d2d18da
Commitd2d18da
Direct Downloadwordpress-prototype-build-pr18290-d2d18da.apk
Note: Google Login is not supported on these builds.

@irfano irfano marked this pull request as ready for review April 20, 2023 10:47
@irfano irfano requested a review from ravishanker April 20, 2023 10:47
@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

@wpmobilebot
Copy link
Contributor

Found 1 violations:

The PR caused the following dependency changes:

-\--- org.wordpress:utils:{strictly 3.6.0} -> 3.6.0
+\--- org.wordpress:utils:{strictly 3.6.1} -> 3.6.1

Please review and act accordingly

@irfano
Copy link
Member Author

irfano commented Apr 21, 2023

@ravishanker, could you please review this for the 22.2 release?
@oguzkocer, I hope we're not too late to include this fix in 22.2.

@oguzkocer
Copy link
Contributor

@oguzkocer, I hope we're not too late to include this fix in 22.2.

We are not, but it'd be great to prioritize its review so we can ship the changes with a new beta as soon as we can.

@ovitrif ovitrif self-requested a review April 24, 2023 12:53
Copy link
Contributor

@antonis antonis 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 @irfano 👍
I've tested the implementation using a CI build on a Pixel 5 (Android 13) and worked as expected for me. The code changes also look good 🎉

ps. I bumped into an issue with stories but I was able to reproduce it on 22.1 and should not be related with the changes introduced here.

Copy link
Contributor

@ovitrif ovitrif left a comment

Choose a reason for hiding this comment

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

Works on my machine 👍🏻 . Except in emulators, for some reason it only works on Android 13 for me there but I don't expect folks to use the app from an emulator 😅

@irfano
Copy link
Member Author

irfano commented Apr 24, 2023

Works on my machine 👍🏻 . Except in emulators, for some reason it only works on Android 13 for me there but I don't expect folks to use the app from an emulator 😅

Thank you! I want to mention that it works on my emulators. It must be an issue related to your emulator.

@irfano irfano merged commit 68335b7 into release/22.2 Apr 24, 2023
@irfano irfano deleted the fix/camera-permission-issue branch April 24, 2023 14:04
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.

5 participants