History log of /frameworks/av/services/audioflinger/ServiceUtilities.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
6e64137e95362a8f6eef43ea676418567b327c96 02-Mar-2018 Svet Ganov <svetoslavganov@google.com> Revert "Revert "Use start/finish app op API for mic use""

This reverts commit 599ec462d94136949e0c90419ea99b0d9ba83eac.

In addition it fixes an incorrect comparison against opPackageName
instead of resolvedOpPackageName creating incorrect short circuit.

Test: atest android.media.cts.AudioRecordAppOpTest
"Okay Google" works fine

bug: 64085448

Change-Id: I77a8486dfd6e4f020efdf05d28a856a32579ef31
(cherry picked from commit 5b81f550759c975fe6716e4e7870b11e523834d0)
/frameworks/av/services/audioflinger/ServiceUtilities.h
599ec462d94136949e0c90419ea99b0d9ba83eac 01-Mar-2018 Svetoslav Ganov <svetoslavganov@google.com> Revert "Use start/finish app op API for mic use"

This reverts commit 55bb217cd1fea3e791d0d7cf73e09e27fed8c36e.

Reason for revert: Causes a regression

bug:74061812

Change-Id: I119937cfce79ba824185634f2b81dad1606a875d
/frameworks/av/services/audioflinger/ServiceUtilities.h
55bb217cd1fea3e791d0d7cf73e09e27fed8c36e 28-Feb-2018 Svet Ganov <svetoslavganov@google.com> Use start/finish app op API for mic use

Since recording is a long running operation we need to use
the start/finish app op APIs since now system UI would watch
for active mic/camera/overlay ops and badge app notifications
with icons denoting that these capabilities are being used.

Test: atest android.media.cts.AudioRecordAppOpTest

bug: 64085448

Change-Id: I47d9b507ef5d757d34d65484c112cea6cdc246e1
/frameworks/av/services/audioflinger/ServiceUtilities.h
766fb020a50b64bf9a808bd80df60c54c2ca8cc3 06-Jan-2018 Nadav Bar <nadavbar@google.com> Support routing audio playback to telephony uplink

This change enables phone apps to play audio to the uplink stream
during a call.
This change maks the AUDIO_OUTPUT_FLAG_INCALL_MUSIC_UPLINK flag to be added to the flags that are sent to the HAL when an ongoing call is active, the chosen output device is the TX telephony device, the stream type is music, and the calling app has the MODIFY_PHONE_STATE permission.
For this change to take place, the following changes were made to the signature of getOutputForAttr in IAudioPolicyService:
1. Add pid (process id) parameter to getOutputForAttr.
2. Make the flags parameter a pointer so changed value can be
examined by calling function.

Bug: 69973354.
Test: tested manually.
Change-Id: I74cef3f8b66de6e0e8f87b6235130c2cdf423da7
/frameworks/av/services/audioflinger/ServiceUtilities.h
7504b9eb4561df88550f874cf0ce95b6f4d09927 16-Aug-2017 Eric Laurent <elaurent@google.com> soundtrigger: require RECORD_AUDIO permission for DSP hotword

Check android.permission.RECORD_AUDIO permission in addition to
android.permission.CAPTURE_AUDIO_HOTWORD for DSP hotword operations
as those require access to device microphone.

Bug: 62265680
Test: check "OK Google" detection with and without DSP
Change-Id: Icba2520331164bcd618e91916ca701e677d419b8
/frameworks/av/services/audioflinger/ServiceUtilities.h
b2379ba0a32638bae2ea0460644f68cf5a0967ce 24-May-2016 Eric Laurent <elaurent@google.com> Fix android.permission.CAPTURE_AUDIO_OUTPUT permission check

Make sure we use the correct PID and UID when checking
android.permission.CAPTURE_AUDIO_OUTPUT permission from audio
policy service.

Bug: 28772898
Change-Id: I8f0c45bf7a5728b4364a451eefb6c025892ae9a5
/frameworks/av/services/audioflinger/ServiceUtilities.h
dcb346b7dc5b88c3e85db8a70bbd6a2fee8192b9 09-Sep-2015 Marco Nelissen <marcone@google.com> Run audio services in audioserver instead of mediaserver

audioflinger, audiopolicy, (fm) radio, soundtrigger moved to audioserver.
medialog is removed from mediaserver.
audioserver has same permissions and rights as mediaserver.

mediaserver is allowed to specify client uid to audioserver.

Subsequent CL will add medialog to audioserver.

TBD: Pare down permissions.

Bug: 24511453
Change-Id: Iccaa08b874a502710d142e72f8abbb3d97c44cfa
/frameworks/av/services/audioflinger/ServiceUtilities.h
be71aa29a3c86d2e01cd17839d2a72ab09a1bce5 28-Apr-2015 Svet Ganov <svetoslavganov@google.com> Respect the record audio app op - media

Change-Id: I3a97977b6e9a09355e2008f780d22d480fb7308b
/frameworks/av/services/audioflinger/ServiceUtilities.h
ab300c8cbf5df98fddca39e8d1698b0307432152 13-Apr-2015 Eric Laurent <elaurent@google.com> audio polciy: remove FM audio capture permission.

Change-Id: I2607d89b0bd87cdd2f4084dfdb55135509a824d5
/frameworks/av/services/audioflinger/ServiceUtilities.h
f53eaf49df1e1e1c01708919e9e0a046543de9b6 09-Oct-2014 Hochi Huang <hochi.huang@mediatek.com> fix FM no sound issue

Review: https://partner-android-review.git.corp.google.com/#/c/184276

Signed-off-by: Carson Liao <carson.liao@mediatek.com>

Change-Id: I0847c8a6e6d054a9258b52402c914105d902c573
/frameworks/av/services/audioflinger/ServiceUtilities.h
5284ed53c14cd4d15bd793000ede7166d143e69a 29-May-2014 Eric Laurent <elaurent@google.com> audio policy: add permission for routing APIs.

Add check for signature or system permission
"android.permission.MODIFY_AUDIO_ROUTING" for routing
APIs.

Bug: 14815883.
Change-Id: Iefa0b9d90127a53e03a2e6d50dc93d8f4ae63e2f
/frameworks/av/services/audioflinger/ServiceUtilities.h
9a54bc27876acd5d8be5b1fc3dc46701fe76fbb3 09-Sep-2013 Eric Laurent <elaurent@google.com> audioflinger: add HOTWORD audio source.

HOTWORD is a special capture audio source that uses
the same audio tuning as VOICE_RECOGNITION but allows an
active capture to be preempted.

Bug: 10640877.

Change-Id: Iea09a11cbcdbacc8d434e5230e7559dcd1b44ac0
/frameworks/av/services/audioflinger/ServiceUtilities.h
893a5642871114fca3b2a00c6ff8e5699ce3e3ed 17-Aug-2013 Jeff Brown <jeffbrown@google.com> Enforce permission for recording from remote submix.

Bug: 10265163
Change-Id: I2395036bac6e10baeaf6ea4bc3093bd9dd98742d
/frameworks/av/services/audioflinger/ServiceUtilities.h
949a926cadbc961fbb649c91d76d7aee8ea4d7bd 16-Apr-2013 Glenn Kasten <gkasten@google.com> Use correct pid when running under test harness

This is a partial fix which addresses one of the root causes of this bug,
but only when running under test harness. It has no effect otherwise.

Bug: 8598539
Change-Id: I87444daef1d76b17544f331e651ba1c87893c381
/frameworks/av/services/audioflinger/ServiceUtilities.h
44deb053252a3bd2f57a007ab9560f4924f62394 06-Feb-2012 Glenn Kasten <gkasten@google.com> Factor out and speed up permission-checking code

Use the caching permission check for dump to save IPC.

Cache getpid() to save kernel call for other permission checks.

The C runtime library getpid() can't cache due to a fork
race condition, but we know that mediaserver doesn't fork.

Don't construct String16 on the stack.

Change-Id: I6be6161dae5155d39ba6ed6228e7683e67be34ed
/frameworks/av/services/audioflinger/ServiceUtilities.h