Skip to content

AudioTimer to use Coroutines#19777

Open
criticalAY wants to merge 2 commits intoankidroid:mainfrom
criticalAY:feat/audio-recorder-migration
Open

AudioTimer to use Coroutines#19777
criticalAY wants to merge 2 commits intoankidroid:mainfrom
criticalAY:feat/audio-recorder-migration

Conversation

@criticalAY
Copy link
Contributor

@criticalAY criticalAY commented Dec 12, 2025

Purpose / Description

I am preparing Audio timer to be used in notification i.e. allow update every 1s for notification as ms updates are too much and Android ignore them, it also removes interfaces and uses modern lambdas to observe time and update it in UI

  • Moving Timer class to recorder package as I want to create a separate view and remove any coupling from other classes so recorder logic is contained in one package
  • Add param for notification updates
  • Removed interface
  • Improved how time is updated

Fixes

NA

Approach

Replaces the legacy Handler/Runnable implementation with Kotlin Coroutines

How Has This Been Tested?

Pixel Fold API 36 and unit tests

Learning (optional, can help others)

NA

Checklist

Please, go through these checks before submitting the PR.

  • You have a descriptive commit message with a short title (first line, max 50 chars).
  • You have commented your code, particularly in hard-to-understand areas
  • You have performed a self-review of your own code
  • UI changes: include screenshots of all affected screens (in particular showing any new or changed strings)
  • UI Changes: You have tested your change using the Google Accessibility Scanner

Copy link
Member

@david-allison david-allison left a comment

Choose a reason for hiding this comment

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

The first commit shouldn't have a 'refactor' message IMO - it's borderline

@david-allison david-allison added the Needs Author Reply Waiting for a reply from the original author label Dec 13, 2025
@criticalAY criticalAY force-pushed the feat/audio-recorder-migration branch from c1d1cfc to 1fbc85e Compare December 15, 2025 06:10
@criticalAY criticalAY changed the title Refactor: AudioTimer to use Coroutines AudioTimer to use Coroutines Dec 15, 2025
david-allison

This comment was marked as resolved.

@criticalAY criticalAY force-pushed the feat/audio-recorder-migration branch from 1fbc85e to 92f0bd8 Compare December 15, 2025 06:38
@criticalAY criticalAY removed the Needs Author Reply Waiting for a reply from the original author label Dec 15, 2025
Copy link
Member

@david-allison david-allison left a comment

Choose a reason for hiding this comment

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

Looks awesome!

@criticalAY criticalAY added Needs Second Approval Has one approval, one more approval to merge and removed Needs Review labels Dec 15, 2025
- Replaces the legacy Handler/Runnable implementation with Kotlin Coroutines
to improve timing accuracy, lifecycle safety, and code readability.
- remove interface and use lambdas
@criticalAY criticalAY force-pushed the feat/audio-recorder-migration branch from 92f0bd8 to 4c60e78 Compare March 5, 2026 08:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Multimedia Needs Second Approval Has one approval, one more approval to merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants