Clean up SHORT_SERVICE time change code.

- We now explicitly cancel stale timeout
- When needed, we now do so explicitly. Otherwise, we'll keep the
original handler events. The original code had an edge case bug
when startForground(SHORT_SERVICE) is called during after the timeout,
we'd post another timeout message, which would end up calling
onTimeout() again.

Test: Manual test using a test app
Bug: 257270313
Change-Id: Ic06dbb796ef16214667e9869ca9324c84fa3ab49
1 file changed