From 3c5d125ed796dbecdd80fa2c03e04ff9b1d752e4 Mon Sep 17 00:00:00 2001 From: Dianne Hackborn Date: Wed, 7 Jul 2010 14:27:31 -0700 Subject: Add new glue code for writing native apps. This factors out the boiler-plate code from the sample app to a common glue code that can be used for everyone writing this style of app: a dedicated app thread that takes care of waiting for events and processing them. As part of doing this, ALooper has a new facility to allow registration of fds that cause ALooper_pollOnce() to return the fd that has data, allowing the app to drive the loop without callbacks. Hopefully this makes some people feel better. :) Also do some other cleanup of the ALooper API, plus some actual documentation. Change-Id: Ic53bd56bdf627e3ba28a3c093faa06a92be522b8 --- libs/ui/InputDispatcher.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libs/ui/InputDispatcher.cpp') diff --git a/libs/ui/InputDispatcher.cpp b/libs/ui/InputDispatcher.cpp index 42a7fc6e57..f809cba90c 100644 --- a/libs/ui/InputDispatcher.cpp +++ b/libs/ui/InputDispatcher.cpp @@ -54,7 +54,7 @@ static inline nsecs_t now() { InputDispatcher::InputDispatcher(const sp& policy) : mPolicy(policy) { - mPollLoop = new PollLoop(); + mPollLoop = new PollLoop(false); mInboundQueue.head.refCount = -1; mInboundQueue.head.type = EventEntry::TYPE_SENTINEL; -- cgit v1.2.3-59-g8ed1b