Skip to content

Commit 010b816

Browse files
committed
Add fixed response for testing in dictationless emulator.
Signed-off-by: Katharine Berry <[email protected]>
1 parent c4cd5d6 commit 010b816

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

app/src/c/converse/session_window.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
#include "../util/memory/malloc.h"
2727
#include "../util/memory/sdk.h"
2828
#include "../vibes/haptic_feedback.h"
29+
#include "../features.h"
2930

3031
#include <pebble.h>
3132

@@ -529,5 +530,10 @@ static void prv_timed_out(void *ctx) {
529530
static void prv_start_dictation(SessionWindow *sw) {
530531
// Dictation needs a ridiculous amount of memory to behave properly.
531532
free(bmalloc(2048));
533+
#if !ENABLE_FEATURE_FIXED_PROMPT
532534
dictation_session_start(sw->dictation);
535+
#else
536+
// skip this, just send some nonsense.
537+
prv_dictation_status_callback(sw->dictation, DictationSessionStatusSuccess, "This is just a test message", sw);
538+
#endif
533539
}

app/src/c/features.h

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
/*
2+
* Copyright 2025 Google LLC
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
#pragma once
18+
19+
// If true, instead of using dictation input, the app will just use a fixed prompt.
20+
#define ENABLE_FEATURE_FIXED_PROMPT 0

0 commit comments

Comments
 (0)