summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeff Brown <jeffbrown@google.com>2012-02-14 15:56:29 -0800
committerJeff Brown <jeffbrown@google.com>2012-02-14 15:57:59 -0800
commit91e328984c0d1e0f95b3d37f779d9d4fa9bfe8f8 (patch)
treed34bec78b0c35e3d35110564f39c3a05050d41f5
parent58aedbc9bea13415e2d42cf7c9fe8a7efd243e66 (diff)
downloadframeworks_base-91e328984c0d1e0f95b3d37f779d9d4fa9bfe8f8.zip
frameworks_base-91e328984c0d1e0f95b3d37f779d9d4fa9bfe8f8.tar.gz
frameworks_base-91e328984c0d1e0f95b3d37f779d9d4fa9bfe8f8.tar.bz2
Clean up InputChannel file descriptor data type.
File descriptors are ints. Change-Id: Ie36733bf36ddfeaa9a09ef6ebd7bd2f1788f5d27
-rw-r--r--core/jni/android_view_InputChannel.cpp6
-rw-r--r--core/jni/android_view_InputEventReceiver.cpp2
-rw-r--r--include/ui/InputTransport.h6
-rw-r--r--services/input/InputDispatcher.cpp2
4 files changed, 8 insertions, 8 deletions
diff --git a/core/jni/android_view_InputChannel.cpp b/core/jni/android_view_InputChannel.cpp
index 5377425..6d783de 100644
--- a/core/jni/android_view_InputChannel.cpp
+++ b/core/jni/android_view_InputChannel.cpp
@@ -199,9 +199,9 @@ static void android_view_InputChannel_nativeReadFromParcel(JNIEnv* env, jobject
bool isInitialized = parcel->readInt32();
if (isInitialized) {
String8 name = parcel->readString8();
- int32_t rawFd = parcel->readFileDescriptor();
- int32_t dupFd = dup(rawFd);
- if (rawFd < 0) {
+ int rawFd = parcel->readFileDescriptor();
+ int dupFd = dup(rawFd);
+ if (dupFd < 0) {
ALOGE("Error %d dup channel fd %d.", errno, rawFd);
jniThrowRuntimeException(env,
"Could not read input channel file descriptors from parcel.");
diff --git a/core/jni/android_view_InputEventReceiver.cpp b/core/jni/android_view_InputEventReceiver.cpp
index 4b737ed..47b3f66 100644
--- a/core/jni/android_view_InputEventReceiver.cpp
+++ b/core/jni/android_view_InputEventReceiver.cpp
@@ -93,7 +93,7 @@ NativeInputEventReceiver::~NativeInputEventReceiver() {
}
status_t NativeInputEventReceiver::initialize() {
- int32_t receiveFd = mInputConsumer.getChannel()->getFd();
+ int receiveFd = mInputConsumer.getChannel()->getFd();
mLooper->addFd(receiveFd, 0, ALOOPER_EVENT_INPUT, handleReceiveCallback, this);
return OK;
}
diff --git a/include/ui/InputTransport.h b/include/ui/InputTransport.h
index 1f738cd..0facce3 100644
--- a/include/ui/InputTransport.h
+++ b/include/ui/InputTransport.h
@@ -123,7 +123,7 @@ protected:
virtual ~InputChannel();
public:
- InputChannel(const String8& name, int32_t fd);
+ InputChannel(const String8& name, int fd);
/* Creates a pair of input channels.
*
@@ -133,7 +133,7 @@ public:
sp<InputChannel>& outServerChannel, sp<InputChannel>& outClientChannel);
inline String8 getName() const { return mName; }
- inline int32_t getFd() const { return mFd; }
+ inline int getFd() const { return mFd; }
/* Sends a message to the other endpoint.
*
@@ -162,7 +162,7 @@ public:
private:
String8 mName;
- int32_t mFd;
+ int mFd;
};
/*
diff --git a/services/input/InputDispatcher.cpp b/services/input/InputDispatcher.cpp
index d4e59d1..e6e28df 100644
--- a/services/input/InputDispatcher.cpp
+++ b/services/input/InputDispatcher.cpp
@@ -3105,7 +3105,7 @@ status_t InputDispatcher::registerInputChannel(const sp<InputChannel>& inputChan
sp<Connection> connection = new Connection(inputChannel, inputWindowHandle, monitor);
- int32_t fd = inputChannel->getFd();
+ int fd = inputChannel->getFd();
mConnectionsByFd.add(fd, connection);
if (monitor) {