2009-03-03 19:31:44 -08:00
|
|
|
/* //device/extlibs/pv/android/IAudioflinger.cpp
|
|
|
|
**
|
|
|
|
** Copyright 2007, The Android Open Source Project
|
|
|
|
**
|
|
|
|
** Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
** you may not use this file except in compliance with the License.
|
|
|
|
** You may obtain a copy of the License at
|
|
|
|
**
|
|
|
|
** http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
**
|
|
|
|
** Unless required by applicable law or agreed to in writing, software
|
|
|
|
** distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
** See the License for the specific language governing permissions and
|
|
|
|
** limitations under the License.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#define LOG_TAG "IAudioFlinger"
|
2009-07-17 12:17:14 -07:00
|
|
|
//#define LOG_NDEBUG 0
|
2009-03-03 19:31:44 -08:00
|
|
|
#include <utils/Log.h>
|
|
|
|
|
|
|
|
#include <stdint.h>
|
|
|
|
#include <sys/types.h>
|
|
|
|
|
2009-05-19 19:08:10 -07:00
|
|
|
#include <binder/Parcel.h>
|
2009-03-03 19:31:44 -08:00
|
|
|
|
|
|
|
#include <media/IAudioFlinger.h>
|
|
|
|
|
|
|
|
namespace android {
|
|
|
|
|
|
|
|
enum {
|
|
|
|
CREATE_TRACK = IBinder::FIRST_CALL_TRANSACTION,
|
|
|
|
OPEN_RECORD,
|
|
|
|
SAMPLE_RATE,
|
|
|
|
CHANNEL_COUNT,
|
|
|
|
FORMAT,
|
|
|
|
FRAME_COUNT,
|
|
|
|
LATENCY,
|
|
|
|
SET_MASTER_VOLUME,
|
|
|
|
SET_MASTER_MUTE,
|
|
|
|
MASTER_VOLUME,
|
|
|
|
MASTER_MUTE,
|
|
|
|
SET_STREAM_VOLUME,
|
|
|
|
SET_STREAM_MUTE,
|
|
|
|
STREAM_VOLUME,
|
|
|
|
STREAM_MUTE,
|
|
|
|
SET_MODE,
|
|
|
|
SET_MIC_MUTE,
|
|
|
|
GET_MIC_MUTE,
|
2010-01-25 08:49:09 -08:00
|
|
|
IS_STREAM_ACTIVE,
|
2009-07-17 12:17:14 -07:00
|
|
|
SET_PARAMETERS,
|
|
|
|
GET_PARAMETERS,
|
2009-03-03 19:31:44 -08:00
|
|
|
REGISTER_CLIENT,
|
|
|
|
GET_INPUTBUFFERSIZE,
|
2009-07-17 12:17:14 -07:00
|
|
|
OPEN_OUTPUT,
|
|
|
|
OPEN_DUPLICATE_OUTPUT,
|
|
|
|
CLOSE_OUTPUT,
|
|
|
|
SUSPEND_OUTPUT,
|
|
|
|
RESTORE_OUTPUT,
|
|
|
|
OPEN_INPUT,
|
|
|
|
CLOSE_INPUT,
|
2009-10-21 08:14:22 -07:00
|
|
|
SET_STREAM_OUTPUT,
|
2010-01-19 17:37:09 -08:00
|
|
|
SET_VOICE_VOLUME,
|
2010-02-26 02:47:27 -08:00
|
|
|
GET_RENDER_POSITION,
|
|
|
|
GET_INPUT_FRAMES_LOST
|
2009-03-03 19:31:44 -08:00
|
|
|
};
|
|
|
|
|
|
|
|
class BpAudioFlinger : public BpInterface<IAudioFlinger>
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
BpAudioFlinger(const sp<IBinder>& impl)
|
|
|
|
: BpInterface<IAudioFlinger>(impl)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
virtual sp<IAudioTrack> createTrack(
|
|
|
|
pid_t pid,
|
|
|
|
int streamType,
|
|
|
|
uint32_t sampleRate,
|
|
|
|
int format,
|
|
|
|
int channelCount,
|
|
|
|
int frameCount,
|
|
|
|
uint32_t flags,
|
|
|
|
const sp<IMemory>& sharedBuffer,
|
2009-07-28 08:44:33 -07:00
|
|
|
int output,
|
2009-03-03 19:31:44 -08:00
|
|
|
status_t *status)
|
|
|
|
{
|
|
|
|
Parcel data, reply;
|
2009-09-09 05:16:08 -07:00
|
|
|
sp<IAudioTrack> track;
|
2009-03-03 19:31:44 -08:00
|
|
|
data.writeInterfaceToken(IAudioFlinger::getInterfaceDescriptor());
|
|
|
|
data.writeInt32(pid);
|
|
|
|
data.writeInt32(streamType);
|
|
|
|
data.writeInt32(sampleRate);
|
|
|
|
data.writeInt32(format);
|
|
|
|
data.writeInt32(channelCount);
|
|
|
|
data.writeInt32(frameCount);
|
|
|
|
data.writeInt32(flags);
|
|
|
|
data.writeStrongBinder(sharedBuffer->asBinder());
|
2009-07-28 08:44:33 -07:00
|
|
|
data.writeInt32(output);
|
2009-03-03 19:31:44 -08:00
|
|
|
status_t lStatus = remote()->transact(CREATE_TRACK, data, &reply);
|
|
|
|
if (lStatus != NO_ERROR) {
|
|
|
|
LOGE("createTrack error: %s", strerror(-lStatus));
|
2009-09-09 05:16:08 -07:00
|
|
|
} else {
|
|
|
|
lStatus = reply.readInt32();
|
|
|
|
track = interface_cast<IAudioTrack>(reply.readStrongBinder());
|
2009-03-03 19:31:44 -08:00
|
|
|
}
|
|
|
|
if (status) {
|
|
|
|
*status = lStatus;
|
|
|
|
}
|
2009-09-09 05:16:08 -07:00
|
|
|
return track;
|
2009-03-03 19:31:44 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
virtual sp<IAudioRecord> openRecord(
|
|
|
|
pid_t pid,
|
2009-07-28 08:44:33 -07:00
|
|
|
int input,
|
2009-03-03 19:31:44 -08:00
|
|
|
uint32_t sampleRate,
|
|
|
|
int format,
|
|
|
|
int channelCount,
|
|
|
|
int frameCount,
|
|
|
|
uint32_t flags,
|
|
|
|
status_t *status)
|
|
|
|
{
|
|
|
|
Parcel data, reply;
|
2009-09-09 05:16:08 -07:00
|
|
|
sp<IAudioRecord> record;
|
2009-03-03 19:31:44 -08:00
|
|
|
data.writeInterfaceToken(IAudioFlinger::getInterfaceDescriptor());
|
|
|
|
data.writeInt32(pid);
|
2009-07-28 08:44:33 -07:00
|
|
|
data.writeInt32(input);
|
2009-03-03 19:31:44 -08:00
|
|
|
data.writeInt32(sampleRate);
|
|
|
|
data.writeInt32(format);
|
|
|
|
data.writeInt32(channelCount);
|
|
|
|
data.writeInt32(frameCount);
|
|
|
|
data.writeInt32(flags);
|
2009-09-09 05:16:08 -07:00
|
|
|
status_t lStatus = remote()->transact(OPEN_RECORD, data, &reply);
|
|
|
|
if (lStatus != NO_ERROR) {
|
|
|
|
LOGE("openRecord error: %s", strerror(-lStatus));
|
|
|
|
} else {
|
|
|
|
lStatus = reply.readInt32();
|
|
|
|
record = interface_cast<IAudioRecord>(reply.readStrongBinder());
|
|
|
|
}
|
2009-03-03 19:31:44 -08:00
|
|
|
if (status) {
|
|
|
|
*status = lStatus;
|
|
|
|
}
|
2009-09-09 05:16:08 -07:00
|
|
|
return record;
|
2009-03-03 19:31:44 -08:00
|
|
|
}
|
|
|
|
|
2009-07-28 08:44:33 -07:00
|
|
|
virtual uint32_t sampleRate(int output) const
|
2009-03-03 19:31:44 -08:00
|
|
|
{
|
|
|
|
Parcel data, reply;
|
|
|
|
data.writeInterfaceToken(IAudioFlinger::getInterfaceDescriptor());
|
2009-07-28 08:44:33 -07:00
|
|
|
data.writeInt32(output);
|
2009-03-03 19:31:44 -08:00
|
|
|
remote()->transact(SAMPLE_RATE, data, &reply);
|
|
|
|
return reply.readInt32();
|
|
|
|
}
|
|
|
|
|
2009-07-28 08:44:33 -07:00
|
|
|
virtual int channelCount(int output) const
|
2009-03-03 19:31:44 -08:00
|
|
|
{
|
|
|
|
Parcel data, reply;
|
|
|
|
data.writeInterfaceToken(IAudioFlinger::getInterfaceDescriptor());
|
2009-07-28 08:44:33 -07:00
|
|
|
data.writeInt32(output);
|
2009-03-03 19:31:44 -08:00
|
|
|
remote()->transact(CHANNEL_COUNT, data, &reply);
|
|
|
|
return reply.readInt32();
|
|
|
|
}
|
|
|
|
|
2009-07-28 08:44:33 -07:00
|
|
|
virtual int format(int output) const
|
2009-03-03 19:31:44 -08:00
|
|
|
{
|
|
|
|
Parcel data, reply;
|
|
|
|
data.writeInterfaceToken(IAudioFlinger::getInterfaceDescriptor());
|
2009-07-28 08:44:33 -07:00
|
|
|
data.writeInt32(output);
|
2009-03-03 19:31:44 -08:00
|
|
|
remote()->transact(FORMAT, data, &reply);
|
|
|
|
return reply.readInt32();
|
|
|
|
}
|
|
|
|
|
2009-07-28 08:44:33 -07:00
|
|
|
virtual size_t frameCount(int output) const
|
2009-03-03 19:31:44 -08:00
|
|
|
{
|
|
|
|
Parcel data, reply;
|
|
|
|
data.writeInterfaceToken(IAudioFlinger::getInterfaceDescriptor());
|
2009-07-28 08:44:33 -07:00
|
|
|
data.writeInt32(output);
|
2009-03-03 19:31:44 -08:00
|
|
|
remote()->transact(FRAME_COUNT, data, &reply);
|
|
|
|
return reply.readInt32();
|
|
|
|
}
|
|
|
|
|
2009-07-28 08:44:33 -07:00
|
|
|
virtual uint32_t latency(int output) const
|
2009-03-03 19:31:44 -08:00
|
|
|
{
|
|
|
|
Parcel data, reply;
|
|
|
|
data.writeInterfaceToken(IAudioFlinger::getInterfaceDescriptor());
|
2009-07-28 08:44:33 -07:00
|
|
|
data.writeInt32(output);
|
2009-03-03 19:31:44 -08:00
|
|
|
remote()->transact(LATENCY, data, &reply);
|
|
|
|
return reply.readInt32();
|
|
|
|
}
|
|
|
|
|
|
|
|
virtual status_t setMasterVolume(float value)
|
|
|
|
{
|
|
|
|
Parcel data, reply;
|
|
|
|
data.writeInterfaceToken(IAudioFlinger::getInterfaceDescriptor());
|
|
|
|
data.writeFloat(value);
|
|
|
|
remote()->transact(SET_MASTER_VOLUME, data, &reply);
|
|
|
|
return reply.readInt32();
|
|
|
|
}
|
|
|
|
|
|
|
|
virtual status_t setMasterMute(bool muted)
|
|
|
|
{
|
|
|
|
Parcel data, reply;
|
|
|
|
data.writeInterfaceToken(IAudioFlinger::getInterfaceDescriptor());
|
|
|
|
data.writeInt32(muted);
|
|
|
|
remote()->transact(SET_MASTER_MUTE, data, &reply);
|
|
|
|
return reply.readInt32();
|
|
|
|
}
|
|
|
|
|
|
|
|
virtual float masterVolume() const
|
|
|
|
{
|
|
|
|
Parcel data, reply;
|
|
|
|
data.writeInterfaceToken(IAudioFlinger::getInterfaceDescriptor());
|
|
|
|
remote()->transact(MASTER_VOLUME, data, &reply);
|
|
|
|
return reply.readFloat();
|
|
|
|
}
|
|
|
|
|
|
|
|
virtual bool masterMute() const
|
|
|
|
{
|
|
|
|
Parcel data, reply;
|
|
|
|
data.writeInterfaceToken(IAudioFlinger::getInterfaceDescriptor());
|
|
|
|
remote()->transact(MASTER_MUTE, data, &reply);
|
|
|
|
return reply.readInt32();
|
|
|
|
}
|
|
|
|
|
2009-07-28 08:44:33 -07:00
|
|
|
virtual status_t setStreamVolume(int stream, float value, int output)
|
2009-03-03 19:31:44 -08:00
|
|
|
{
|
|
|
|
Parcel data, reply;
|
|
|
|
data.writeInterfaceToken(IAudioFlinger::getInterfaceDescriptor());
|
|
|
|
data.writeInt32(stream);
|
|
|
|
data.writeFloat(value);
|
2009-07-28 08:44:33 -07:00
|
|
|
data.writeInt32(output);
|
2009-03-03 19:31:44 -08:00
|
|
|
remote()->transact(SET_STREAM_VOLUME, data, &reply);
|
|
|
|
return reply.readInt32();
|
|
|
|
}
|
|
|
|
|
|
|
|
virtual status_t setStreamMute(int stream, bool muted)
|
|
|
|
{
|
|
|
|
Parcel data, reply;
|
|
|
|
data.writeInterfaceToken(IAudioFlinger::getInterfaceDescriptor());
|
|
|
|
data.writeInt32(stream);
|
|
|
|
data.writeInt32(muted);
|
|
|
|
remote()->transact(SET_STREAM_MUTE, data, &reply);
|
|
|
|
return reply.readInt32();
|
|
|
|
}
|
|
|
|
|
2009-07-28 08:44:33 -07:00
|
|
|
virtual float streamVolume(int stream, int output) const
|
2009-03-03 19:31:44 -08:00
|
|
|
{
|
|
|
|
Parcel data, reply;
|
|
|
|
data.writeInterfaceToken(IAudioFlinger::getInterfaceDescriptor());
|
|
|
|
data.writeInt32(stream);
|
2009-07-28 08:44:33 -07:00
|
|
|
data.writeInt32(output);
|
2009-03-03 19:31:44 -08:00
|
|
|
remote()->transact(STREAM_VOLUME, data, &reply);
|
|
|
|
return reply.readFloat();
|
|
|
|
}
|
|
|
|
|
|
|
|
virtual bool streamMute(int stream) const
|
|
|
|
{
|
|
|
|
Parcel data, reply;
|
|
|
|
data.writeInterfaceToken(IAudioFlinger::getInterfaceDescriptor());
|
|
|
|
data.writeInt32(stream);
|
|
|
|
remote()->transact(STREAM_MUTE, data, &reply);
|
|
|
|
return reply.readInt32();
|
|
|
|
}
|
|
|
|
|
2009-07-17 12:17:14 -07:00
|
|
|
virtual status_t setMode(int mode)
|
2009-03-03 19:31:44 -08:00
|
|
|
{
|
|
|
|
Parcel data, reply;
|
|
|
|
data.writeInterfaceToken(IAudioFlinger::getInterfaceDescriptor());
|
|
|
|
data.writeInt32(mode);
|
2009-07-17 12:17:14 -07:00
|
|
|
remote()->transact(SET_MODE, data, &reply);
|
2009-03-03 19:31:44 -08:00
|
|
|
return reply.readInt32();
|
|
|
|
}
|
|
|
|
|
2009-07-17 12:17:14 -07:00
|
|
|
virtual status_t setMicMute(bool state)
|
2009-03-03 19:31:44 -08:00
|
|
|
{
|
|
|
|
Parcel data, reply;
|
|
|
|
data.writeInterfaceToken(IAudioFlinger::getInterfaceDescriptor());
|
2009-07-17 12:17:14 -07:00
|
|
|
data.writeInt32(state);
|
|
|
|
remote()->transact(SET_MIC_MUTE, data, &reply);
|
2009-03-03 19:31:44 -08:00
|
|
|
return reply.readInt32();
|
|
|
|
}
|
|
|
|
|
2009-07-17 12:17:14 -07:00
|
|
|
virtual bool getMicMute() const
|
2009-03-03 19:31:44 -08:00
|
|
|
{
|
|
|
|
Parcel data, reply;
|
|
|
|
data.writeInterfaceToken(IAudioFlinger::getInterfaceDescriptor());
|
2009-07-17 12:17:14 -07:00
|
|
|
remote()->transact(GET_MIC_MUTE, data, &reply);
|
2009-03-03 19:31:44 -08:00
|
|
|
return reply.readInt32();
|
|
|
|
}
|
|
|
|
|
2010-01-25 08:49:09 -08:00
|
|
|
virtual bool isStreamActive(int stream) const
|
2009-03-03 19:31:44 -08:00
|
|
|
{
|
|
|
|
Parcel data, reply;
|
|
|
|
data.writeInterfaceToken(IAudioFlinger::getInterfaceDescriptor());
|
2010-01-25 08:49:09 -08:00
|
|
|
data.writeInt32(stream);
|
|
|
|
remote()->transact(IS_STREAM_ACTIVE, data, &reply);
|
2009-03-03 19:31:44 -08:00
|
|
|
return reply.readInt32();
|
|
|
|
}
|
|
|
|
|
2009-07-28 08:44:33 -07:00
|
|
|
virtual status_t setParameters(int ioHandle, const String8& keyValuePairs)
|
2009-03-03 19:31:44 -08:00
|
|
|
{
|
|
|
|
Parcel data, reply;
|
|
|
|
data.writeInterfaceToken(IAudioFlinger::getInterfaceDescriptor());
|
2009-07-28 08:44:33 -07:00
|
|
|
data.writeInt32(ioHandle);
|
2009-07-17 12:17:14 -07:00
|
|
|
data.writeString8(keyValuePairs);
|
|
|
|
remote()->transact(SET_PARAMETERS, data, &reply);
|
2009-03-03 19:31:44 -08:00
|
|
|
return reply.readInt32();
|
|
|
|
}
|
|
|
|
|
2009-07-28 08:44:33 -07:00
|
|
|
virtual String8 getParameters(int ioHandle, const String8& keys)
|
2009-03-03 19:31:44 -08:00
|
|
|
{
|
|
|
|
Parcel data, reply;
|
|
|
|
data.writeInterfaceToken(IAudioFlinger::getInterfaceDescriptor());
|
2009-07-28 08:44:33 -07:00
|
|
|
data.writeInt32(ioHandle);
|
2009-07-17 12:17:14 -07:00
|
|
|
data.writeString8(keys);
|
|
|
|
remote()->transact(GET_PARAMETERS, data, &reply);
|
|
|
|
return reply.readString8();
|
|
|
|
}
|
|
|
|
|
|
|
|
virtual void registerClient(const sp<IAudioFlingerClient>& client)
|
|
|
|
{
|
|
|
|
Parcel data, reply;
|
|
|
|
data.writeInterfaceToken(IAudioFlinger::getInterfaceDescriptor());
|
|
|
|
data.writeStrongBinder(client->asBinder());
|
|
|
|
remote()->transact(REGISTER_CLIENT, data, &reply);
|
|
|
|
}
|
|
|
|
|
|
|
|
virtual size_t getInputBufferSize(uint32_t sampleRate, int format, int channelCount)
|
|
|
|
{
|
|
|
|
Parcel data, reply;
|
|
|
|
data.writeInterfaceToken(IAudioFlinger::getInterfaceDescriptor());
|
|
|
|
data.writeInt32(sampleRate);
|
|
|
|
data.writeInt32(format);
|
|
|
|
data.writeInt32(channelCount);
|
|
|
|
remote()->transact(GET_INPUTBUFFERSIZE, data, &reply);
|
2009-03-03 19:31:44 -08:00
|
|
|
return reply.readInt32();
|
|
|
|
}
|
|
|
|
|
2009-07-28 08:44:33 -07:00
|
|
|
virtual int openOutput(uint32_t *pDevices,
|
2009-07-17 12:17:14 -07:00
|
|
|
uint32_t *pSamplingRate,
|
|
|
|
uint32_t *pFormat,
|
|
|
|
uint32_t *pChannels,
|
|
|
|
uint32_t *pLatencyMs,
|
|
|
|
uint32_t flags)
|
2009-03-03 19:31:44 -08:00
|
|
|
{
|
|
|
|
Parcel data, reply;
|
2009-07-17 12:17:14 -07:00
|
|
|
uint32_t devices = pDevices ? *pDevices : 0;
|
|
|
|
uint32_t samplingRate = pSamplingRate ? *pSamplingRate : 0;
|
|
|
|
uint32_t format = pFormat ? *pFormat : 0;
|
|
|
|
uint32_t channels = pChannels ? *pChannels : 0;
|
|
|
|
uint32_t latency = pLatencyMs ? *pLatencyMs : 0;
|
|
|
|
|
2009-03-03 19:31:44 -08:00
|
|
|
data.writeInterfaceToken(IAudioFlinger::getInterfaceDescriptor());
|
2009-07-17 12:17:14 -07:00
|
|
|
data.writeInt32(devices);
|
|
|
|
data.writeInt32(samplingRate);
|
|
|
|
data.writeInt32(format);
|
|
|
|
data.writeInt32(channels);
|
|
|
|
data.writeInt32(latency);
|
|
|
|
data.writeInt32(flags);
|
|
|
|
remote()->transact(OPEN_OUTPUT, data, &reply);
|
2009-07-28 08:44:33 -07:00
|
|
|
int output = reply.readInt32();
|
2009-07-17 12:17:14 -07:00
|
|
|
LOGV("openOutput() returned output, %p", output);
|
|
|
|
devices = reply.readInt32();
|
|
|
|
if (pDevices) *pDevices = devices;
|
|
|
|
samplingRate = reply.readInt32();
|
|
|
|
if (pSamplingRate) *pSamplingRate = samplingRate;
|
|
|
|
format = reply.readInt32();
|
|
|
|
if (pFormat) *pFormat = format;
|
|
|
|
channels = reply.readInt32();
|
|
|
|
if (pChannels) *pChannels = channels;
|
|
|
|
latency = reply.readInt32();
|
|
|
|
if (pLatencyMs) *pLatencyMs = latency;
|
|
|
|
return output;
|
|
|
|
}
|
|
|
|
|
2009-07-28 08:44:33 -07:00
|
|
|
virtual int openDuplicateOutput(int output1, int output2)
|
2009-07-17 12:17:14 -07:00
|
|
|
{
|
|
|
|
Parcel data, reply;
|
|
|
|
data.writeInterfaceToken(IAudioFlinger::getInterfaceDescriptor());
|
2009-07-28 08:44:33 -07:00
|
|
|
data.writeInt32(output1);
|
|
|
|
data.writeInt32(output2);
|
2009-07-17 12:17:14 -07:00
|
|
|
remote()->transact(OPEN_DUPLICATE_OUTPUT, data, &reply);
|
2009-07-28 08:44:33 -07:00
|
|
|
return reply.readInt32();
|
2009-07-17 12:17:14 -07:00
|
|
|
}
|
|
|
|
|
2009-07-28 08:44:33 -07:00
|
|
|
virtual status_t closeOutput(int output)
|
2009-07-17 12:17:14 -07:00
|
|
|
{
|
|
|
|
Parcel data, reply;
|
|
|
|
data.writeInterfaceToken(IAudioFlinger::getInterfaceDescriptor());
|
2009-07-28 08:44:33 -07:00
|
|
|
data.writeInt32(output);
|
2009-07-17 12:17:14 -07:00
|
|
|
remote()->transact(CLOSE_OUTPUT, data, &reply);
|
2009-03-03 19:31:44 -08:00
|
|
|
return reply.readInt32();
|
|
|
|
}
|
|
|
|
|
2009-07-28 08:44:33 -07:00
|
|
|
virtual status_t suspendOutput(int output)
|
2009-03-03 19:31:44 -08:00
|
|
|
{
|
|
|
|
Parcel data, reply;
|
|
|
|
data.writeInterfaceToken(IAudioFlinger::getInterfaceDescriptor());
|
2009-07-28 08:44:33 -07:00
|
|
|
data.writeInt32(output);
|
2009-07-17 12:17:14 -07:00
|
|
|
remote()->transact(SUSPEND_OUTPUT, data, &reply);
|
2009-03-03 19:31:44 -08:00
|
|
|
return reply.readInt32();
|
|
|
|
}
|
2009-07-17 12:17:14 -07:00
|
|
|
|
2009-07-28 08:44:33 -07:00
|
|
|
virtual status_t restoreOutput(int output)
|
2009-03-03 19:31:44 -08:00
|
|
|
{
|
|
|
|
Parcel data, reply;
|
|
|
|
data.writeInterfaceToken(IAudioFlinger::getInterfaceDescriptor());
|
2009-07-28 08:44:33 -07:00
|
|
|
data.writeInt32(output);
|
2009-07-17 12:17:14 -07:00
|
|
|
remote()->transact(RESTORE_OUTPUT, data, &reply);
|
|
|
|
return reply.readInt32();
|
2009-03-03 19:31:44 -08:00
|
|
|
}
|
2009-07-17 12:17:14 -07:00
|
|
|
|
2009-07-28 08:44:33 -07:00
|
|
|
virtual int openInput(uint32_t *pDevices,
|
|
|
|
uint32_t *pSamplingRate,
|
|
|
|
uint32_t *pFormat,
|
|
|
|
uint32_t *pChannels,
|
|
|
|
uint32_t acoustics)
|
2009-03-03 19:31:44 -08:00
|
|
|
{
|
|
|
|
Parcel data, reply;
|
2009-07-17 12:17:14 -07:00
|
|
|
uint32_t devices = pDevices ? *pDevices : 0;
|
|
|
|
uint32_t samplingRate = pSamplingRate ? *pSamplingRate : 0;
|
|
|
|
uint32_t format = pFormat ? *pFormat : 0;
|
|
|
|
uint32_t channels = pChannels ? *pChannels : 0;
|
|
|
|
|
2009-03-03 19:31:44 -08:00
|
|
|
data.writeInterfaceToken(IAudioFlinger::getInterfaceDescriptor());
|
2009-07-17 12:17:14 -07:00
|
|
|
data.writeInt32(devices);
|
|
|
|
data.writeInt32(samplingRate);
|
2009-03-03 19:31:44 -08:00
|
|
|
data.writeInt32(format);
|
2009-07-17 12:17:14 -07:00
|
|
|
data.writeInt32(channels);
|
|
|
|
data.writeInt32(acoustics);
|
|
|
|
remote()->transact(OPEN_INPUT, data, &reply);
|
2009-07-28 08:44:33 -07:00
|
|
|
int input = reply.readInt32();
|
2009-07-17 12:17:14 -07:00
|
|
|
devices = reply.readInt32();
|
|
|
|
if (pDevices) *pDevices = devices;
|
|
|
|
samplingRate = reply.readInt32();
|
|
|
|
if (pSamplingRate) *pSamplingRate = samplingRate;
|
|
|
|
format = reply.readInt32();
|
|
|
|
if (pFormat) *pFormat = format;
|
|
|
|
channels = reply.readInt32();
|
|
|
|
if (pChannels) *pChannels = channels;
|
|
|
|
return input;
|
2009-03-03 19:31:44 -08:00
|
|
|
}
|
2009-07-17 12:17:14 -07:00
|
|
|
|
2009-07-28 08:44:33 -07:00
|
|
|
virtual status_t closeInput(int input)
|
2009-03-03 19:31:44 -08:00
|
|
|
{
|
|
|
|
Parcel data, reply;
|
|
|
|
data.writeInterfaceToken(IAudioFlinger::getInterfaceDescriptor());
|
2009-07-28 08:44:33 -07:00
|
|
|
data.writeInt32(input);
|
2009-07-17 12:17:14 -07:00
|
|
|
remote()->transact(CLOSE_INPUT, data, &reply);
|
|
|
|
return reply.readInt32();
|
2009-03-03 19:31:44 -08:00
|
|
|
}
|
|
|
|
|
2009-07-28 08:44:33 -07:00
|
|
|
virtual status_t setStreamOutput(uint32_t stream, int output)
|
2009-03-03 19:31:44 -08:00
|
|
|
{
|
|
|
|
Parcel data, reply;
|
|
|
|
data.writeInterfaceToken(IAudioFlinger::getInterfaceDescriptor());
|
2009-07-17 12:17:14 -07:00
|
|
|
data.writeInt32(stream);
|
2009-07-28 08:44:33 -07:00
|
|
|
data.writeInt32(output);
|
2009-07-17 12:17:14 -07:00
|
|
|
remote()->transact(SET_STREAM_OUTPUT, data, &reply);
|
|
|
|
return reply.readInt32();
|
2009-03-03 19:31:44 -08:00
|
|
|
}
|
2009-10-21 08:14:22 -07:00
|
|
|
|
|
|
|
virtual status_t setVoiceVolume(float volume)
|
|
|
|
{
|
|
|
|
Parcel data, reply;
|
|
|
|
data.writeInterfaceToken(IAudioFlinger::getInterfaceDescriptor());
|
|
|
|
data.writeFloat(volume);
|
|
|
|
remote()->transact(SET_VOICE_VOLUME, data, &reply);
|
|
|
|
return reply.readInt32();
|
|
|
|
}
|
2010-01-19 17:37:09 -08:00
|
|
|
|
|
|
|
virtual status_t getRenderPosition(uint32_t *halFrames, uint32_t *dspFrames, int output)
|
|
|
|
{
|
|
|
|
Parcel data, reply;
|
|
|
|
data.writeInterfaceToken(IAudioFlinger::getInterfaceDescriptor());
|
|
|
|
data.writeInt32(output);
|
|
|
|
remote()->transact(GET_RENDER_POSITION, data, &reply);
|
|
|
|
status_t status = reply.readInt32();
|
|
|
|
if (status == NO_ERROR) {
|
|
|
|
uint32_t tmp = reply.readInt32();
|
|
|
|
if (halFrames) {
|
|
|
|
*halFrames = tmp;
|
|
|
|
}
|
|
|
|
tmp = reply.readInt32();
|
|
|
|
if (dspFrames) {
|
|
|
|
*dspFrames = tmp;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return status;
|
|
|
|
}
|
2010-02-26 02:47:27 -08:00
|
|
|
|
|
|
|
virtual unsigned int getInputFramesLost(int ioHandle)
|
|
|
|
{
|
|
|
|
Parcel data, reply;
|
|
|
|
data.writeInterfaceToken(IAudioFlinger::getInterfaceDescriptor());
|
|
|
|
data.writeInt32(ioHandle);
|
|
|
|
remote()->transact(GET_INPUT_FRAMES_LOST, data, &reply);
|
|
|
|
return reply.readInt32();
|
|
|
|
}
|
2009-03-03 19:31:44 -08:00
|
|
|
};
|
|
|
|
|
|
|
|
IMPLEMENT_META_INTERFACE(AudioFlinger, "android.media.IAudioFlinger");
|
|
|
|
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
|
|
|
|
status_t BnAudioFlinger::onTransact(
|
|
|
|
uint32_t code, const Parcel& data, Parcel* reply, uint32_t flags)
|
|
|
|
{
|
|
|
|
switch(code) {
|
|
|
|
case CREATE_TRACK: {
|
|
|
|
CHECK_INTERFACE(IAudioFlinger, data, reply);
|
|
|
|
pid_t pid = data.readInt32();
|
|
|
|
int streamType = data.readInt32();
|
|
|
|
uint32_t sampleRate = data.readInt32();
|
|
|
|
int format = data.readInt32();
|
|
|
|
int channelCount = data.readInt32();
|
|
|
|
size_t bufferCount = data.readInt32();
|
|
|
|
uint32_t flags = data.readInt32();
|
|
|
|
sp<IMemory> buffer = interface_cast<IMemory>(data.readStrongBinder());
|
2009-07-28 08:44:33 -07:00
|
|
|
int output = data.readInt32();
|
2009-03-03 19:31:44 -08:00
|
|
|
status_t status;
|
|
|
|
sp<IAudioTrack> track = createTrack(pid,
|
|
|
|
streamType, sampleRate, format,
|
2009-07-17 12:17:14 -07:00
|
|
|
channelCount, bufferCount, flags, buffer, output, &status);
|
2009-03-03 19:31:44 -08:00
|
|
|
reply->writeInt32(status);
|
|
|
|
reply->writeStrongBinder(track->asBinder());
|
|
|
|
return NO_ERROR;
|
|
|
|
} break;
|
|
|
|
case OPEN_RECORD: {
|
|
|
|
CHECK_INTERFACE(IAudioFlinger, data, reply);
|
|
|
|
pid_t pid = data.readInt32();
|
2009-07-28 08:44:33 -07:00
|
|
|
int input = data.readInt32();
|
2009-03-03 19:31:44 -08:00
|
|
|
uint32_t sampleRate = data.readInt32();
|
|
|
|
int format = data.readInt32();
|
|
|
|
int channelCount = data.readInt32();
|
|
|
|
size_t bufferCount = data.readInt32();
|
|
|
|
uint32_t flags = data.readInt32();
|
|
|
|
status_t status;
|
2009-07-17 12:17:14 -07:00
|
|
|
sp<IAudioRecord> record = openRecord(pid, input,
|
2009-03-03 19:31:44 -08:00
|
|
|
sampleRate, format, channelCount, bufferCount, flags, &status);
|
|
|
|
reply->writeInt32(status);
|
|
|
|
reply->writeStrongBinder(record->asBinder());
|
|
|
|
return NO_ERROR;
|
|
|
|
} break;
|
|
|
|
case SAMPLE_RATE: {
|
|
|
|
CHECK_INTERFACE(IAudioFlinger, data, reply);
|
2009-07-28 08:44:33 -07:00
|
|
|
reply->writeInt32( sampleRate(data.readInt32()) );
|
2009-03-03 19:31:44 -08:00
|
|
|
return NO_ERROR;
|
|
|
|
} break;
|
|
|
|
case CHANNEL_COUNT: {
|
|
|
|
CHECK_INTERFACE(IAudioFlinger, data, reply);
|
2009-07-28 08:44:33 -07:00
|
|
|
reply->writeInt32( channelCount(data.readInt32()) );
|
2009-03-03 19:31:44 -08:00
|
|
|
return NO_ERROR;
|
|
|
|
} break;
|
|
|
|
case FORMAT: {
|
|
|
|
CHECK_INTERFACE(IAudioFlinger, data, reply);
|
2009-07-28 08:44:33 -07:00
|
|
|
reply->writeInt32( format(data.readInt32()) );
|
2009-03-03 19:31:44 -08:00
|
|
|
return NO_ERROR;
|
|
|
|
} break;
|
|
|
|
case FRAME_COUNT: {
|
|
|
|
CHECK_INTERFACE(IAudioFlinger, data, reply);
|
2009-07-28 08:44:33 -07:00
|
|
|
reply->writeInt32( frameCount(data.readInt32()) );
|
2009-03-03 19:31:44 -08:00
|
|
|
return NO_ERROR;
|
|
|
|
} break;
|
|
|
|
case LATENCY: {
|
|
|
|
CHECK_INTERFACE(IAudioFlinger, data, reply);
|
2009-07-28 08:44:33 -07:00
|
|
|
reply->writeInt32( latency(data.readInt32()) );
|
2009-03-03 19:31:44 -08:00
|
|
|
return NO_ERROR;
|
|
|
|
} break;
|
|
|
|
case SET_MASTER_VOLUME: {
|
|
|
|
CHECK_INTERFACE(IAudioFlinger, data, reply);
|
|
|
|
reply->writeInt32( setMasterVolume(data.readFloat()) );
|
|
|
|
return NO_ERROR;
|
|
|
|
} break;
|
|
|
|
case SET_MASTER_MUTE: {
|
|
|
|
CHECK_INTERFACE(IAudioFlinger, data, reply);
|
|
|
|
reply->writeInt32( setMasterMute(data.readInt32()) );
|
|
|
|
return NO_ERROR;
|
|
|
|
} break;
|
|
|
|
case MASTER_VOLUME: {
|
|
|
|
CHECK_INTERFACE(IAudioFlinger, data, reply);
|
|
|
|
reply->writeFloat( masterVolume() );
|
|
|
|
return NO_ERROR;
|
|
|
|
} break;
|
|
|
|
case MASTER_MUTE: {
|
|
|
|
CHECK_INTERFACE(IAudioFlinger, data, reply);
|
|
|
|
reply->writeInt32( masterMute() );
|
|
|
|
return NO_ERROR;
|
|
|
|
} break;
|
|
|
|
case SET_STREAM_VOLUME: {
|
|
|
|
CHECK_INTERFACE(IAudioFlinger, data, reply);
|
|
|
|
int stream = data.readInt32();
|
2009-07-17 12:17:14 -07:00
|
|
|
float volume = data.readFloat();
|
2009-07-28 08:44:33 -07:00
|
|
|
int output = data.readInt32();
|
2009-07-17 12:17:14 -07:00
|
|
|
reply->writeInt32( setStreamVolume(stream, volume, output) );
|
2009-03-03 19:31:44 -08:00
|
|
|
return NO_ERROR;
|
|
|
|
} break;
|
|
|
|
case SET_STREAM_MUTE: {
|
|
|
|
CHECK_INTERFACE(IAudioFlinger, data, reply);
|
|
|
|
int stream = data.readInt32();
|
|
|
|
reply->writeInt32( setStreamMute(stream, data.readInt32()) );
|
|
|
|
return NO_ERROR;
|
|
|
|
} break;
|
|
|
|
case STREAM_VOLUME: {
|
|
|
|
CHECK_INTERFACE(IAudioFlinger, data, reply);
|
|
|
|
int stream = data.readInt32();
|
2009-07-28 08:44:33 -07:00
|
|
|
int output = data.readInt32();
|
2009-07-17 12:17:14 -07:00
|
|
|
reply->writeFloat( streamVolume(stream, output) );
|
2009-03-03 19:31:44 -08:00
|
|
|
return NO_ERROR;
|
|
|
|
} break;
|
|
|
|
case STREAM_MUTE: {
|
|
|
|
CHECK_INTERFACE(IAudioFlinger, data, reply);
|
|
|
|
int stream = data.readInt32();
|
|
|
|
reply->writeInt32( streamMute(stream) );
|
|
|
|
return NO_ERROR;
|
|
|
|
} break;
|
|
|
|
case SET_MODE: {
|
|
|
|
CHECK_INTERFACE(IAudioFlinger, data, reply);
|
|
|
|
int mode = data.readInt32();
|
|
|
|
reply->writeInt32( setMode(mode) );
|
|
|
|
return NO_ERROR;
|
|
|
|
} break;
|
|
|
|
case SET_MIC_MUTE: {
|
|
|
|
CHECK_INTERFACE(IAudioFlinger, data, reply);
|
|
|
|
int state = data.readInt32();
|
|
|
|
reply->writeInt32( setMicMute(state) );
|
|
|
|
return NO_ERROR;
|
|
|
|
} break;
|
|
|
|
case GET_MIC_MUTE: {
|
|
|
|
CHECK_INTERFACE(IAudioFlinger, data, reply);
|
|
|
|
reply->writeInt32( getMicMute() );
|
|
|
|
return NO_ERROR;
|
|
|
|
} break;
|
2010-01-25 08:49:09 -08:00
|
|
|
case IS_STREAM_ACTIVE: {
|
2009-03-03 19:31:44 -08:00
|
|
|
CHECK_INTERFACE(IAudioFlinger, data, reply);
|
2010-01-25 08:49:09 -08:00
|
|
|
int stream = data.readInt32();
|
|
|
|
reply->writeInt32( isStreamActive(stream) );
|
2009-03-03 19:31:44 -08:00
|
|
|
return NO_ERROR;
|
|
|
|
} break;
|
2009-07-17 12:17:14 -07:00
|
|
|
case SET_PARAMETERS: {
|
2009-03-03 19:31:44 -08:00
|
|
|
CHECK_INTERFACE(IAudioFlinger, data, reply);
|
2009-07-28 08:44:33 -07:00
|
|
|
int ioHandle = data.readInt32();
|
2009-07-17 12:17:14 -07:00
|
|
|
String8 keyValuePairs(data.readString8());
|
|
|
|
reply->writeInt32(setParameters(ioHandle, keyValuePairs));
|
2009-03-03 19:31:44 -08:00
|
|
|
return NO_ERROR;
|
2009-07-17 12:17:14 -07:00
|
|
|
} break;
|
|
|
|
case GET_PARAMETERS: {
|
|
|
|
CHECK_INTERFACE(IAudioFlinger, data, reply);
|
2009-07-28 08:44:33 -07:00
|
|
|
int ioHandle = data.readInt32();
|
2009-07-17 12:17:14 -07:00
|
|
|
String8 keys(data.readString8());
|
|
|
|
reply->writeString8(getParameters(ioHandle, keys));
|
|
|
|
return NO_ERROR;
|
|
|
|
} break;
|
|
|
|
|
2009-03-03 19:31:44 -08:00
|
|
|
case REGISTER_CLIENT: {
|
|
|
|
CHECK_INTERFACE(IAudioFlinger, data, reply);
|
|
|
|
sp<IAudioFlingerClient> client = interface_cast<IAudioFlingerClient>(data.readStrongBinder());
|
|
|
|
registerClient(client);
|
|
|
|
return NO_ERROR;
|
|
|
|
} break;
|
|
|
|
case GET_INPUTBUFFERSIZE: {
|
|
|
|
CHECK_INTERFACE(IAudioFlinger, data, reply);
|
|
|
|
uint32_t sampleRate = data.readInt32();
|
|
|
|
int format = data.readInt32();
|
|
|
|
int channelCount = data.readInt32();
|
|
|
|
reply->writeInt32( getInputBufferSize(sampleRate, format, channelCount) );
|
|
|
|
return NO_ERROR;
|
|
|
|
} break;
|
2009-07-17 12:17:14 -07:00
|
|
|
case OPEN_OUTPUT: {
|
|
|
|
CHECK_INTERFACE(IAudioFlinger, data, reply);
|
|
|
|
uint32_t devices = data.readInt32();
|
|
|
|
uint32_t samplingRate = data.readInt32();
|
|
|
|
uint32_t format = data.readInt32();
|
|
|
|
uint32_t channels = data.readInt32();
|
|
|
|
uint32_t latency = data.readInt32();
|
|
|
|
uint32_t flags = data.readInt32();
|
2009-07-28 08:44:33 -07:00
|
|
|
int output = openOutput(&devices,
|
2009-07-17 12:17:14 -07:00
|
|
|
&samplingRate,
|
|
|
|
&format,
|
|
|
|
&channels,
|
|
|
|
&latency,
|
|
|
|
flags);
|
|
|
|
LOGV("OPEN_OUTPUT output, %p", output);
|
2009-07-28 08:44:33 -07:00
|
|
|
reply->writeInt32(output);
|
2009-07-17 12:17:14 -07:00
|
|
|
reply->writeInt32(devices);
|
|
|
|
reply->writeInt32(samplingRate);
|
|
|
|
reply->writeInt32(format);
|
|
|
|
reply->writeInt32(channels);
|
|
|
|
reply->writeInt32(latency);
|
|
|
|
return NO_ERROR;
|
|
|
|
} break;
|
|
|
|
case OPEN_DUPLICATE_OUTPUT: {
|
|
|
|
CHECK_INTERFACE(IAudioFlinger, data, reply);
|
2009-07-28 08:44:33 -07:00
|
|
|
int output1 = data.readInt32();
|
|
|
|
int output2 = data.readInt32();
|
|
|
|
reply->writeInt32(openDuplicateOutput(output1, output2));
|
2009-07-17 12:17:14 -07:00
|
|
|
return NO_ERROR;
|
|
|
|
} break;
|
|
|
|
case CLOSE_OUTPUT: {
|
|
|
|
CHECK_INTERFACE(IAudioFlinger, data, reply);
|
2009-07-28 08:44:33 -07:00
|
|
|
reply->writeInt32(closeOutput(data.readInt32()));
|
2009-07-17 12:17:14 -07:00
|
|
|
return NO_ERROR;
|
|
|
|
} break;
|
|
|
|
case SUSPEND_OUTPUT: {
|
|
|
|
CHECK_INTERFACE(IAudioFlinger, data, reply);
|
2009-07-28 08:44:33 -07:00
|
|
|
reply->writeInt32(suspendOutput(data.readInt32()));
|
2009-07-17 12:17:14 -07:00
|
|
|
return NO_ERROR;
|
|
|
|
} break;
|
|
|
|
case RESTORE_OUTPUT: {
|
|
|
|
CHECK_INTERFACE(IAudioFlinger, data, reply);
|
2009-07-28 08:44:33 -07:00
|
|
|
reply->writeInt32(restoreOutput(data.readInt32()));
|
2009-07-17 12:17:14 -07:00
|
|
|
return NO_ERROR;
|
|
|
|
} break;
|
|
|
|
case OPEN_INPUT: {
|
|
|
|
CHECK_INTERFACE(IAudioFlinger, data, reply);
|
|
|
|
uint32_t devices = data.readInt32();
|
|
|
|
uint32_t samplingRate = data.readInt32();
|
|
|
|
uint32_t format = data.readInt32();
|
|
|
|
uint32_t channels = data.readInt32();
|
|
|
|
uint32_t acoutics = data.readInt32();
|
|
|
|
|
2009-07-28 08:44:33 -07:00
|
|
|
int input = openInput(&devices,
|
2009-07-17 12:17:14 -07:00
|
|
|
&samplingRate,
|
|
|
|
&format,
|
|
|
|
&channels,
|
|
|
|
acoutics);
|
2009-07-28 08:44:33 -07:00
|
|
|
reply->writeInt32(input);
|
2009-07-17 12:17:14 -07:00
|
|
|
reply->writeInt32(devices);
|
|
|
|
reply->writeInt32(samplingRate);
|
|
|
|
reply->writeInt32(format);
|
|
|
|
reply->writeInt32(channels);
|
|
|
|
return NO_ERROR;
|
|
|
|
} break;
|
|
|
|
case CLOSE_INPUT: {
|
2009-03-03 19:31:44 -08:00
|
|
|
CHECK_INTERFACE(IAudioFlinger, data, reply);
|
2009-07-28 08:44:33 -07:00
|
|
|
reply->writeInt32(closeInput(data.readInt32()));
|
2009-03-03 19:31:44 -08:00
|
|
|
return NO_ERROR;
|
|
|
|
} break;
|
2009-07-17 12:17:14 -07:00
|
|
|
case SET_STREAM_OUTPUT: {
|
2009-03-03 19:31:44 -08:00
|
|
|
CHECK_INTERFACE(IAudioFlinger, data, reply);
|
2009-07-17 12:17:14 -07:00
|
|
|
uint32_t stream = data.readInt32();
|
2009-07-28 08:44:33 -07:00
|
|
|
int output = data.readInt32();
|
2009-07-17 12:17:14 -07:00
|
|
|
reply->writeInt32(setStreamOutput(stream, output));
|
2009-03-03 19:31:44 -08:00
|
|
|
return NO_ERROR;
|
|
|
|
} break;
|
2009-10-21 08:14:22 -07:00
|
|
|
case SET_VOICE_VOLUME: {
|
|
|
|
CHECK_INTERFACE(IAudioFlinger, data, reply);
|
|
|
|
float volume = data.readFloat();
|
|
|
|
reply->writeInt32( setVoiceVolume(volume) );
|
|
|
|
return NO_ERROR;
|
|
|
|
} break;
|
2010-01-19 17:37:09 -08:00
|
|
|
case GET_RENDER_POSITION: {
|
|
|
|
CHECK_INTERFACE(IAudioFlinger, data, reply);
|
|
|
|
int output = data.readInt32();
|
|
|
|
uint32_t halFrames;
|
|
|
|
uint32_t dspFrames;
|
|
|
|
status_t status = getRenderPosition(&halFrames, &dspFrames, output);
|
|
|
|
reply->writeInt32(status);
|
|
|
|
if (status == NO_ERROR) {
|
|
|
|
reply->writeInt32(halFrames);
|
|
|
|
reply->writeInt32(dspFrames);
|
|
|
|
}
|
|
|
|
return NO_ERROR;
|
|
|
|
}
|
2010-02-26 02:47:27 -08:00
|
|
|
case GET_INPUT_FRAMES_LOST: {
|
|
|
|
CHECK_INTERFACE(IAudioFlinger, data, reply);
|
|
|
|
int ioHandle = data.readInt32();
|
|
|
|
reply->writeInt32(getInputFramesLost(ioHandle));
|
|
|
|
return NO_ERROR;
|
|
|
|
} break;
|
|
|
|
|
2009-03-03 19:31:44 -08:00
|
|
|
default:
|
|
|
|
return BBinder::onTransact(code, data, reply, flags);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
}; // namespace android
|