Skip to content
Commit 28cc6364 authored by Nicholas Ambur's avatar Nicholas Ambur
Browse files

add API for ST clients run in battery saver mode

New system API interface for both SoundTriggerManager and
AlwaysOnHotwordDetector to indicate if a recognition should run in
battery saver mode or not.

Clients supply this information through the existing startRecognition
calls, and the client must hold a new privledged permission,
SOUND_TRIGGER_RUN_IN_BATTERY_SAVER, to indicate this intention.

As a prerequisite, the device PowerManagerService must have the
SoundTrigger service enabled in the battery saver mode battery policy.
If not enabled, recognition will be paused as if the client did not
provide the indication to run in battery saver mode.

Bug: 172294448
Test: build with Google search apk using this feature and verify
recognition keeps running in battery saver mode

Change-Id: Ia43be99290e6fd7c50ff8e4908d6c60ea513b19a
parent 06c85480
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment