AudioService: check safe volume bypass early at boot

audio.safemedia.bypass property was sampled only after a 30 second
timeout after boot in case no MCC change config event is received.

If the property is true, skip the time out to speed up automated test
needing to disable the volume warning.

Bug: 31347265
Test: restart runtime with audio.safemedia.bypass true and check
no warning is displayed when raising volume to max

Change-Id: Ic31111200379e3cb4fddc651fa548a1bdff3384a
This commit is contained in:
Eric Laurent
2017-02-09 18:29:15 -08:00
parent 4c28b93caa
commit 03332ab6aa

View File

@@ -778,7 +778,8 @@ public class AudioService extends IAudioService.Stub
0,
0,
TAG,
SAFE_VOLUME_CONFIGURE_TIMEOUT_MS);
SystemProperties.getBoolean("audio.safemedia.bypass", false) ?
0 : SAFE_VOLUME_CONFIGURE_TIMEOUT_MS);
initA11yMonitoring();
onIndicateSystemReady();