[automerger] Fix the tones playing count in InCallTonePlayer am: e3aa71113a

Change-Id: Ic1a4242eafe6728dc3ebbe079125c39fd69daa7a
This commit is contained in:
Muhammed Siju 2022-12-01 19:08:26 +00:00
commit 0ae7616057
1 changed files with 1 additions and 1 deletions

View File

@ -518,7 +518,7 @@ public class InCallTonePlayer extends Thread {
mMainThreadHandler.post(new Runnable("ICTP.cUTP", mLock) { mMainThreadHandler.post(new Runnable("ICTP.cUTP", mLock) {
@Override @Override
public void loggedRun() { public void loggedRun() {
int newToneCount = sTonesPlaying.updateAndGet( t -> Math.min(0, t--)); int newToneCount = sTonesPlaying.updateAndGet( t -> Math.max(0, --t));
if (newToneCount == 0) { if (newToneCount == 0) {
Log.i(InCallTonePlayer.this, Log.i(InCallTonePlayer.this,