summaryrefslogtreecommitdiffstats
path: root/libs/ui
diff options
context:
space:
mode:
Diffstat (limited to 'libs/ui')
-rw-r--r--libs/ui/Android.mk21
-rw-r--r--libs/ui/EventHub.cpp5
-rw-r--r--libs/ui/Overlay.cpp7
3 files changed, 32 insertions, 1 deletions
diff --git a/libs/ui/Android.mk b/libs/ui/Android.mk
index f7acd97..c5bc8bd 100644
--- a/libs/ui/Android.mk
+++ b/libs/ui/Android.mk
@@ -26,6 +26,27 @@ LOCAL_SHARED_LIBRARIES := \
libhardware \
libhardware_legacy
+
+ifeq ($(BOARD_USES_ECLAIR_LIBCAMERA),true)
+
+LOCAL_SRC_FILES+= \
+ ../camera/Camera.cpp \
+ ../camera/CameraParameters.cpp \
+ ../camera/ICamera.cpp \
+ ../camera/ICameraClient.cpp \
+ ../camera/ICameraService.cpp
+
+LOCAL_SRC_FILES+= \
+ ../surfaceflinger_client/ISurfaceComposer.cpp \
+ ../surfaceflinger_client/ISurface.cpp \
+ ../surfaceflinger_client/ISurfaceFlingerClient.cpp \
+ ../surfaceflinger_client/LayerState.cpp \
+ ../surfaceflinger_client/SharedBufferStack.cpp \
+ ../surfaceflinger_client/Surface.cpp \
+ ../surfaceflinger_client/SurfaceComposerClient.cpp
+
+endif
+
LOCAL_MODULE:= libui
ifeq ($(TARGET_SIMULATOR),true)
diff --git a/libs/ui/EventHub.cpp b/libs/ui/EventHub.cpp
index d45eaf0..0a98cb2 100644
--- a/libs/ui/EventHub.cpp
+++ b/libs/ui/EventHub.cpp
@@ -642,7 +642,10 @@ int EventHub::open_device(const char *deviceName)
if (ioctl(fd, EVIOCGBIT(EV_REL, sizeof(rel_bitmask)), rel_bitmask) >= 0)
{
if (test_bit(REL_X, rel_bitmask) && test_bit(REL_Y, rel_bitmask)) {
- device->classes |= CLASS_TRACKBALL;
+ if (test_bit(BTN_LEFT, key_bitmask) && test_bit(BTN_RIGHT, key_bitmask))
+ device->classes |= CLASS_MOUSE;
+ else
+ device->classes |= CLASS_TRACKBALL;
}
}
}
diff --git a/libs/ui/Overlay.cpp b/libs/ui/Overlay.cpp
index 3aa8950..96f8006 100644
--- a/libs/ui/Overlay.cpp
+++ b/libs/ui/Overlay.cpp
@@ -1,5 +1,6 @@
/*
* Copyright (C) 2007 The Android Open Source Project
+ * Copyright (c) 2009, Code Aurora Forum. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -83,6 +84,12 @@ status_t Overlay::getCrop(uint32_t* x, uint32_t* y, uint32_t* w, uint32_t* h)
return mOverlayData->getCrop(mOverlayData, x, y, w, h);
}
+status_t Overlay::setFd(int fd)
+{
+ if (mStatus != NO_ERROR) return mStatus;
+ return mOverlayData->setFd(mOverlayData, fd);
+}
+
int32_t Overlay::getBufferCount() const
{
if (mStatus != NO_ERROR) return mStatus;