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

Update camerax to 1.3.4 and fix the API change, which deprecates setTargetSolution #21004

Merged
merged 1 commit into from
Jun 21, 2024

Conversation

notandyvee
Copy link
Contributor

@notandyvee notandyvee commented Jun 18, 2024

Reference: #20998

This PR updates the camerax library from 1.2.3 to 1.3.4. Unfortunately there was a small breaking change. setTargetSolution is being deprecated. This PR makes the update to use setResolutionSelector, which was introduced in the 1.3. I set reasonable defaults that make the scanning QR code to login with the app work.

To Test:

In order to test, you need an account that does not have 2FA.

  • Login with that non-2fa account on mobile.
  • On web, while logged out, select "Login via app".
  • On your phone go to: Me -> ScanLogin Code
  • Scanning the QR code should work and allow you to login on web without entering your email or password.

Regression Notes

  1. Potential unintended areas of impact

    Using the camera

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

    Manual test

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

    N/A


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.

Copy link

sonarcloud bot commented Jun 18, 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

Found 1 violations:

The PR caused some dependency changes (expand to see details)

-+--- androidx.camera:camera-camera2:1.2.3
-|    +--- androidx.annotation:annotation:1.2.0 -> 1.6.0 (*)
-|    +--- androidx.camera:camera-core:1.2.3
-|    |    +--- androidx.annotation:annotation:1.2.0 -> 1.6.0 (*)
-|    |    +--- androidx.annotation:annotation-experimental:1.1.0 -> 1.3.1 (*)
-|    |    +--- androidx.concurrent:concurrent-futures:1.0.0 -> 1.1.0 (*)
-|    |    +--- androidx.core:core:1.1.0 -> 1.12.0 (*)
-|    |    +--- androidx.exifinterface:exifinterface:1.3.2 -> 1.3.6 (*)
-|    |    +--- androidx.lifecycle:lifecycle-common:2.1.0 -> 2.6.2 (*)
-|    |    +--- androidx.lifecycle:lifecycle-livedata:2.1.0 -> 2.6.2 (*)
-|    |    +--- com.google.auto.value:auto-value-annotations:1.6.3
-|    |    +--- com.google.guava:listenablefuture:1.0 -> 9999.0-empty-to-avoid-conflict-with-guava
-|    |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.7.20 -> 1.9.22 (*)
-|    +--- androidx.concurrent:concurrent-futures:1.0.0 -> 1.1.0 (*)
-|    +--- androidx.core:core:1.1.0 -> 1.12.0 (*)
-|    +--- com.google.auto.value:auto-value-annotations:1.6.3
-|    \--- com.google.guava:listenablefuture:1.0 -> 9999.0-empty-to-avoid-conflict-with-guava
++--- androidx.camera:camera-camera2:1.3.4
+|    +--- androidx.annotation:annotation:1.2.0 -> 1.6.0 (*)
+|    +--- androidx.camera:camera-core:1.3.4
+|    |    +--- androidx.annotation:annotation:1.2.0 -> 1.6.0 (*)
+|    |    +--- androidx.annotation:annotation-experimental:1.1.0 -> 1.3.1 (*)
+|    |    +--- androidx.concurrent:concurrent-futures:1.0.0 -> 1.1.0 (*)
+|    |    +--- androidx.core:core:1.1.0 -> 1.12.0 (*)
+|    |    +--- androidx.exifinterface:exifinterface:1.3.2 -> 1.3.6 (*)
+|    |    +--- androidx.lifecycle:lifecycle-common:2.1.0 -> 2.6.2 (*)
+|    |    +--- androidx.lifecycle:lifecycle-livedata:2.1.0 -> 2.6.2 (*)
+|    |    +--- com.google.auto.value:auto-value-annotations:1.6.3
+|    |    +--- com.google.guava:listenablefuture:1.0 -> 9999.0-empty-to-avoid-conflict-with-guava
+|    |    +--- org.jetbrains.kotlin:kotlin-stdlib:1.8.22 -> 1.9.22 (*)
+|    |    +--- androidx.camera:camera-camera2:1.3.4 (c)
+|    |    +--- androidx.camera:camera-lifecycle:1.3.4 (c)
+|    |    +--- androidx.camera:camera-video:1.3.4 (c)
+|    |    \--- androidx.camera:camera-view:1.3.4 (c)
+|    +--- androidx.concurrent:concurrent-futures:1.0.0 -> 1.1.0 (*)
+|    +--- androidx.core:core:1.1.0 -> 1.12.0 (*)
+|    +--- com.google.auto.value:auto-value-annotations:1.6.3
+|    +--- com.google.guava:listenablefuture:1.0 -> 9999.0-empty-to-avoid-conflict-with-guava
+|    +--- androidx.camera:camera-core:1.3.4 (c)
+|    +--- androidx.camera:camera-lifecycle:1.3.4 (c)
+|    +--- androidx.camera:camera-view:1.3.4 (c)
+|    \--- androidx.camera:camera-video:1.3.4 (c)
-+--- androidx.camera:camera-lifecycle:1.2.3
-|    +--- androidx.camera:camera-core:1.2.3 (*)
-|    +--- androidx.concurrent:concurrent-futures:1.0.0 -> 1.1.0 (*)
-|    +--- androidx.core:core:1.1.0 -> 1.12.0 (*)
-|    +--- androidx.lifecycle:lifecycle-common:2.1.0 -> 2.6.2 (*)
-|    +--- com.google.auto.value:auto-value-annotations:1.6.3
-|    \--- com.google.guava:listenablefuture:1.0 -> 9999.0-empty-to-avoid-conflict-with-guava
++--- androidx.camera:camera-lifecycle:1.3.4
+|    +--- androidx.camera:camera-core:1.3.4 (*)
+|    +--- androidx.concurrent:concurrent-futures:1.0.0 -> 1.1.0 (*)
+|    +--- androidx.core:core:1.1.0 -> 1.12.0 (*)
+|    +--- androidx.lifecycle:lifecycle-common:2.1.0 -> 2.6.2 (*)
+|    +--- com.google.auto.value:auto-value-annotations:1.6.3
+|    +--- com.google.guava:listenablefuture:1.0 -> 9999.0-empty-to-avoid-conflict-with-guava
+|    +--- androidx.camera:camera-camera2:1.3.4 (c)
+|    +--- androidx.camera:camera-core:1.3.4 (c)
+|    +--- androidx.camera:camera-view:1.3.4 (c)
+|    \--- androidx.camera:camera-video:1.3.4 (c)
-\--- androidx.camera:camera-view:1.2.3
-     +--- androidx.annotation:annotation:1.2.0 -> 1.6.0 (*)
-     +--- androidx.annotation:annotation-experimental:1.1.0 -> 1.3.1 (*)
-     +--- androidx.appcompat:appcompat:1.1.0 -> 1.6.1 (*)
-     +--- androidx.camera:camera-core:1.2.3 (*)
-     +--- androidx.camera:camera-lifecycle:1.2.3 (*)
-     +--- androidx.concurrent:concurrent-futures:1.0.0 -> 1.1.0 (*)
-     +--- androidx.core:core:1.3.2 -> 1.12.0 (*)
-     +--- androidx.lifecycle:lifecycle-common:2.0.0 -> 2.6.2 (*)
-     +--- com.google.auto.value:auto-value-annotations:1.6.3
-     \--- com.google.guava:listenablefuture:1.0 -> 9999.0-empty-to-avoid-conflict-with-guava
+\--- androidx.camera:camera-view:1.3.4
+     +--- androidx.annotation:annotation:1.2.0 -> 1.6.0 (*)
+     +--- androidx.annotation:annotation-experimental:1.3.1 (*)
+     +--- androidx.appcompat:appcompat:1.1.0 -> 1.6.1 (*)
+     +--- androidx.camera:camera-core:1.3.4 (*)
+     +--- androidx.camera:camera-lifecycle:1.3.4 (*)
+     +--- androidx.camera:camera-video:1.3.4
+     |    +--- androidx.annotation:annotation:1.2.0 -> 1.6.0 (*)
+     |    +--- androidx.camera:camera-core:1.3.4 (*)
+     |    +--- androidx.concurrent:concurrent-futures:1.0.0 -> 1.1.0 (*)
+     |    +--- androidx.core:core:1.1.0 -> 1.12.0 (*)
+     |    +--- com.google.auto.value:auto-value-annotations:1.6.3
+     |    +--- androidx.camera:camera-camera2:1.3.4 (c)
+     |    +--- androidx.camera:camera-core:1.3.4 (c)
+     |    +--- androidx.camera:camera-lifecycle:1.3.4 (c)
+     |    \--- androidx.camera:camera-view:1.3.4 (c)
+     +--- androidx.concurrent:concurrent-futures:1.0.0 -> 1.1.0 (*)
+     +--- androidx.core:core:1.3.2 -> 1.12.0 (*)
+     +--- androidx.lifecycle:lifecycle-common:2.0.0 -> 2.6.2 (*)
+     +--- com.google.auto.value:auto-value-annotations:1.6.3
+     +--- com.google.guava:listenablefuture:1.0 -> 9999.0-empty-to-avoid-conflict-with-guava
+     +--- androidx.camera:camera-camera2:1.3.4 (c)
+     +--- androidx.camera:camera-core:1.3.4 (c)
+     +--- androidx.camera:camera-lifecycle:1.3.4 (c)
+     \--- androidx.camera:camera-video:1.3.4 (c)

