IAudioPolicyService.cpp revision fa2877b9ea48baed934b866d2ab3658b69c4c869
1c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent/*
2c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent**
3c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent** Copyright 2009, The Android Open Source Project
4c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent**
5c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent** Licensed under the Apache License, Version 2.0 (the "License");
6c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent** you may not use this file except in compliance with the License.
7c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent** You may obtain a copy of the License at
8c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent**
9c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent**     http://www.apache.org/licenses/LICENSE-2.0
10c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent**
11c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent** Unless required by applicable law or agreed to in writing, software
12c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent** distributed under the License is distributed on an "AS IS" BASIS,
13c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent** See the License for the specific language governing permissions and
15c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent** limitations under the License.
16c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent*/
17c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent
18c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent#define LOG_TAG "IAudioPolicyService"
19c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent#include <utils/Log.h>
20c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent
21c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent#include <stdint.h>
22c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent#include <sys/types.h>
23c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent
24c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent#include <binder/Parcel.h>
25c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent
26c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent#include <media/IAudioPolicyService.h>
27c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent
28c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurentnamespace android {
29c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent
30c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurentenum {
31c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent    SET_DEVICE_CONNECTION_STATE = IBinder::FIRST_CALL_TRANSACTION,
32c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent    GET_DEVICE_CONNECTION_STATE,
33c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent    SET_PHONE_STATE,
34c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent    SET_RINGER_MODE,
35c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent    SET_FORCE_USE,
36c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent    GET_FORCE_USE,
37c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent    GET_OUTPUT,
38c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent    START_OUTPUT,
39c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent    STOP_OUTPUT,
40c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent    RELEASE_OUTPUT,
41c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent    GET_INPUT,
42c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent    START_INPUT,
43c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent    STOP_INPUT,
44c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent    RELEASE_INPUT,
45c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent    INIT_STREAM_VOLUME,
46c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent    SET_STREAM_VOLUME,
47c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent    GET_STREAM_VOLUME
48c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent};
49c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent
50c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurentclass BpAudioPolicyService : public BpInterface<IAudioPolicyService>
51c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent{
52c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurentpublic:
53c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent    BpAudioPolicyService(const sp<IBinder>& impl)
54c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent        : BpInterface<IAudioPolicyService>(impl)
55c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent    {
56c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent    }
57c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent
58c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent    virtual status_t setDeviceConnectionState(
59c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent                                    AudioSystem::audio_devices device,
60c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent                                    AudioSystem::device_connection_state state,
61c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent                                    const char *device_address)
62c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent    {
63c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent        Parcel data, reply;
64c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent        data.writeInterfaceToken(IAudioPolicyService::getInterfaceDescriptor());
65c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent        data.writeInt32(static_cast <uint32_t>(device));
66c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent        data.writeInt32(static_cast <uint32_t>(state));
67c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent        data.writeCString(device_address);
68c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent        remote()->transact(SET_DEVICE_CONNECTION_STATE, data, &reply);
69c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent        return static_cast <status_t> (reply.readInt32());
70c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent    }
71c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent
72c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent    virtual AudioSystem::device_connection_state getDeviceConnectionState(
73c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent                                    AudioSystem::audio_devices device,
74c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent                                    const char *device_address)
75c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent    {
76c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent        Parcel data, reply;
77c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent        data.writeInterfaceToken(IAudioPolicyService::getInterfaceDescriptor());
78c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent        data.writeInt32(static_cast <uint32_t>(device));
79c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent        data.writeCString(device_address);
80c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent        remote()->transact(GET_DEVICE_CONNECTION_STATE, data, &reply);
81c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent        return static_cast <AudioSystem::device_connection_state>(reply.readInt32());
82c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent    }
83c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent
84c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent    virtual status_t setPhoneState(int state)
85c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent    {
86c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent        Parcel data, reply;
87c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent        data.writeInterfaceToken(IAudioPolicyService::getInterfaceDescriptor());
88c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent        data.writeInt32(state);
89c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent        remote()->transact(SET_PHONE_STATE, data, &reply);
90c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent        return static_cast <status_t> (reply.readInt32());
91c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent    }
92c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent
93c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent    virtual status_t setRingerMode(uint32_t mode, uint32_t mask)
94c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent    {
95c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent        Parcel data, reply;
96c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent        data.writeInterfaceToken(IAudioPolicyService::getInterfaceDescriptor());
97c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent        data.writeInt32(mode);
98c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent        data.writeInt32(mask);
99c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent        remote()->transact(SET_RINGER_MODE, data, &reply);
100c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent        return static_cast <status_t> (reply.readInt32());
101c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent    }
102c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent
103c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent    virtual status_t setForceUse(AudioSystem::force_use usage, AudioSystem::forced_config config)
104c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent    {
105c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent        Parcel data, reply;
106c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent        data.writeInterfaceToken(IAudioPolicyService::getInterfaceDescriptor());
107c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent        data.writeInt32(static_cast <uint32_t>(usage));
108c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent        data.writeInt32(static_cast <uint32_t>(config));
109c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent        remote()->transact(SET_FORCE_USE, data, &reply);
110c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent        return static_cast <status_t> (reply.readInt32());
111c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent    }
112c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent
113c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent    virtual AudioSystem::forced_config getForceUse(AudioSystem::force_use usage)
114c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent    {
115c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent        Parcel data, reply;
116c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent        data.writeInterfaceToken(IAudioPolicyService::getInterfaceDescriptor());
117c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent        data.writeInt32(static_cast <uint32_t>(usage));
118c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent        remote()->transact(GET_FORCE_USE, data, &reply);
119c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent        return static_cast <AudioSystem::forced_config> (reply.readInt32());
120c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent    }
121c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent
122c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent    virtual audio_io_handle_t getOutput(
123c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent                                        AudioSystem::stream_type stream,
124c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent                                        uint32_t samplingRate,
125c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent                                        uint32_t format,
126c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent                                        uint32_t channels,
127c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent                                        AudioSystem::output_flags flags)
128c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent    {
129c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent        Parcel data, reply;
130c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent        data.writeInterfaceToken(IAudioPolicyService::getInterfaceDescriptor());
131c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent        data.writeInt32(static_cast <uint32_t>(stream));
132c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent        data.writeInt32(samplingRate);
133c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent        data.writeInt32(static_cast <uint32_t>(format));
134c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent        data.writeInt32(channels);
135c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent        data.writeInt32(static_cast <uint32_t>(flags));
136c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent        remote()->transact(GET_OUTPUT, data, &reply);
137fa2877b9ea48baed934b866d2ab3658b69c4c869Eric Laurent        return static_cast <audio_io_handle_t> (reply.readInt32());
138c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent    }
139c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent
140c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent    virtual status_t startOutput(audio_io_handle_t output, AudioSystem::stream_type stream)
141c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent    {
142c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent        Parcel data, reply;
143c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent        data.writeInterfaceToken(IAudioPolicyService::getInterfaceDescriptor());
144fa2877b9ea48baed934b866d2ab3658b69c4c869Eric Laurent        data.writeInt32(output);
145c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent        data.writeInt32(stream);
146c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent        remote()->transact(START_OUTPUT, data, &reply);
147c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent        return static_cast <status_t> (reply.readInt32());
148c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent    }
149c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent
150c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent    virtual status_t stopOutput(audio_io_handle_t output, AudioSystem::stream_type stream)
151c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent    {
152c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent        Parcel data, reply;
153c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent        data.writeInterfaceToken(IAudioPolicyService::getInterfaceDescriptor());
154fa2877b9ea48baed934b866d2ab3658b69c4c869Eric Laurent        data.writeInt32(output);
155c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent        data.writeInt32(stream);
156c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent        remote()->transact(STOP_OUTPUT, data, &reply);
157c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent        return static_cast <status_t> (reply.readInt32());
158c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent    }
159c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent
160c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent    virtual void releaseOutput(audio_io_handle_t output)
161c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent    {
162c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent        Parcel data, reply;
163c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent        data.writeInterfaceToken(IAudioPolicyService::getInterfaceDescriptor());
164fa2877b9ea48baed934b866d2ab3658b69c4c869Eric Laurent        data.writeInt32(output);
165c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent        remote()->transact(RELEASE_OUTPUT, data, &reply);
166c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent    }
167c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent
168c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent    virtual audio_io_handle_t getInput(
169c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent                                    int inputSource,
170c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent                                    uint32_t samplingRate,
171c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent                                    uint32_t format,
172c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent                                    uint32_t channels,
173c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent                                    AudioSystem::audio_in_acoustics acoustics)
174c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent    {
175c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent        Parcel data, reply;
176c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent        data.writeInterfaceToken(IAudioPolicyService::getInterfaceDescriptor());
177c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent        data.writeInt32(inputSource);
178c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent        data.writeInt32(samplingRate);
179c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent        data.writeInt32(static_cast <uint32_t>(format));
180c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent        data.writeInt32(channels);
181c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent        data.writeInt32(static_cast <uint32_t>(acoustics));
182c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent        remote()->transact(GET_INPUT, data, &reply);
183fa2877b9ea48baed934b866d2ab3658b69c4c869Eric Laurent        return static_cast <audio_io_handle_t> (reply.readInt32());
184c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent    }
185c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent
186c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent    virtual status_t startInput(audio_io_handle_t input)
187c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent    {
188c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent        Parcel data, reply;
189c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent        data.writeInterfaceToken(IAudioPolicyService::getInterfaceDescriptor());
190fa2877b9ea48baed934b866d2ab3658b69c4c869Eric Laurent        data.writeInt32(input);
191c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent        remote()->transact(START_INPUT, data, &reply);
192c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent        return static_cast <status_t> (reply.readInt32());
193c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent    }
194c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent
195c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent    virtual status_t stopInput(audio_io_handle_t input)
196c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent    {
197c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent        Parcel data, reply;
198c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent        data.writeInterfaceToken(IAudioPolicyService::getInterfaceDescriptor());
199fa2877b9ea48baed934b866d2ab3658b69c4c869Eric Laurent        data.writeInt32(input);
200c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent        remote()->transact(STOP_INPUT, data, &reply);
201c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent        return static_cast <status_t> (reply.readInt32());
202c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent    }
203c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent
204c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent    virtual void releaseInput(audio_io_handle_t input)
205c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent    {
206c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent        Parcel data, reply;
207c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent        data.writeInterfaceToken(IAudioPolicyService::getInterfaceDescriptor());
208fa2877b9ea48baed934b866d2ab3658b69c4c869Eric Laurent        data.writeInt32(input);
209c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent        remote()->transact(RELEASE_INPUT, data, &reply);
210c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent    }
211c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent
212c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent    virtual status_t initStreamVolume(AudioSystem::stream_type stream,
213c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent                                    int indexMin,
214c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent                                    int indexMax)
215c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent    {
216c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent        Parcel data, reply;
217c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent        data.writeInterfaceToken(IAudioPolicyService::getInterfaceDescriptor());
218c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent        data.writeInt32(static_cast <uint32_t>(stream));
219c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent        data.writeInt32(indexMin);
220c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent        data.writeInt32(indexMax);
221c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent        remote()->transact(INIT_STREAM_VOLUME, data, &reply);
222c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent        return static_cast <status_t> (reply.readInt32());
223c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent    }
224c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent
225c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent    virtual status_t setStreamVolumeIndex(AudioSystem::stream_type stream, int index)
226c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent    {
227c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent        Parcel data, reply;
228c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent        data.writeInterfaceToken(IAudioPolicyService::getInterfaceDescriptor());
229c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent        data.writeInt32(static_cast <uint32_t>(stream));
230c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent        data.writeInt32(index);
231c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent        remote()->transact(SET_STREAM_VOLUME, data, &reply);
232c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent        return static_cast <status_t> (reply.readInt32());
233c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent    }
234c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent
235c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent    virtual status_t getStreamVolumeIndex(AudioSystem::stream_type stream, int *index)
236c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent    {
237c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent        Parcel data, reply;
238c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent        data.writeInterfaceToken(IAudioPolicyService::getInterfaceDescriptor());
239c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent        data.writeInt32(static_cast <uint32_t>(stream));
240c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent        remote()->transact(GET_STREAM_VOLUME, data, &reply);
241c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent        int lIndex = reply.readInt32();
242c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent        if (index) *index = lIndex;
243c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent        return static_cast <status_t> (reply.readInt32());
244c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent    }
245c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent};
246c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent
247c2f1f07084818942352c6bbfb36af9b6b330eb4eEric LaurentIMPLEMENT_META_INTERFACE(AudioPolicyService, "android.media.IAudioPolicyService");
248c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent
249c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent// ----------------------------------------------------------------------
250c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent
251c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent
252c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurentstatus_t BnAudioPolicyService::onTransact(
253c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent    uint32_t code, const Parcel& data, Parcel* reply, uint32_t flags)
254c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent{
255c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent    switch(code) {
256c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent        case SET_DEVICE_CONNECTION_STATE: {
257c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent            CHECK_INTERFACE(IAudioPolicyService, data, reply);
258c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent            AudioSystem::audio_devices device = static_cast <AudioSystem::audio_devices>(data.readInt32());
259c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent            AudioSystem::device_connection_state state = static_cast <AudioSystem::device_connection_state>(data.readInt32());
260c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent            const char *device_address = data.readCString();
261c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent            reply->writeInt32(static_cast <uint32_t>(setDeviceConnectionState(device, state, device_address)));
262c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent            return NO_ERROR;
263c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent        } break;
264c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent
265c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent        case GET_DEVICE_CONNECTION_STATE: {
266c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent            CHECK_INTERFACE(IAudioPolicyService, data, reply);
267c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent            AudioSystem::audio_devices device = static_cast <AudioSystem::audio_devices>(data.readInt32());
268c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent            const char *device_address = data.readCString();
269c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent            reply->writeInt32(static_cast <uint32_t>(getDeviceConnectionState(device, device_address)));
270c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent            return NO_ERROR;
271c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent        } break;
272c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent
273c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent        case SET_PHONE_STATE: {
274c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent            CHECK_INTERFACE(IAudioPolicyService, data, reply);
275c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent            reply->writeInt32(static_cast <uint32_t>(setPhoneState(data.readInt32())));
276c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent            return NO_ERROR;
277c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent        } break;
278c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent
279c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent        case SET_RINGER_MODE: {
280c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent            CHECK_INTERFACE(IAudioPolicyService, data, reply);
281c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent            uint32_t mode = data.readInt32();
282c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent            uint32_t mask = data.readInt32();
283c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent            reply->writeInt32(static_cast <uint32_t>(setRingerMode(mode, mask)));
284c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent            return NO_ERROR;
285c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent        } break;
286c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent
287c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent        case SET_FORCE_USE: {
288c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent            CHECK_INTERFACE(IAudioPolicyService, data, reply);
289c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent            AudioSystem::force_use usage = static_cast <AudioSystem::force_use>(data.readInt32());
290c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent            AudioSystem::forced_config config = static_cast <AudioSystem::forced_config>(data.readInt32());
291c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent            reply->writeInt32(static_cast <uint32_t>(setForceUse(usage, config)));
292c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent            return NO_ERROR;
293c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent        } break;
294c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent
295c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent        case GET_FORCE_USE: {
296c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent            CHECK_INTERFACE(IAudioPolicyService, data, reply);
297c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent            AudioSystem::force_use usage = static_cast <AudioSystem::force_use>(data.readInt32());
298c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent            reply->writeInt32(static_cast <uint32_t>(getForceUse(usage)));
299c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent            return NO_ERROR;
300c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent        } break;
301c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent
302c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent        case GET_OUTPUT: {
303c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent            CHECK_INTERFACE(IAudioPolicyService, data, reply);
304c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent            AudioSystem::stream_type stream = static_cast <AudioSystem::stream_type>(data.readInt32());
305c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent            uint32_t samplingRate = data.readInt32();
306c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent            uint32_t format = data.readInt32();
307c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent            uint32_t channels = data.readInt32();
308c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent            AudioSystem::output_flags flags = static_cast <AudioSystem::output_flags>(data.readInt32());
309c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent
310c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent            audio_io_handle_t output = getOutput(stream,
311c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent                                                 samplingRate,
312c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent                                                 format,
313c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent                                                 channels,
314c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent                                                 flags);
315fa2877b9ea48baed934b866d2ab3658b69c4c869Eric Laurent            reply->writeInt32(static_cast <int>(output));
316c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent            return NO_ERROR;
317c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent        } break;
318c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent
319c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent        case START_OUTPUT: {
320c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent            CHECK_INTERFACE(IAudioPolicyService, data, reply);
321fa2877b9ea48baed934b866d2ab3658b69c4c869Eric Laurent            audio_io_handle_t output = static_cast <audio_io_handle_t>(data.readInt32());
322c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent            uint32_t stream = data.readInt32();
323c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent            reply->writeInt32(static_cast <uint32_t>(startOutput(output, (AudioSystem::stream_type)stream)));
324c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent            return NO_ERROR;
325c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent        } break;
326c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent
327c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent        case STOP_OUTPUT: {
328c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent            CHECK_INTERFACE(IAudioPolicyService, data, reply);
329fa2877b9ea48baed934b866d2ab3658b69c4c869Eric Laurent            audio_io_handle_t output = static_cast <audio_io_handle_t>(data.readInt32());
330c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent            uint32_t stream = data.readInt32();
331c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent            reply->writeInt32(static_cast <uint32_t>(stopOutput(output, (AudioSystem::stream_type)stream)));
332c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent            return NO_ERROR;
333c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent        } break;
334c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent
335c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent        case RELEASE_OUTPUT: {
336c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent            CHECK_INTERFACE(IAudioPolicyService, data, reply);
337fa2877b9ea48baed934b866d2ab3658b69c4c869Eric Laurent            audio_io_handle_t output = static_cast <audio_io_handle_t>(data.readInt32());
338c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent            releaseOutput(output);
339c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent            return NO_ERROR;
340c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent        } break;
341c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent
342c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent        case GET_INPUT: {
343c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent            CHECK_INTERFACE(IAudioPolicyService, data, reply);
344c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent            int inputSource = data.readInt32();
345c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent            uint32_t samplingRate = data.readInt32();
346c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent            uint32_t format = data.readInt32();
347c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent            uint32_t channels = data.readInt32();
348c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent            AudioSystem::audio_in_acoustics acoustics = static_cast <AudioSystem::audio_in_acoustics>(data.readInt32());
349c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent            audio_io_handle_t input = getInput(inputSource,
350c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent                                               samplingRate,
351c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent                                               format,
352c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent                                               channels,
353c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent                                               acoustics);
354fa2877b9ea48baed934b866d2ab3658b69c4c869Eric Laurent            reply->writeInt32(static_cast <int>(input));
355c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent            return NO_ERROR;
356c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent        } break;
357c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent
358c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent        case START_INPUT: {
359c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent            CHECK_INTERFACE(IAudioPolicyService, data, reply);
360fa2877b9ea48baed934b866d2ab3658b69c4c869Eric Laurent            audio_io_handle_t input = static_cast <audio_io_handle_t>(data.readInt32());
361c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent            reply->writeInt32(static_cast <uint32_t>(startInput(input)));
362c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent            return NO_ERROR;
363c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent        } break;
364c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent
365c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent        case STOP_INPUT: {
366c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent            CHECK_INTERFACE(IAudioPolicyService, data, reply);
367fa2877b9ea48baed934b866d2ab3658b69c4c869Eric Laurent            audio_io_handle_t input = static_cast <audio_io_handle_t>(data.readInt32());
368c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent            reply->writeInt32(static_cast <uint32_t>(stopInput(input)));
369c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent            return NO_ERROR;
370c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent        } break;
371c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent
372c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent        case RELEASE_INPUT: {
373c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent            CHECK_INTERFACE(IAudioPolicyService, data, reply);
374fa2877b9ea48baed934b866d2ab3658b69c4c869Eric Laurent            audio_io_handle_t input = static_cast <audio_io_handle_t>(data.readInt32());
375c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent            releaseInput(input);
376c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent            return NO_ERROR;
377c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent        } break;
378c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent
379c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent        case INIT_STREAM_VOLUME: {
380c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent            CHECK_INTERFACE(IAudioPolicyService, data, reply);
381c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent            AudioSystem::stream_type stream = static_cast <AudioSystem::stream_type>(data.readInt32());
382c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent            int indexMin = data.readInt32();
383c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent            int indexMax = data.readInt32();
384c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent            reply->writeInt32(static_cast <uint32_t>(initStreamVolume(stream, indexMin,indexMax)));
385c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent            return NO_ERROR;
386c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent        } break;
387c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent
388c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent        case SET_STREAM_VOLUME: {
389c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent            CHECK_INTERFACE(IAudioPolicyService, data, reply);
390c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent            AudioSystem::stream_type stream = static_cast <AudioSystem::stream_type>(data.readInt32());
391c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent            int index = data.readInt32();
392c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent            reply->writeInt32(static_cast <uint32_t>(setStreamVolumeIndex(stream, index)));
393c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent            return NO_ERROR;
394c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent        } break;
395c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent
396c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent        case GET_STREAM_VOLUME: {
397c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent            CHECK_INTERFACE(IAudioPolicyService, data, reply);
398c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent            AudioSystem::stream_type stream = static_cast <AudioSystem::stream_type>(data.readInt32());
399c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent            int index;
400c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent            status_t status = getStreamVolumeIndex(stream, &index);
401c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent            reply->writeInt32(index);
402c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent            reply->writeInt32(static_cast <uint32_t>(status));
403c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent            return NO_ERROR;
404c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent        } break;
405c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent
406c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent        default:
407c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent            return BBinder::onTransact(code, data, reply, flags);
408c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent    }
409c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent}
410c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent
411c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent// ----------------------------------------------------------------------------
412c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent
413c2f1f07084818942352c6bbfb36af9b6b330eb4eEric Laurent}; // namespace android
414