Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b4785605 authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Merge cherrypicks of [3338259] into pi-release

Change-Id: I1ee645f867092967253a72ada05adeb214b1fd97
parents 5e4eafe0 e7f7f212
Loading
Loading
Loading
Loading
+4 −31
Original line number Original line Diff line number Diff line
@@ -22,7 +22,6 @@
#include <stdint.h>
#include <stdint.h>
#include <sys/types.h>
#include <sys/types.h>


#include <binder/IPCThreadState.h>
#include <binder/Parcel.h>
#include <binder/Parcel.h>


#include "IAudioFlinger.h"
#include "IAudioFlinger.h"
@@ -900,35 +899,6 @@ IMPLEMENT_META_INTERFACE(AudioFlinger, "android.media.IAudioFlinger");
status_t BnAudioFlinger::onTransact(
status_t BnAudioFlinger::onTransact(
    uint32_t code, const Parcel& data, Parcel* reply, uint32_t flags)
    uint32_t code, const Parcel& data, Parcel* reply, uint32_t flags)
{
{
    // make sure transactions reserved to AudioPolicyManager do not come from other processes
    switch (code) {
        case SET_STREAM_VOLUME:
        case SET_STREAM_MUTE:
        case SET_MODE:
        case OPEN_OUTPUT:
        case OPEN_DUPLICATE_OUTPUT:
        case CLOSE_OUTPUT:
        case SUSPEND_OUTPUT:
        case RESTORE_OUTPUT:
        case OPEN_INPUT:
        case CLOSE_INPUT:
        case INVALIDATE_STREAM:
        case SET_VOICE_VOLUME:
        case MOVE_EFFECTS:
        case LOAD_HW_MODULE:
        case LIST_AUDIO_PORTS:
        case GET_AUDIO_PORT:
        case CREATE_AUDIO_PATCH:
        case RELEASE_AUDIO_PATCH:
        case LIST_AUDIO_PATCHES:
        case SET_AUDIO_PORT_CONFIG:
            ALOGW("%s: transaction %d received from PID %d",
                  __func__, code, IPCThreadState::self()->getCallingPid());
            return INVALID_OPERATION;
        default:
            break;
    }

    // Whitelist of relevant events to trigger log merging.
    // Whitelist of relevant events to trigger log merging.
    // Log merging should activate during audio activity of any kind. This are considered the
    // Log merging should activate during audio activity of any kind. This are considered the
    // most relevant events.
    // most relevant events.
@@ -938,8 +908,12 @@ status_t BnAudioFlinger::onTransact(
        case OPEN_RECORD:
        case OPEN_RECORD:
        case SET_MASTER_VOLUME:
        case SET_MASTER_VOLUME:
        case SET_MASTER_MUTE:
        case SET_MASTER_MUTE:
        case SET_STREAM_VOLUME:
        case SET_STREAM_MUTE:
        case SET_MIC_MUTE:
        case SET_MIC_MUTE:
        case SET_PARAMETERS:
        case SET_PARAMETERS:
        case OPEN_INPUT:
        case SET_VOICE_VOLUME:
        case CREATE_EFFECT:
        case CREATE_EFFECT:
        case SYSTEM_READY: {
        case SYSTEM_READY: {
            requestLogMerge();
            requestLogMerge();
@@ -948,7 +922,6 @@ status_t BnAudioFlinger::onTransact(
        default:
        default:
            break;
            break;
    }
    }

    switch (code) {
    switch (code) {
        case CREATE_TRACK: {
        case CREATE_TRACK: {
            CHECK_INTERFACE(IAudioFlinger, data, reply);
            CHECK_INTERFACE(IAudioFlinger, data, reply);
+1 −25
Original line number Original line Diff line number Diff line
@@ -22,7 +22,6 @@
#include <math.h>
#include <math.h>
#include <sys/types.h>
#include <sys/types.h>


#include <binder/IPCThreadState.h>
#include <binder/Parcel.h>
#include <binder/Parcel.h>


#include <media/AudioEffect.h>
#include <media/AudioEffect.h>
@@ -832,33 +831,10 @@ IMPLEMENT_META_INTERFACE(AudioPolicyService, "android.media.IAudioPolicyService"


// ----------------------------------------------------------------------
// ----------------------------------------------------------------------



status_t BnAudioPolicyService::onTransact(
status_t BnAudioPolicyService::onTransact(
    uint32_t code, const Parcel& data, Parcel* reply, uint32_t flags)
    uint32_t code, const Parcel& data, Parcel* reply, uint32_t flags)
{
{
    // make sure transactions reserved to AudioFlinger do not come from other processes
    switch (code) {
        case START_OUTPUT:
        case STOP_OUTPUT:
        case RELEASE_OUTPUT:
        case GET_INPUT_FOR_ATTR:
        case START_INPUT:
        case STOP_INPUT:
        case RELEASE_INPUT:
        case GET_STRATEGY_FOR_STREAM:
        case GET_OUTPUT_FOR_EFFECT:
        case REGISTER_EFFECT:
        case UNREGISTER_EFFECT:
        case SET_EFFECT_ENABLED:
        case GET_OUTPUT_FOR_ATTR:
        case ACQUIRE_SOUNDTRIGGER_SESSION:
        case RELEASE_SOUNDTRIGGER_SESSION:
            ALOGW("%s: transaction %d received from PID %d",
                  __func__, code, IPCThreadState::self()->getCallingPid());
            return INVALID_OPERATION;
        default:
            break;
    }

    switch (code) {
    switch (code) {
        case SET_DEVICE_CONNECTION_STATE: {
        case SET_DEVICE_CONNECTION_STATE: {
            CHECK_INTERFACE(IAudioPolicyService, data, reply);
            CHECK_INTERFACE(IAudioPolicyService, data, reply);