Skip to content

Conversation

@Gavin-Guiii
Copy link

🎟️ Tracking

#6284

📔 Objective

Xiaomi HyperOS changed AOSP's credential manager and broke BiometricPrompt. One way to fix it is to skip biometric prompt handling if Bitwarden is running on Hyper OS.

See more details here: #6284 (comment)

⏰ Reminders before review

  • Contributor guidelines followed
  • All formatters and local linters executed and passed
  • Written new unit and / or integration tests where applicable
  • Protected functional changes with optionality (feature flags)
  • Used internationalization (i18n) for all UI strings
  • CI builds passed
  • Communicated to DevOps any deployment requirements
  • Updated any necessary documentation (Confluence, contributing docs) 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

@CLAassistant
Copy link

CLAassistant commented Jan 3, 2026

CLA assistant check
All committers have signed the CLA.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@bitwarden-bot
Copy link

Thank you for your contribution! We've added this to our internal tracking system for review.
ID: PM-30394
Link: https://bitwarden.atlassian.net/browse/PM-30394

Details on our contribution process can be found here: https://contributing.bitwarden.com/contributing/pull-requests/community-pr-process.

@bitwarden-bot bitwarden-bot changed the title PM-29960: Skip biometric prompt on Xiaomi HyperOS [PM-30394] PM-29960: Skip biometric prompt on Xiaomi HyperOS Jan 3, 2026
Copy link
Contributor

@SaintPatrck SaintPatrck left a comment

Choose a reason for hiding this comment

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

Confirmed with our product team that blocking HyperOS is an acceptable approach.

Changes look good, overall. One minor nitpick about the newline.

} catch (_: Throwable) {
null
}
} No newline at end of file
Copy link
Contributor

Choose a reason for hiding this comment

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

⛏️ All files must end in a newline.

Copy link
Author

Choose a reason for hiding this comment

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

⛏️ All files must end in a newline.

Thank you! Just updated the file.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 9, 2026

Logo
Checkmarx One – Scan Summary & Details32ba8bd9-1800-40e8-b6ac-f63f3191796d

Great job! No new security vulnerabilities introduced in this pull request

cipher: Cipher?,
): PasswordCredentialEntry.Builder =
if (isBuildVersionAtLeast(Build.VERSION_CODES.VANILLA_ICE_CREAM) && cipher != null) {
if (isBuildVersionAtLeast(Build.VERSION_CODES.VANILLA_ICE_CREAM) && !isHyperOS() && cipher != null) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

The linter is mad about the line length here, you can probably break this out into a private method that can be used in both places.

private fun shouldSetBiometricPromptData(
    cipher: Cipher?,
): Boolean {
    return isBuildVersionAtLeast(Build.VERSION_CODES.VANILLA_ICE_CREAM) &&
        !isHyperOS() &&
        cipher != null
}

Copy link
Author

Choose a reason for hiding this comment

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

Thanks. I broke it out into this and kept the cipher null check in the original functions, so the compiler knows cipher isn't null. Hope that's okay.

private fun isBiometricPromptDataSupported(): Boolean {
    return isBuildVersionAtLeast(Build.VERSION_CODES.VANILLA_ICE_CREAM) &&
        !isHyperOS()
}

Copy link
Collaborator

Choose a reason for hiding this comment

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

That works for me

null
}
}

Copy link
Collaborator

Choose a reason for hiding this comment

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

Another minor lint thing, it does not like consecutive blank lines. There should just be one here.

@codecov
Copy link

codecov bot commented Jan 9, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.87%. Comparing base (674cde9) to head (53e1a29).
⚠️ Report is 22 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6316      +/-   ##
==========================================
- Coverage   84.93%   84.87%   -0.07%     
==========================================
  Files         876      943      +67     
  Lines       56942    57773     +831     
  Branches     7900     7979      +79     
==========================================
+ Hits        48366    49034     +668     
- Misses       5833     5967     +134     
- Partials     2743     2772      +29     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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