am 2eab06c3: Merge "Fix for SafeMedia logic and CTS tests" into mnc-dev
* commit '2eab06c38f1aa34f90c2a4b153a51f3c15310431': Fix for SafeMedia logic and CTS tests
This commit is contained in:
@@ -3099,10 +3099,13 @@ public class AudioService extends IAudioService.Stub {
|
|||||||
|| mContext.getResources().getBoolean(
|
|| mContext.getResources().getBoolean(
|
||||||
com.android.internal.R.bool.config_safe_media_volume_enabled);
|
com.android.internal.R.bool.config_safe_media_volume_enabled);
|
||||||
|
|
||||||
|
boolean safeMediaVolumeBypass =
|
||||||
|
SystemProperties.getBoolean("audio.safemedia.bypass", false);
|
||||||
|
|
||||||
// The persisted state is either "disabled" or "active": this is the state applied
|
// The persisted state is either "disabled" or "active": this is the state applied
|
||||||
// next time we boot and cannot be "inactive"
|
// next time we boot and cannot be "inactive"
|
||||||
int persistedState;
|
int persistedState;
|
||||||
if (safeMediaVolumeEnabled) {
|
if (safeMediaVolumeEnabled && !safeMediaVolumeBypass) {
|
||||||
persistedState = SAFE_MEDIA_VOLUME_ACTIVE;
|
persistedState = SAFE_MEDIA_VOLUME_ACTIVE;
|
||||||
// The state can already be "inactive" here if the user has forced it before
|
// The state can already be "inactive" here if the user has forced it before
|
||||||
// the 30 seconds timeout for forced configuration. In this case we don't reset
|
// the 30 seconds timeout for forced configuration. In this case we don't reset
|
||||||
|
|||||||
Reference in New Issue
Block a user