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

Skip to content
Commit 16571b01 authored by Zhou Song's avatar Zhou Song
Browse files

audio_policy: Add extra check before restoring device in stopOutput

When certain game apks run with sound enabled, UI lag will be
observed.

This is due to device to be restored with double HAL latency even
when it's the same with the previous device, since setOutputDevice
is synchronous call now, then it will block the subsequent calling
to APM until the latency time elapsed.

When the device to be restored is the same as previous device,
set the latency to 0.

Ported from Change-Id: I2c92675cedd8930430f81147c7f733d8dd70798c

Conflicts:
	policy_hal/AudioPolicyManager.cpp

Change-Id: I4582cdc98f4cf8189d89b648e5c3f6e0ce8089ab
parent d86aedab
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