speech: Update recognition-service resource

Adding an attribute to the recognition-service resource which will
limit the maximum number of concurrent sessions ongoing with the same
recognition implementation. The default value of attribute is 1
(no concurrency), maintaining the back-compatibility.

Each recognition service implementation can override this value for
itself to the extent they find suitable.

Bug: 260713947
Test: n/a
Change-Id: I84d4856c8bb99a73f2b542c207429c5dcc7e1e91
This commit is contained in:
Aleksandar Kiridzic
2022-11-29 22:17:38 +00:00
parent d25aff0216
commit 98f6ac3cd3
3 changed files with 5 additions and 0 deletions

View File

@@ -1041,6 +1041,7 @@ package android {
field public static final int max = 16843062; // 0x1010136
field public static final int maxAspectRatio = 16844128; // 0x1010560
field public static final int maxButtonHeight = 16844029; // 0x10104fd
field public static final int maxConcurrentSessionsCount;
field public static final int maxDate = 16843584; // 0x1010340
field public static final int maxEms = 16843095; // 0x1010157
field public static final int maxHeight = 16843040; // 0x1010120

View File

@@ -8955,6 +8955,9 @@
<!-- Flag indicating whether a recognition service can be selected as default. The default
value of this flag is true. -->
<attr name="selectableAsDefault" format="boolean" />
<!-- The maximal number of recognition sessions ongoing at the same time.
The default value is 1, meaning no concurrency. -->
<attr name="maxConcurrentSessionsCount" format="integer" />
</declare-styleable>
<!-- Use <code>voice-interaction-service</code> as the root tag of the XML resource that

View File

@@ -117,6 +117,7 @@
<public name="accessibilityDataPrivate" />
<public name="enableTextStylingShortcuts" />
<public name="targetDisplayCategory"/>
<public name="maxConcurrentSessionsCount" />
</staging-public-group>
<staging-public-group type="id" first-id="0x01cd0000">