Please review and act accordingly

@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
Versionpr21004-bb50a7b
Commitbb50a7b
Direct Downloadwordpress-prototype-build-pr21004-bb50a7b.apk
Note: Google Login is not supported on these builds.

@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
Versionpr21004-bb50a7b
Commitbb50a7b
Direct Downloadjetpack-prototype-build-pr21004-bb50a7b.apk
Note: Google Login is not supported on these builds.

Copy link

codecov bot commented Jun 18, 2024

Codecov Report

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

Project coverage is 40.75%. Comparing base (d6f3777) to head (bb50a7b).

Files Patch % Lines
...dpress/android/ui/barcodescanner/BarcodeScanner.kt 0.00% 10 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##            trunk   #21004      +/-   ##
==========================================
- Coverage   40.75%   40.75%   -0.01%     
==========================================
  Files        1528     1528              
  Lines       70189    70195       +6     
  Branches    11608    11608              
==========================================
  Hits        28606    28606              
- Misses      38998    39004       +6     
  Partials     2585     2585              

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

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.

@notandyvee - All is working as expected. Thank you for wrangling this. 👍

@notandyvee notandyvee merged commit d87da4f into trunk Jun 21, 2024
21 of 22 checks passed
@notandyvee notandyvee deleted the andy/androidxCameraVersion-1.3.4 branch June 21, 2024 20:25
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.

None yet

3 participants