diff options
author | Jeff Brown <jeffbrown@google.com> | 2010-09-17 16:10:01 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2010-09-17 16:10:01 -0700 |
commit | f1ec1ddd5072fa4f75c15be0ee1d82c17646500a (patch) | |
tree | ac476bd4e62cbb69eeaa01b741541f2fe291afc8 /include/utils | |
parent | aca11c0cf401147a075f72f110e0e27336066127 (diff) | |
parent | bc9599d48c79c18d306a13f51af9ef2aac92cdca (diff) | |
download | frameworks_base-f1ec1ddd5072fa4f75c15be0ee1d82c17646500a.zip frameworks_base-f1ec1ddd5072fa4f75c15be0ee1d82c17646500a.tar.gz frameworks_base-f1ec1ddd5072fa4f75c15be0ee1d82c17646500a.tar.bz2 |
am bc9599d4: am 838e93ed: Merge "Looper: Drop default parameters in favor of a safer overload." into gingerbread
Merge commit 'bc9599d48c79c18d306a13f51af9ef2aac92cdca'
* commit 'bc9599d48c79c18d306a13f51af9ef2aac92cdca':
Looper: Drop default parameters in favor of a safer overload.
Diffstat (limited to 'include/utils')
-rw-r--r-- | include/utils/Looper.h | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/include/utils/Looper.h b/include/utils/Looper.h index 92e4b0a..7d90866 100644 --- a/include/utils/Looper.h +++ b/include/utils/Looper.h @@ -83,16 +83,20 @@ public: * This method does not return until it has finished invoking the appropriate callbacks * for all file descriptors that were signalled. */ - int pollOnce(int timeoutMillis, - int* outFd = NULL, int* outEvents = NULL, void** outData = NULL); + int pollOnce(int timeoutMillis, int* outFd, int* outEvents, void** outData); + inline int pollOnce(int timeoutMillis) { + return pollOnce(timeoutMillis, NULL, NULL, NULL); + } /** * Like pollOnce(), but performs all pending callbacks until all * data has been consumed or a file descriptor is available with no callback. * This function will never return ALOOPER_POLL_CALLBACK. */ - int pollAll(int timeoutMillis, - int* outFd = NULL, int* outEvents = NULL, void** outData = NULL); + int pollAll(int timeoutMillis, int* outFd, int* outEvents, void** outData); + inline int pollAll(int timeoutMillis) { + return pollAll(timeoutMillis, NULL, NULL, NULL); + } /** * Wakes the poll asynchronously. @@ -128,8 +132,7 @@ public: * This method can be called on any thread. * This method may block briefly if it needs to wake the poll. */ - int addFd(int fd, int ident, - int events, ALooper_callbackFunc callback, void* data = NULL); + int addFd(int fd, int ident, int events, ALooper_callbackFunc callback, void* data); /** * Removes a previously added file descriptor from the looper. |