[PR #1764] [MERGED] Improve Scan autofocus timer to task code #3108

Closed
opened 2025-11-26 23:28:23 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/bitwarden/android/pull/1764
Author: @fedemkr
Created: 2/10/2022
Status: Merged
Merged: 2/10/2022
Merged by: @fedemkr

Base: masterHead: improve-scan-autofocus-timer


📝 Commits (2)

  • 91b1b26 Improved code for periodic Autofocus on scan for better cancellation and task handlilng
  • 5cfacf9 Merge branch 'master' into improve-scan-autofocus-timer

📊 Changes

1 file changed (+19 additions, -20 deletions)

View changed files

📝 src/App/Pages/Vault/ScanPage.xaml.cs (+19 -20)

📄 Description

Type of change

  • Bug fix
  • New feature development
  • Tech debt (refactoring, code cleanup, dependency upgrades, etc)
  • Build/deploy pipeline (DevOps)
  • Other

Objective

Improve the code to remove the DeviceTimer and use Task instead that are less likely to run into race conditions.
Improves #1228

Code changes

  • ScanPage.xaml.cs: Improve the code by changing the DeviceTimer for Task and cancellation token source for handling the cancellation and the 3min failsafe.

Testing requirements

The app shouldn't crash and should work as before when scanning.

Before you submit

  • I have added unit tests where it makes sense to do so (encouraged but not required)
  • This change requires a documentation update (notify the documentation team)
  • This change has particular deployment requirements (notify the DevOps team)

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/bitwarden/android/pull/1764 **Author:** [@fedemkr](https://github.com/fedemkr) **Created:** 2/10/2022 **Status:** ✅ Merged **Merged:** 2/10/2022 **Merged by:** [@fedemkr](https://github.com/fedemkr) **Base:** `master` ← **Head:** `improve-scan-autofocus-timer` --- ### 📝 Commits (2) - [`91b1b26`](https://github.com/bitwarden/android/commit/91b1b26776fff82fdda72cbbd4b6bea4b5039d05) Improved code for periodic Autofocus on scan for better cancellation and task handlilng - [`5cfacf9`](https://github.com/bitwarden/android/commit/5cfacf9c4af29d114e09cbc73319c941ced201cf) Merge branch 'master' into improve-scan-autofocus-timer ### 📊 Changes **1 file changed** (+19 additions, -20 deletions) <details> <summary>View changed files</summary> 📝 `src/App/Pages/Vault/ScanPage.xaml.cs` (+19 -20) </details> ### 📄 Description ## Type of change - [ ] Bug fix - [ ] New feature development - [X] Tech debt (refactoring, code cleanup, dependency upgrades, etc) - [ ] Build/deploy pipeline (DevOps) - [ ] Other ## Objective <!--Describe what the purpose of this PR is. For example: what bug you're fixing or what new feature you're adding--> Improve the code to remove the DeviceTimer and use Task instead that are less likely to run into race conditions. Improves #1228 ## Code changes <!--Explain the changes you've made to each file or major component. This should help the reviewer understand your changes--> <!--Also refer to any related changes or PRs in other repositories--> * **ScanPage.xaml.cs:** Improve the code by changing the `DeviceTimer` for `Task` and cancellation token source for handling the cancellation and the 3min failsafe. ## Testing requirements <!--What functionality requires testing by QA? This includes testing new behavior and regression testing--> The app shouldn't crash and should work as before when scanning. ## Before you submit - [ ] I have added **unit tests** where it makes sense to do so (encouraged but not required) - [ ] This change requires a **documentation update** (notify the documentation team) - [ ] This change has particular **deployment requirements** (notify the DevOps team) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2025-11-26 23:28:23 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/android#3108