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

BITAU-102 Return null BridgeService when API level is below 12 #3887

Merged
merged 1 commit into from
Sep 10, 2024

Conversation

ahaisting-livefront
Copy link
Collaborator

🎟️ Tracking

https://livefront.atlassian.net/browse/BITAU-102

📔 Objective

Make sure we no-op all BridgeService calls under android API level 12.

📸 Screenshots

N/A

⏰ Reminders before review

  • Contributor guidelines followed
  • All formatters and local linters executed and passed
  • Written new unit and / or integration tests where applicable
  • Used internationalization (i18n) for all UI strings
  • CI builds passed
  • Communicated to DevOps any deployment requirements
  • Updated any necessary documentation or informed the documentation team

🦮 Reviewer guidelines

  • 👍 (:+1:) or similar for great changes
  • 📝 (:memo:) or ℹ️ (:information_source:) for notes or general info
  • ❓ (:question:) for questions
  • 🤔 (:thinking:) or 💭 (:thought_balloon:) for more open inquiry that's not quite a confirmed
    issue and could potentially benefit from discussion
  • 🎨 (:art:) for suggestions / improvements
  • ❌ (:x:) or ⚠️ (:warning:) for more significant problems or concerns needing attention
  • 🌱 (:seedling:) or ♻️ (:recycle:) for future improvements or indications of technical debt
  • ⛏ (:pick:) for minor or nitpick changes

Copy link
Contributor

github-actions bot commented Sep 9, 2024

Logo
Checkmarx One – Scan Summary & Details2590b4de-803c-4d1f-8be6-24011d8bea66

No New Or Fixed Issues Found

Base automatically changed from bridge-service to main September 9, 2024 20:36
Comment on lines +25 to +32
return if (
!featureFlagManager.getFeatureFlag(FlagKey.AuthenticatorSync) ||
isBuildVersionBelow(Build.VERSION_CODES.S)
) {
// If the feature flag is not enabled, OR if version is below Android 12,
// return a null binder which will no-op all service calls
null
} else {
// Otherwise, return real binder implementation:
defaultBinder
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I swapped the order of this condition to try to make it more readable... let me know what y'all think!

This reads nice to me, but I know if statement readability can be quite subjective.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Could also do a takeUnless too. But this is also fine.

Copy link
Contributor

Choose a reason for hiding this comment

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

Either way is an improvement. I don't feel too strongly one way or the other.

Copy link

codecov bot commented Sep 9, 2024

Codecov Report

Attention: Patch coverage is 75.00000% with 1 line in your changes missing coverage. Please review.

Project coverage is 88.60%. Comparing base (19facaf) to head (b5e9bb4).
Report is 7 commits behind head on main.

Files with missing lines Patch % Lines
...a/platform/processor/BridgeServiceProcessorImpl.kt 75.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3887      +/-   ##
==========================================
- Coverage   88.61%   88.60%   -0.01%     
==========================================
  Files         411      411              
  Lines       33763    33765       +2     
  Branches     4987     4988       +1     
==========================================
+ Hits        29918    29919       +1     
- Misses       2091     2092       +1     
  Partials     1754     1754              

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

@ahaisting-livefront
Copy link
Collaborator Author

Thanks, @brian-livefront and @SaintPatrck !

@ahaisting-livefront ahaisting-livefront merged commit 19596ea into main Sep 10, 2024
9 checks passed
@ahaisting-livefront ahaisting-livefront deleted the bridge-block-below-android-12 branch September 10, 2024 20:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants