OSDN Git Service

CountDownTimer: not skip onTick()
authorHidenari Koshimae <hidenari.koshimae@sonymobile.com>
Tue, 18 Oct 2016 11:43:16 +0000 (20:43 +0900)
committerHidenari Koshimae <hidenari.koshimae@sonymobile.com>
Tue, 25 Oct 2016 08:19:36 +0000 (08:19 +0000)
commit0c3149191fbbfdc5242f8dd8a02f561f1ce604c3
tree9e11458e315142677530f460146d41fb4f7fa608
parentff5c3ad08b186e71b7b1466c576c5d44f05746ca
CountDownTimer: not skip onTick()

CoundDownTimer internally performs counting down with a handler and
fires onTick() callback at countdown intervals. At this internal
counting down, firing onTick() is skipped if the account of time until
finished is less than countdown interval. Due to this skip of onTick(),
user will miss last onTick() callback.

This change ensures CountDownTimer to fires every onTick() callback
until the time is up.

Bug: 32392931
Change-Id: I951f5cd46743873d7f8c353f8cf8c700999d8ae0
core/java/android/os/CountDownTimer.java