Diff between e0c486aa48d9629995f5a1c44223140c1f7caf86 and bbe400718b0d461435405b459273cde7919d472b

Changed Files

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

Full Patch

diff --git a/android/handsfree.c b/android/handsfree.c
index 9422dd9..210673a 100644
--- a/android/handsfree.c
+++ b/android/handsfree.c
@@ -113,6 +113,7 @@ static struct {
 	uint32_t features;
 	bool clip_enabled;
 	bool cmee_enabled;
+	bool ccwa_enabled;
 	bool indicators_enabled;
 	struct indicator inds[IND_COUNT];
 	guint ring;
@@ -463,9 +464,28 @@ static void at_cmd_d(struct hfp_gw_result *result, enum hfp_gw_cmd_type type,
 static void at_cmd_ccwa(struct hfp_gw_result *result, enum hfp_gw_cmd_type type,
 							void *user_data)
 {
+	unsigned int val;
+
 	DBG("");
 
-	/* TODO */
+	switch (type) {
+	case HFP_GW_CMD_TYPE_SET:
+		if (!hfp_gw_result_get_number(result, &val) || val > 1)
+			break;
+
+		if (hfp_gw_result_has_next(result))
+			break;
+
+		device.ccwa_enabled = val;
+
+		hfp_gw_send_result(device.gw, HFP_RESULT_OK);
+
+		return;
+	case HFP_GW_CMD_TYPE_READ:
+	case HFP_GW_CMD_TYPE_TEST:
+	case HFP_GW_CMD_TYPE_COMMAND:
+		break;
+	}
 
 	hfp_gw_send_result(device.gw, HFP_RESULT_ERROR);
 }