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

Timer will continue to run if it is set to less than 5 seconds. #5

Open
quadratz opened this issue Feb 6, 2022 · 12 comments
Open

Timer will continue to run if it is set to less than 5 seconds. #5

quadratz opened this issue Feb 6, 2022 · 12 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@quadratz
Copy link

quadratz commented Feb 6, 2022

Steps to reproduce:

  1. Set timer to less than 5 seconds and click Start.
  2. The timer exceeds the applied limit (resulting in a negative value).
  3. The timer always stops and ringing at exactly the 5th second, regardless of the setting.

Expectation:

  • The timer should stop and sound at the exact time set.
@qw123wh qw123wh added the bug Something isn't working label Feb 6, 2022
@qw123wh
Copy link
Collaborator

qw123wh commented Feb 6, 2022

I also made some tests, I find the same error as you. I am currently unable to find the solution.

@qw123wh qw123wh added the help wanted Extra attention is needed label Feb 6, 2022
@GokhanKabar
Copy link

can you assign me ?

@Aladin056
Copy link

Hi @qw123wh @CikiMomogi , i am interested by the issue , i would like to know if you are still active on the project because i can fin a solution . Thank you

@qw123wh
Copy link
Collaborator

qw123wh commented Feb 7, 2022

@GokhanKabar @Aladin056 the project is active, if you can solve the issue of pull requests, I will then join them to the main branch. I am looking for collaborators for this project, I have some nice ideas to make this app even more functional. Your help is greatly appreciated

@BlackyHawky
Copy link
Owner

Impossible to find the cause... 😭

@MaroEldawwy6
Copy link

I test the app and i have some notes:

The timer will continue counting negative (when foreground or background) if set to 1 or 2 secs.
When reaching -4 or higher, it will ring and sound only if in foreground, otherwise will continue counting negative.

@BlackyHawky
Copy link
Owner

I test the app and i have some notes:

The timer will continue counting negative (when foreground or background) if set to 1 or 2 secs. When reaching -4 or higher, it will ring and sound only if in foreground, otherwise will continue counting negative.

I've also noticed this, but I can't find the part of the code that causes this bad behavior.

Note: it seems to be the same on the LineageOS clock application.

@MaroEldawwy6
Copy link

No, @BlackyHawky

I have another phone (with LineageOS 18.1 -Android 11- on it), and this problem is not found in the Clock app, except when you set the timer for 1 second (i think because the 1 sec. timer is very low or small to handle correctly)

@BlackyHawky
Copy link
Owner

@MaroEldawwy6
Check out the video below; this is the application compiled from the official LineageOS repository.

It'll confirm what I've said...

Watch video
SVID_20240529_203317_1.mp4

@qw123wh
Copy link
Collaborator

qw123wh commented May 31, 2024

@BlackyHawky I found the solution,

botxxxx/lib-com.android.deskclock@5f19c68

I tested it on the old AOSP clock, the first on the repository that I haven't updated for 3 years; the changes of TimerItemFragment.java works. Now see if you can adapt this to the new code, since the TimerItemFragment.java file no longer exists

@BlackyHawky
Copy link
Owner

@qw123wh
You are magic !!!! 🎉🎉
It's an excellent search that unfortunately only works if the application remains in the foreground.

Did you find the same thing?

@qw123wh
Copy link
Collaborator

qw123wh commented May 31, 2024

@BlackyHawky Yes same problem, I didn't notice it. Partially resolved.

Create a branch with the modification, then we may find some solution to solve it completely

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

7 participants
@GokhanKabar @qw123wh @Aladin056 @quadratz @BlackyHawky @MaroEldawwy6 and others