-
Notifications
You must be signed in to change notification settings - Fork 135
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
[Woo POS] We don't handle the low battery event during IPP flow properly #12568
base: trunk
Are you sure you want to change the base?
[Woo POS] We don't handle the low battery event during IPP flow properly #12568
Conversation
@@ -108,7 +108,7 @@ internal class TerminalWrapper { | |||
private fun mapFrequencyOptions(updateFrequency: CardReaderManager.SimulatorUpdateFrequency): SimulateReaderUpdate { | |||
return when (updateFrequency) { | |||
CardReaderManager.SimulatorUpdateFrequency.NEVER -> SimulateReaderUpdate.NONE | |||
CardReaderManager.SimulatorUpdateFrequency.ALWAYS -> SimulateReaderUpdate.REQUIRED | |||
CardReaderManager.SimulatorUpdateFrequency.ALWAYS -> SimulateReaderUpdate.LOW_BATTERY |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is test code, to be removed before merging.
Generated by 🚫 Danger |
📲 You can test the changes from this Pull Request in WooCommerce-Wear Android by scanning the QR code below to install the corresponding build.
|
📲 You can test the changes from this Pull Request in WooCommerce Android by scanning the QR code below to install the corresponding build.
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## trunk #12568 +/- ##
============================================
- Coverage 40.58% 40.58% -0.01%
Complexity 5674 5674
============================================
Files 1229 1229
Lines 69287 69289 +2
Branches 9579 9581 +2
============================================
- Hits 28119 28118 -1
- Misses 38584 38586 +2
- Partials 2584 2585 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
…y-event-during-ipp-flow-properly
…y-event-during-ipp-flow-properly
…y-event-during-ipp-flow-properly
…y-event-during-ipp-flow-properly
Closes: #12565
Description
Discussed in Slack.
This PR addresses the issue where a
LOW_BATTERY
event incorrectly shows a toast and an empty dialog instead of triggering the appropriate low battery warning dialog similar to theLOW_BATTERY_SUCCEED_CONNECT
event.The underlying problem was that
LOW_BATTERY
events were causing thebluetoothReaderListener
to be reset to anUnknown
state before the low battery event could be appropriately handled asFailed
.Steps to reproduce
OR
physical card reader that's low on battery.Testing information
The tests that have been performed
LOW_BATTERY
triggers the correct dialog.Unknown
.LOW_BATTERY_SUCCEED_CONNECT
.I have considered if this change warrants release notes and have added them to
RELEASE-NOTES.txt
if necessary. Use the "[Internal]" label for non-user-facing changes.I have Removed any TEST CODE.
Reviewer (or Author, in the case of optional code reviews):
Please make sure these conditions are met before approving the PR, or request changes if the PR needs improvement: