Diff between ac2ae7f897f0b0be32ce959f90974395c29665a3 and ca4364f488bbe0f4c739a5195541908f00ebe673

Changed Files

File Additions Deletions Status
android/handsfree.c +4 -1 modified

Full Patch

diff --git a/android/handsfree.c b/android/handsfree.c
index b7aa1dd..89dceb9 100644
--- a/android/handsfree.c
+++ b/android/handsfree.c
@@ -2304,6 +2304,9 @@ static void phone_state_incoming(struct hf_device *dev, int num_active,
 	if (dev->setup_state == HAL_HANDSFREE_CALL_STATE_INCOMING) {
 		if (dev->num_active != num_active ||
 						dev->num_held != num_held) {
+			if (dev->num_active == num_held &&
+						dev->num_held == num_active)
+				return;
 			/*
 			 * calls changed while waiting call ie. due to
 			 * termination of active call
@@ -2380,7 +2383,7 @@ static void phone_state_idle(struct hf_device *dev, int num_active,
 				connect_audio(dev);
 		}
 
-		if (num_held > dev->num_held)
+		if (num_held >= dev->num_held && num_held != 0)
 			update_indicator(dev, IND_CALLHELD, 1);
 
 		update_indicator(dev, IND_CALLSETUP, 0);