From 03332ab6aa5461981acba74a63e5c96b379e9233 Mon Sep 17 00:00:00 2001 From: Eric Laurent Date: Thu, 9 Feb 2017 18:29:15 -0800 Subject: [PATCH] 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 --- services/core/java/com/android/server/audio/AudioService.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/services/core/java/com/android/server/audio/AudioService.java b/services/core/java/com/android/server/audio/AudioService.java index 1d60946129a73..0860e5b18d392 100644 --- a/services/core/java/com/android/server/audio/AudioService.java +++ b/services/core/java/com/android/server/audio/AudioService.java @@ -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();