Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a2fb29cb authored by Andy Hung's avatar Andy Hung
Browse files

AudioSystem: Reduce service timeout from 10s to 5s

This improves the ANR prevention.

Flag: EXEMPT bugfix
Test: Treehugger
Bug: 375691003
Change-Id: I09a5d6f775fe6486a9b6bd737c9d91e9280f4931
parent def97eb7
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -127,10 +127,10 @@ sp<CaptureStateListenerImpl> AudioSystem::gSoundTriggerCaptureStateListener;
// Such an audioserver failure is considered benign as the ground truth is stored in
// the Java AudioService and can be restored once audioserver has finished initialization.
//
// TODO(b/375691003) We use 10s as a conservative timeout value, and will tune closer to 3s.
// TODO(b/375691003) We use 5s as a conservative timeout value, and will tune closer to 3s.
// Too small a value (i.e. less than 1s would churn repeated calls to get the service).
// The value can be tuned by the property audio.service.client_wait_ms.
static constexpr int32_t kServiceClientWaitMs = 10'000;
static constexpr int32_t kServiceClientWaitMs = 5'000;

static constexpr const char kServiceWaitProperty[] = "audio.service.client_wait_ms";