diff options
author | The Android Open Source Project <initial-contribution@android.com> | 2009-01-15 16:12:10 -0800 |
---|---|---|
committer | The Android Open Source Project <initial-contribution@android.com> | 2009-01-15 16:12:10 -0800 |
commit | 8a7a67538a9977c892389bfcde76a8372aa0b56c (patch) | |
tree | 0782f82f223ddeafa9b08bd2121ded38212f67f7 /libs | |
parent | 276293246ea9cbc0a578a7697cc48930376ec0e9 (diff) | |
download | frameworks_native-8a7a67538a9977c892389bfcde76a8372aa0b56c.zip frameworks_native-8a7a67538a9977c892389bfcde76a8372aa0b56c.tar.gz frameworks_native-8a7a67538a9977c892389bfcde76a8372aa0b56c.tar.bz2 |
auto import from //branches/cupcake/...@126645
Diffstat (limited to 'libs')
-rw-r--r-- | libs/audioflinger/A2dpAudioInterface.cpp | 30 | ||||
-rw-r--r-- | libs/audioflinger/A2dpAudioInterface.h | 9 | ||||
-rw-r--r-- | libs/audioflinger/Android.mk | 4 | ||||
-rw-r--r-- | libs/audioflinger/AudioDumpInterface.h | 2 | ||||
-rw-r--r-- | libs/audioflinger/AudioFlinger.cpp | 9 | ||||
-rw-r--r-- | libs/audioflinger/AudioFlinger.h | 2 | ||||
-rw-r--r-- | libs/audioflinger/AudioHardwareGeneric.h | 2 | ||||
-rw-r--r-- | libs/audioflinger/AudioHardwareStub.h | 2 | ||||
-rw-r--r-- | libs/surfaceflinger/DisplayHardware/DisplayHardware.cpp | 15 | ||||
-rw-r--r-- | libs/surfaceflinger/LayerBuffer.cpp | 38 | ||||
-rw-r--r-- | libs/surfaceflinger/LayerBuffer.h | 9 | ||||
-rw-r--r-- | libs/surfaceflinger/tests/Android.mk | 1 | ||||
-rw-r--r-- | libs/surfaceflinger/tests/overlays/Android.mk | 16 | ||||
-rw-r--r-- | libs/surfaceflinger/tests/overlays/overlays.cpp | 58 | ||||
-rw-r--r-- | libs/ui/Android.mk | 3 | ||||
-rw-r--r-- | libs/ui/EventHub.cpp | 6 | ||||
-rw-r--r-- | libs/ui/ISurface.cpp | 2 | ||||
-rw-r--r-- | libs/ui/Overlay.cpp | 37 |
18 files changed, 199 insertions, 46 deletions
diff --git a/libs/audioflinger/A2dpAudioInterface.cpp b/libs/audioflinger/A2dpAudioInterface.cpp index b2a8e96..7242575 100644 --- a/libs/audioflinger/A2dpAudioInterface.cpp +++ b/libs/audioflinger/A2dpAudioInterface.cpp @@ -92,6 +92,14 @@ status_t A2dpAudioInterface::getMicMute(bool* state) status_t A2dpAudioInterface::setParameter(const char *key, const char *value) { LOGD("setParameter %s,%s\n", key, value); + + if (!key || !value) + return -EINVAL; + + if (strcmp(key, "a2dp_sink_address") == 0) { + return mOutput->setAddress(value); + } + return 0; } @@ -121,6 +129,8 @@ A2dpAudioInterface::A2dpAudioStreamOut::A2dpAudioStreamOut() : mFd(-1), mStandby(false), mStartCount(0), mRetryCount(0), mData(NULL), mInitialized(false) { + // use any address by default + strncpy(mA2dpAddress, "00:00:00:00:00:00", sizeof(mA2dpAddress)); } status_t A2dpAudioInterface::A2dpAudioStreamOut::set( @@ -154,7 +164,7 @@ ssize_t A2dpAudioInterface::A2dpAudioStreamOut::write(const void* buffer, size_t size_t remaining = bytes; if (!mInitialized) { - status = a2dp_init("00:00:00:00:00:00", 44100, 2, &mData); + status = a2dp_init(mA2dpAddress, 44100, 2, &mData); if (status < 0) { LOGE("a2dp_init failed err: %d\n", status); goto Error; @@ -196,6 +206,24 @@ status_t A2dpAudioInterface::A2dpAudioStreamOut::standby() return result; } +status_t A2dpAudioInterface::A2dpAudioStreamOut::setAddress(const char* address) +{ + if (strlen(address) < sizeof(mA2dpAddress)) + return -EINVAL; + + if (strcmp(address, mA2dpAddress)) { + strcpy(mA2dpAddress, address); + + if (mInitialized) { + a2dp_cleanup(mData); + mData = NULL; + mInitialized = false; + } + } + + return NO_ERROR; +} + status_t A2dpAudioInterface::A2dpAudioStreamOut::dump(int fd, const Vector<String16>& args) { return NO_ERROR; diff --git a/libs/audioflinger/A2dpAudioInterface.h b/libs/audioflinger/A2dpAudioInterface.h index b8119a1..2197d0e 100644 --- a/libs/audioflinger/A2dpAudioInterface.h +++ b/libs/audioflinger/A2dpAudioInterface.h @@ -22,7 +22,7 @@ #include <utils/threads.h> -#include <hardware/AudioHardwareBase.h> +#include <hardware_legacy/AudioHardwareBase.h> namespace android { @@ -74,7 +74,7 @@ private: uint32_t sampleRate); virtual uint32_t sampleRate() const { return 44100; } // SBC codec wants a multiple of 512 - virtual size_t bufferSize() const { return 512 * 30; } + virtual size_t bufferSize() const { return 512 * 20; } virtual int channelCount() const { return 2; } virtual int format() const { return AudioSystem::PCM_16_BIT; } virtual uint32_t latency() const { return ((1000*channelCount()*bufferSize())/frameSize())/sampleRate() + 200; } @@ -84,10 +84,15 @@ private: virtual status_t dump(int fd, const Vector<String16>& args); private: + friend class A2dpAudioInterface; + status_t setAddress(const char* address); + + private: int mFd; bool mStandby; int mStartCount; int mRetryCount; + char mA2dpAddress[20]; void* mData; bool mInitialized; }; diff --git a/libs/audioflinger/Android.mk b/libs/audioflinger/Android.mk index d16e3e1..50d516b 100644 --- a/libs/audioflinger/Android.mk +++ b/libs/audioflinger/Android.mk @@ -12,7 +12,7 @@ LOCAL_SHARED_LIBRARIES := \ libcutils \ libutils \ libmedia \ - libhardware + libhardware_legacy ifeq ($(strip $(BOARD_USES_GENERIC_AUDIO)),true) LOCAL_CFLAGS += -DGENERIC_AUDIO @@ -35,7 +35,7 @@ LOCAL_SHARED_LIBRARIES := \ libcutils \ libutils \ libmedia \ - libhardware + libhardware_legacy ifeq ($(strip $(BOARD_USES_GENERIC_AUDIO)),true) LOCAL_STATIC_LIBRARIES += libaudiointerface diff --git a/libs/audioflinger/AudioDumpInterface.h b/libs/audioflinger/AudioDumpInterface.h index 82b5250..42204d6 100644 --- a/libs/audioflinger/AudioDumpInterface.h +++ b/libs/audioflinger/AudioDumpInterface.h @@ -21,7 +21,7 @@ #include <stdint.h> #include <sys/types.h> -#include <hardware/AudioHardwareBase.h> +#include <hardware_legacy/AudioHardwareBase.h> namespace android { diff --git a/libs/audioflinger/AudioFlinger.cpp b/libs/audioflinger/AudioFlinger.cpp index d4692ad..51b800c 100644 --- a/libs/audioflinger/AudioFlinger.cpp +++ b/libs/audioflinger/AudioFlinger.cpp @@ -38,7 +38,7 @@ #include <private/media/AudioTrackShared.h> -#include <hardware/AudioHardwareInterface.h> +#include <hardware_legacy/AudioHardwareInterface.h> #include "AudioMixer.h" #include "AudioFlinger.h" @@ -832,10 +832,15 @@ bool AudioFlinger::isMusicActive() const status_t AudioFlinger::setParameter(const char* key, const char* value) { - status_t result; + status_t result, result2; AutoMutex lock(mHardwareLock); mHardwareStatus = AUDIO_SET_PARAMETER; result = mAudioHardware->setParameter(key, value); + if (mA2dpAudioInterface) { + result2 = mA2dpAudioInterface->setParameter(key, value); + if (result2) + result = result2; + } mHardwareStatus = AUDIO_HW_IDLE; return result; } diff --git a/libs/audioflinger/AudioFlinger.h b/libs/audioflinger/AudioFlinger.h index 7c84e62..90bc72d 100644 --- a/libs/audioflinger/AudioFlinger.h +++ b/libs/audioflinger/AudioFlinger.h @@ -33,7 +33,7 @@ #include <utils/KeyedVector.h> #include <utils/SortedVector.h> -#include <hardware/AudioHardwareInterface.h> +#include <hardware_legacy/AudioHardwareInterface.h> #include "AudioBufferProvider.h" diff --git a/libs/audioflinger/AudioHardwareGeneric.h b/libs/audioflinger/AudioHardwareGeneric.h index bc006b8..a7822e1 100644 --- a/libs/audioflinger/AudioHardwareGeneric.h +++ b/libs/audioflinger/AudioHardwareGeneric.h @@ -23,7 +23,7 @@ #include <utils/threads.h> -#include <hardware/AudioHardwareBase.h> +#include <hardware_legacy/AudioHardwareBase.h> namespace android { diff --git a/libs/audioflinger/AudioHardwareStub.h b/libs/audioflinger/AudioHardwareStub.h index 7ec5b95..24736ed 100644 --- a/libs/audioflinger/AudioHardwareStub.h +++ b/libs/audioflinger/AudioHardwareStub.h @@ -21,7 +21,7 @@ #include <stdint.h> #include <sys/types.h> -#include <hardware/AudioHardwareBase.h> +#include <hardware_legacy/AudioHardwareBase.h> namespace android { diff --git a/libs/surfaceflinger/DisplayHardware/DisplayHardware.cpp b/libs/surfaceflinger/DisplayHardware/DisplayHardware.cpp index 19e32ec..92588fa 100644 --- a/libs/surfaceflinger/DisplayHardware/DisplayHardware.cpp +++ b/libs/surfaceflinger/DisplayHardware/DisplayHardware.cpp @@ -23,6 +23,8 @@ #include <GLES/egl.h> +#include <cutils/properties.h> + #include <utils/Log.h> #include <ui/EGLDisplaySurface.h> @@ -193,11 +195,14 @@ void DisplayHardware::init(uint32_t dpy) } mRefreshRate = 60.f; // TODO: get the real refresh rate - // compute a "density" automatically as a scale factor from 160 dpi - // TODO: this value should be calculated a compile time based on the - // board. - mDensity = floorf((mDpiX>mDpiY ? mDpiX : mDpiY)*0.1f + 0.5f) * (10.0f/160.0f); - LOGI("density = %f", mDensity); + + char property[PROPERTY_VALUE_MAX]; + if (property_get("ro.sf.lcd_density", property, NULL) <= 0) { + LOGW("ro.sf.lcd_density not defined, using 160 dpi by default."); + strcpy(property, "160"); + } + mDensity = atoi(property) * (1.0f/160.0f); + /* * Create our OpenGL ES context diff --git a/libs/surfaceflinger/LayerBuffer.cpp b/libs/surfaceflinger/LayerBuffer.cpp index 700e4f5..c9cebf4 100644 --- a/libs/surfaceflinger/LayerBuffer.cpp +++ b/libs/surfaceflinger/LayerBuffer.cpp @@ -95,10 +95,9 @@ void LayerBuffer::postBuffer(ssize_t offset) void LayerBuffer::unregisterBuffers() { - sp<Source> source(getSource()); + sp<Source> source(clearSource()); if (source != 0) source->unregisterBuffers(); - // XXX: clear mSource } uint32_t LayerBuffer::doTransaction(uint32_t flags) @@ -172,6 +171,14 @@ sp<LayerBuffer::Source> LayerBuffer::getSource() const { return mSource; } +sp<LayerBuffer::Source> LayerBuffer::clearSource() { + sp<Source> source; + Mutex::Autolock _l(mLock); + source = mSource; + mSource.clear(); + return source; +} + // ============================================================================ // LayerBuffer::SurfaceBuffer // ============================================================================ @@ -477,15 +484,16 @@ void LayerBuffer::BufferSource::onDraw(const Region& clip) const LayerBuffer::OverlaySource::OverlaySource(LayerBuffer& layer, sp<OverlayRef>* overlayRef, uint32_t w, uint32_t h, int32_t format) - : Source(layer), mVisibilityChanged(false), mOverlay(0), mOverlayHandle(0) + : Source(layer), mVisibilityChanged(false), + mOverlay(0), mOverlayHandle(0), mOverlayDevice(0) { overlay_control_device_t* overlay_dev = mLayer.mFlinger->getOverlayEngine(); - if (overlay_dev == NULL) { // overlays not supported return; } + mOverlayDevice = overlay_dev; overlay_t* overlay = overlay_dev->createOverlay(overlay_dev, w, h, format); if (overlay == NULL) { // couldn't create the overlay (no memory? no more overlays?) @@ -507,14 +515,18 @@ LayerBuffer::OverlaySource::OverlaySource(LayerBuffer& layer, // NOTE: here it's okay to acquire a reference to "this"m as long as // the reference is not released before we leave the ctor. - sp<OverlayChanel> chanel = new OverlayChanel(this); + sp<OverlayChannel> channel = new OverlayChannel(this); - *overlayRef = new OverlayRef(mOverlayHandle, chanel, + *overlayRef = new OverlayRef(mOverlayHandle, channel, mWidth, mHeight, mFormat, mWidthStride, mHeightStride); } LayerBuffer::OverlaySource::~OverlaySource() -{ +{ + if (mOverlay && mOverlayDevice) { + overlay_control_device_t* overlay_dev = mOverlayDevice; + overlay_dev->destroyOverlay(overlay_dev, mOverlay); + } } void LayerBuffer::OverlaySource::onTransaction(uint32_t flags) @@ -543,8 +555,7 @@ void LayerBuffer::OverlaySource::onVisibilityResolved( // we need a lock here to protect "destroy" Mutex::Autolock _l(mLock); if (mOverlay) { - overlay_control_device_t* overlay_dev = - mLayer.mFlinger->getOverlayEngine(); + overlay_control_device_t* overlay_dev = mOverlayDevice; overlay_dev->setPosition(overlay_dev, mOverlay, x,y,w,h); overlay_dev->setParameter(overlay_dev, mOverlay, OVERLAY_TRANSFORM, mLayer.getOrientation()); @@ -555,11 +566,16 @@ void LayerBuffer::OverlaySource::onVisibilityResolved( void LayerBuffer::OverlaySource::serverDestroy() { + mLayer.clearSource(); + destroyOverlay(); +} + +void LayerBuffer::OverlaySource::destroyOverlay() +{ // we need a lock here to protect "onVisibilityResolved" Mutex::Autolock _l(mLock); if (mOverlay) { - overlay_control_device_t* overlay_dev = - mLayer.mFlinger->getOverlayEngine(); + overlay_control_device_t* overlay_dev = mOverlayDevice; overlay_dev->destroyOverlay(overlay_dev, mOverlay); mOverlay = 0; } diff --git a/libs/surfaceflinger/LayerBuffer.h b/libs/surfaceflinger/LayerBuffer.h index 63ec2cf..3286535 100644 --- a/libs/surfaceflinger/LayerBuffer.h +++ b/libs/surfaceflinger/LayerBuffer.h @@ -75,6 +75,7 @@ public: sp<OverlayRef> createOverlay(uint32_t w, uint32_t h, int32_t format); sp<Source> getSource() const; + sp<Source> clearSource(); void setNeedsBlending(bool blending); const Rect& getTransformedBounds() const { return mTransformedBounds; @@ -145,7 +146,8 @@ private: virtual void onVisibilityResolved(const Transform& planeTransform); private: void serverDestroy(); - class OverlayChanel : public BnOverlay { + void destroyOverlay(); + class OverlayChannel : public BnOverlay { mutable Mutex mLock; sp<OverlaySource> mSource; virtual void destroy() { @@ -160,15 +162,16 @@ private: } } public: - OverlayChanel(const sp<OverlaySource>& source) + OverlayChannel(const sp<OverlaySource>& source) : mSource(source) { } }; - friend class OverlayChanel; + friend class OverlayChannel; bool mVisibilityChanged; overlay_t* mOverlay; overlay_handle_t const *mOverlayHandle; + overlay_control_device_t* mOverlayDevice; uint32_t mWidth; uint32_t mHeight; int32_t mFormat; diff --git a/libs/surfaceflinger/tests/Android.mk b/libs/surfaceflinger/tests/Android.mk new file mode 100644 index 0000000..5053e7d --- /dev/null +++ b/libs/surfaceflinger/tests/Android.mk @@ -0,0 +1 @@ +include $(call all-subdir-makefiles) diff --git a/libs/surfaceflinger/tests/overlays/Android.mk b/libs/surfaceflinger/tests/overlays/Android.mk new file mode 100644 index 0000000..dc47e45 --- /dev/null +++ b/libs/surfaceflinger/tests/overlays/Android.mk @@ -0,0 +1,16 @@ +LOCAL_PATH:= $(call my-dir) +include $(CLEAR_VARS) + +LOCAL_SRC_FILES:= \ + overlays.cpp + +LOCAL_SHARED_LIBRARIES := \ + libcutils \ + libutils \ + libui + +LOCAL_MODULE:= test-overlays + +LOCAL_MODULE_TAGS := tests + +include $(BUILD_EXECUTABLE) diff --git a/libs/surfaceflinger/tests/overlays/overlays.cpp b/libs/surfaceflinger/tests/overlays/overlays.cpp new file mode 100644 index 0000000..f3c046f --- /dev/null +++ b/libs/surfaceflinger/tests/overlays/overlays.cpp @@ -0,0 +1,58 @@ +#include <utils/IPCThreadState.h> +#include <utils/ProcessState.h> +#include <utils/IServiceManager.h> +#include <utils/Log.h> + +#include <ui/Surface.h> +#include <ui/ISurface.h> +#include <ui/Overlay.h> +#include <ui/SurfaceComposerClient.h> + +using namespace android; + +namespace android { +class Test { +public: + static const sp<ISurface>& getISurface(const sp<Surface>& s) { + return s->getISurface(); + } +}; +}; + +int main(int argc, char** argv) +{ + // set up the thread-pool + sp<ProcessState> proc(ProcessState::self()); + ProcessState::self()->startThreadPool(); + + // create a client to surfaceflinger + sp<SurfaceComposerClient> client = new SurfaceComposerClient(); + + // create pushbuffer surface + sp<Surface> surface = client->createSurface(getpid(), 0, 320, 240, + PIXEL_FORMAT_UNKNOWN, ISurfaceComposer::ePushBuffers); + + // get to the isurface + sp<ISurface> isurface = Test::getISurface(surface); + printf("isurface = %p\n", isurface.get()); + + // now request an overlay + sp<OverlayRef> ref = isurface->createOverlay(320, 240, PIXEL_FORMAT_RGB_565); + sp<Overlay> overlay = new Overlay(ref); + + + /* + * here we can use the overlay API + */ + + overlay_buffer_t buffer; + overlay->dequeueBuffer(&buffer); + printf("buffer = %p\n", buffer); + + void* address = overlay->getBufferAddress(buffer); + printf("address = %p\n", address); + + overlay->queueBuffer(buffer); + + return 0; +} diff --git a/libs/ui/Android.mk b/libs/ui/Android.mk index 7b51300..f944357 100644 --- a/libs/ui/Android.mk +++ b/libs/ui/Android.mk @@ -33,7 +33,8 @@ LOCAL_SHARED_LIBRARIES := \ libcutils \ libutils \ libpixelflinger \ - libhardware + libhardware \ + libhardware_legacy LOCAL_MODULE:= libui diff --git a/libs/ui/EventHub.cpp b/libs/ui/EventHub.cpp index abe7407..700aa3a 100644 --- a/libs/ui/EventHub.cpp +++ b/libs/ui/EventHub.cpp @@ -16,7 +16,7 @@ //#define LOG_NDEBUG 0 #include <ui/EventHub.h> -#include <hardware/power.h> +#include <hardware_legacy/power.h> #include <cutils/properties.h> #include <utils/IServiceManager.h> @@ -520,6 +520,10 @@ int EventHub::open_device(const char *deviceName) for (int i=0; i<((BTN_MISC+7)/8); i++) { if (key_bitmask[i] != 0) { device->classes |= CLASS_KEYBOARD; + // 'Q' key support = cheap test of whether this is an alpha-capable kbd + if (test_bit(KEY_Q, key_bitmask)) { + device->classes |= CLASS_ALPHAKEY; + } break; } } diff --git a/libs/ui/ISurface.cpp b/libs/ui/ISurface.cpp index 54f78fe..6f3cd47 100644 --- a/libs/ui/ISurface.cpp +++ b/libs/ui/ISurface.cpp @@ -128,7 +128,7 @@ status_t BnSurface::onTransact( int w = data.readInt32(); int h = data.readInt32(); int f = data.readInt32(); - sp<OverlayRef> o = createOverlay(w, h, w); + sp<OverlayRef> o = createOverlay(w, h, f); return OverlayRef::writeToParcel(reply, o); } break; default: diff --git a/libs/ui/Overlay.cpp b/libs/ui/Overlay.cpp index a79950c..2745f52 100644 --- a/libs/ui/Overlay.cpp +++ b/libs/ui/Overlay.cpp @@ -31,10 +31,12 @@ Overlay::Overlay(const sp<OverlayRef>& overlayRef) { mOverlayData = NULL; hw_module_t const* module; - if (hw_get_module(OVERLAY_HARDWARE_MODULE_ID, &module) == 0) { - if (overlay_data_open(module, &mOverlayData) == NO_ERROR) { - mStatus = mOverlayData->initialize(mOverlayData, - overlayRef->mOverlayHandle); + if (overlayRef != 0) { + if (hw_get_module(OVERLAY_HARDWARE_MODULE_ID, &module) == 0) { + if (overlay_data_open(module, &mOverlayData) == NO_ERROR) { + mStatus = mOverlayData->initialize(mOverlayData, + overlayRef->mOverlayHandle); + } } } } @@ -45,23 +47,27 @@ Overlay::~Overlay() { } } -overlay_buffer_t Overlay::dequeueBuffer() +status_t Overlay::dequeueBuffer(overlay_buffer_t* buffer) { - return mOverlayData->dequeueBuffer(mOverlayData); + if (mStatus != NO_ERROR) return mStatus; + return mOverlayData->dequeueBuffer(mOverlayData, buffer); } -int Overlay::queueBuffer(overlay_buffer_t buffer) +status_t Overlay::queueBuffer(overlay_buffer_t buffer) { + if (mStatus != NO_ERROR) return mStatus; return mOverlayData->queueBuffer(mOverlayData, buffer); } void* Overlay::getBufferAddress(overlay_buffer_t buffer) { + if (mStatus != NO_ERROR) return NULL; return mOverlayData->getBufferAddress(mOverlayData, buffer); } void Overlay::destroy() { - mOverlayRef->mOverlayChanel->destroy(); + if (mStatus != NO_ERROR) return; + mOverlayRef->mOverlayChannel->destroy(); } status_t Overlay::getStatus() const { @@ -69,26 +75,32 @@ status_t Overlay::getStatus() const { } overlay_handle_t const* Overlay::getHandleRef() const { + if (mStatus != NO_ERROR) return NULL; return mOverlayRef->mOverlayHandle; } uint32_t Overlay::getWidth() const { + if (mStatus != NO_ERROR) return 0; return mOverlayRef->mWidth; } uint32_t Overlay::getHeight() const { + if (mStatus != NO_ERROR) return 0; return mOverlayRef->mHeight; } int32_t Overlay::getFormat() const { + if (mStatus != NO_ERROR) return -1; return mOverlayRef->mFormat; } int32_t Overlay::getWidthStride() const { + if (mStatus != NO_ERROR) return 0; return mOverlayRef->mWidthStride; } int32_t Overlay::getHeightStride() const { + if (mStatus != NO_ERROR) return 0; return mOverlayRef->mHeightStride; } // ---------------------------------------------------------------------------- @@ -100,9 +112,9 @@ OverlayRef::OverlayRef() { } -OverlayRef::OverlayRef(overlay_handle_t const* handle, const sp<IOverlay>& chanel, +OverlayRef::OverlayRef(overlay_handle_t const* handle, const sp<IOverlay>& channel, uint32_t w, uint32_t h, int32_t f, uint32_t ws, uint32_t hs) - : mOverlayHandle(handle), mOverlayChanel(chanel), + : mOverlayHandle(handle), mOverlayChannel(channel), mWidth(w), mHeight(h), mFormat(f), mWidthStride(ws), mHeightStride(hs), mOwnHandle(false) { @@ -141,7 +153,7 @@ sp<OverlayRef> OverlayRef::readFromParcel(const Parcel& data) { handle->data[i] = data.readInt32(); result = new OverlayRef(); result->mOverlayHandle = handle; - result->mOverlayChanel = overlay; + result->mOverlayChannel = overlay; result->mWidth = w; result->mHeight = h; result->mFormat = f; @@ -153,7 +165,7 @@ sp<OverlayRef> OverlayRef::readFromParcel(const Parcel& data) { status_t OverlayRef::writeToParcel(Parcel* reply, const sp<OverlayRef>& o) { if (o != NULL) { - reply->writeStrongBinder(o->mOverlayChanel->asBinder()); + reply->writeStrongBinder(o->mOverlayChannel->asBinder()); reply->writeInt32(o->mWidth); reply->writeInt32(o->mHeight); reply->writeInt32(o->mFormat); @@ -176,4 +188,3 @@ status_t OverlayRef::writeToParcel(Parcel* reply, const sp<OverlayRef>& o) { // ---------------------------------------------------------------------------- }; // namespace android - |