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 @@
 	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 @@
         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 @@
             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 @@
 {
     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_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 @@
 }
 
 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(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 @@
             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 @@
 
 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 @@
 // ----------------------------------------------------------------------------
 
 }; // namespace android
-
