summaryrefslogtreecommitdiffstats
path: root/native/android/input.cpp
diff options
context:
space:
mode:
authorJeff Brown <jeffbrown@google.com>2010-08-31 15:20:28 -0700
committerJeff Brown <jeffbrown@google.com>2010-08-31 15:24:55 -0700
commit5fad2675e8deee60aa91d7a96c9ac4826357f2c5 (patch)
treea6bd559cdfc301df21693357650c3b58b95e0763 /native/android/input.cpp
parent47471175c9d19a00d06a77aa316dcda08be97deb (diff)
downloadframeworks_base-5fad2675e8deee60aa91d7a96c9ac4826357f2c5.zip
frameworks_base-5fad2675e8deee60aa91d7a96c9ac4826357f2c5.tar.gz
frameworks_base-5fad2675e8deee60aa91d7a96c9ac4826357f2c5.tar.bz2
Remove incomplete input device enumeration NDK API.
Change-Id: I32de74ff5fcf0e29179a2aee03ddabd22fa485bb
Diffstat (limited to 'native/android/input.cpp')
-rw-r--r--native/android/input.cpp72
1 files changed, 0 insertions, 72 deletions
diff --git a/native/android/input.cpp b/native/android/input.cpp
index a82282d..379960a 100644
--- a/native/android/input.cpp
+++ b/native/android/input.cpp
@@ -33,7 +33,6 @@ using android::InputEvent;
using android::KeyEvent;
using android::MotionEvent;
using android::InputDeviceInfo;
-using android::InputDeviceProxy;
using android::sp;
using android::Vector;
@@ -270,74 +269,3 @@ int32_t AInputQueue_preDispatchEvent(AInputQueue* queue, AInputEvent* event) {
void AInputQueue_finishEvent(AInputQueue* queue, AInputEvent* event, int handled) {
queue->finishEvent(event, handled != 0);
}
-
-
-int32_t AInputDevice_getDeviceIds(int32_t* idBuf, size_t nMax, size_t* nActual) {
- Vector<int32_t> ids;
- InputDeviceProxy::getDeviceIds(ids);
-
- if (nActual) {
- *nActual = ids.size();
- }
-
- if (idBuf && ids.size() < nMax) {
- memcpy(idBuf, ids.array(), ids.size() * sizeof(int32_t));
- return 0;
- }
-
- return -ENOMEM;
-}
-
-AInputDevice* AInputDevice_acquire(int32_t deviceId) {
- sp<InputDeviceProxy> proxy(InputDeviceProxy::getDevice(deviceId));
- if (proxy == NULL) {
- return NULL;
- }
- proxy->incStrong((void*)AInputDevice_acquire);
- return static_cast<AInputDevice*>(proxy.get());
-}
-
-void AInputDevice_release(AInputDevice* device) {
- if (device) {
- InputDeviceProxy* proxy = static_cast<InputDeviceProxy*>(device);
- proxy->decStrong((void*)AInputDevice_acquire);
- }
-}
-
-const char* AInputDevice_getName(AInputDevice* device) {
- InputDeviceProxy* proxy = static_cast<InputDeviceProxy*>(device);
- return proxy->getInfo()->getName().string();
-}
-
-uint32_t AInputDevice_getSources(AInputDevice* device) {
- InputDeviceProxy* proxy = static_cast<InputDeviceProxy*>(device);
- return proxy->getInfo()->getSources();
-}
-
-int32_t AInputDevice_getKeyboardType(AInputDevice* device) {
- InputDeviceProxy* proxy = static_cast<InputDeviceProxy*>(device);
- return proxy->getInfo()->getKeyboardType();
-}
-
-int32_t AInputDevice_getMotionRange(AInputDevice* device, int32_t rangeType,
- float* outMin, float* outMax, float* outFlat, float* outFuzz) {
- InputDeviceProxy* proxy = static_cast<InputDeviceProxy*>(device);
- const InputDeviceInfo::MotionRange* range = proxy->getInfo()->getMotionRange(rangeType);
- if (range) {
- if (outMin) {
- *outMin = range->min;
- }
- if (outMax) {
- *outMax = range->max;
- }
- if (outFlat) {
- *outFlat = range->flat;
- }
- if (outFuzz) {
- *outFuzz = range->fuzz;
- }
- return 0;
- } else {
- return -ENOTSUP;
- }
-}