+
+void __bt_hf_agent_print_at_buffer(char *message, const char *buf)
+{
+
+ int i = 0;
+ char s[BT_HF_DATA_BUF_SIZE] = {0, };
+ gboolean hide = FALSE;
+
+ gboolean has_clcc = FALSE;
+ gboolean has_clip = FALSE;
+ gboolean has_ccwa = FALSE;
+ char *xsat_ptr;
+
+ strncpy(s, buf, BT_HF_DATA_BUF_SIZE - 1);
+
+ has_clcc = strstr(buf, "CLCC:") ? TRUE : FALSE;
+ if (has_clcc == TRUE)
+ goto done;
+ has_clip = strstr(buf, "+CLIP:") ? TRUE : FALSE;
+ if (has_clip == TRUE)
+ goto done;
+ has_ccwa = strstr(buf, "+CCWA:") ? TRUE : FALSE;
+
+done:
+ /* +XSAT: 11,DISC */
+ xsat_ptr = strstr(s, "11,DISC,");
+ if (xsat_ptr) {
+ xsat_ptr = xsat_ptr + 8;
+ int x = 0;
+ while (xsat_ptr[x] != '\0' && xsat_ptr[x] != '\r' && xsat_ptr[x] != '\n') {
+ xsat_ptr[x] = 'X';
+ x++;
+ }
+ }
+
+ /* AT+XSAT=11,Q_CT,X,XXXX */
+ xsat_ptr = strstr(s, "11,Q_CT,");
+ if (xsat_ptr) {
+ xsat_ptr = xsat_ptr + 8;
+ int x = 0;
+ while (xsat_ptr[x] != '\0' && xsat_ptr[x] != '\r' && xsat_ptr[x] != '\n') {
+ if (x > 1) /* ignore 0 and 1 position */
+ xsat_ptr[x] = 'X';
+ x++;
+ }
+ }
+
+ i = 0;
+ while (s[i] != '\0') {
+ if (s[i] == '\r' || s[i] == '\n') {
+ s[i] = '.';
+ } else {
+ if (s[i] == '\"')
+ hide = hide ? FALSE : TRUE;
+ else if ((has_clcc || has_clip || has_ccwa) && hide) {
+ if (i % 2)
+ s[i] = 'X';
+ }
+ }
+ i++;
+ }
+ if (message)
+ INFO("%s Buffer = %s, Length = %d ", message, s, strlen(s));
+ else
+ INFO("%s", s);
+}
+