diff options
author | Andreas Schneider <asn@cryptomilk.org> | 2017-02-09 10:45:21 +0100 |
---|---|---|
committer | Christopher N. Hesse <raymanfx@gmail.com> | 2017-02-10 21:33:14 +0100 |
commit | ecd17ce8ba4109c500a1083f4d74f94eb8ae9598 (patch) | |
tree | 36cdfffaae74886761da58670631b25de8553017 | |
parent | 9c195610dffd74b7006c501cd2727ce9f58cd44d (diff) | |
download | android_hardware_samsung-ecd17ce8ba4109c500a1083f4d74f94eb8ae9598.tar.gz android_hardware_samsung-ecd17ce8ba4109c500a1083f4d74f94eb8ae9598.tar.bz2 android_hardware_samsung-ecd17ce8ba4109c500a1083f4d74f94eb8ae9598.zip |
Revert "audio: Remove unused screen_state parameter"
We want that to avoid an error message in the log, so revert the
revomal.
This reverts commit cdad20da45269c9c5d7308f7d63de1350e04d94d.
Change-Id: Ic90cd6b02e5b3e8aae73d824153c3084643a8acc
-rw-r--r-- | audio/audio_hw.c | 8 | ||||
-rw-r--r-- | audio/audio_hw.h | 1 |
2 files changed, 9 insertions, 0 deletions
diff --git a/audio/audio_hw.c b/audio/audio_hw.c index 97acd48..f92dc74 100644 --- a/audio/audio_hw.c +++ b/audio/audio_hw.c @@ -3874,6 +3874,14 @@ static int adev_set_parameters(struct audio_hw_device *dev, const char *kvpairs) adev->voice.bluetooth_nrec = false; } + ret = str_parms_get_str(parms, "screen_state", value, sizeof(value)); + if (ret >= 0) { + if (strcmp(value, AUDIO_PARAMETER_VALUE_ON) == 0) + adev->screen_off = false; + else + adev->screen_off = true; + } + #if SWAP_SPEAKER_ON_SCREEN_ROTATION ret = str_parms_get_int(parms, "rotation", &val); if (ret >= 0) { diff --git a/audio/audio_hw.h b/audio/audio_hw.h index 96635ec..8a507ed 100644 --- a/audio/audio_hw.h +++ b/audio/audio_hw.h @@ -384,6 +384,7 @@ struct audio_device { struct stream_in* active_input; struct stream_out* primary_output; bool mic_mute; + bool screen_off; struct voice_data voice; |