1438 Commits

Author SHA1 Message Date
Jeff Brown
4ec134cdba am cce0cd13: Merge "Looper: use pthread_once for TLS key initialization." into gingerbread
Merge commit 'cce0cd138dd0dc338db59083052aca01a51bd52d' into gingerbread-plus-aosp

* commit 'cce0cd138dd0dc338db59083052aca01a51bd52d':
  Looper: use pthread_once for TLS key initialization.
2010-09-21 15:52:09 -07:00
Jeff Brown
134b4ae901 Looper: use pthread_once for TLS key initialization.
Also fix a Valgrind complaint by zeroing out the entire epoll event
struct since otherwise the data field union would be partly
uninitialized (but not in a harmful way).

Change-Id: I2091ce517e87fcad7c9caf90e2c5e4854a7ca465
2010-09-21 15:26:51 -07:00
Wu-cheng Li
2ad1ebcaab am d45cb72a: Rename FOCUS_MODE_CONTINUOUS to FOCUS_MODE_CONTINUOUS_VIDEO.
Merge commit 'd45cb72ac0d7d57829ffc9223decb89a5fc42ce2' into gingerbread-plus-aosp

* commit 'd45cb72ac0d7d57829ffc9223decb89a5fc42ce2':
  Rename FOCUS_MODE_CONTINUOUS to FOCUS_MODE_CONTINUOUS_VIDEO.
2010-09-21 08:57:15 -07:00
Wu-cheng Li
d45cb72ac0 Rename FOCUS_MODE_CONTINUOUS to FOCUS_MODE_CONTINUOUS_VIDEO.
This constant is not public yet. Continuous autofocus should
behave differently in still camera and camcorder. In camcorder,
lens movement may be more smooth. And the triggers to start a
new focus search may be different. If there is a need,
FOCUS_MODE_CONTINUOUS_PHOTO can be added in the future.

Change-Id: I05df9e491aca37829be3df92a73b952f26c86a4a
2010-09-21 08:46:32 -07:00
Jeff Brown
a8d95248bd am 7d4739be: Merge "Reduce lock thrashing in native Looper." into gingerbread
Merge commit '7d4739bed5cd5f41ddfa431446b51f61b94d7b0b' into gingerbread-plus-aosp

* commit '7d4739bed5cd5f41ddfa431446b51f61b94d7b0b':
  Reduce lock thrashing in native Looper.
2010-09-17 19:29:50 -07:00
Jeff Brown
9604987289 Reduce lock thrashing in native Looper.
In the common case, there is nothing interesting happening on the native
Looper besides occasional wake ups.  There is no point grabbing the
semaphore then.

Change-Id: Ib5c426d0e158dfa37891b7ff5537b6f833592fad
2010-09-17 17:01:23 -07:00
Brian Carlstrom
f3f822edc7 am 987ba541: Merge "Fix sim-eng build on Hardy" into gingerbread
Merge commit '987ba54127caaaa87056965b3d98b7e1a5b110b7' into gingerbread-plus-aosp

* commit '987ba54127caaaa87056965b3d98b7e1a5b110b7':
  Fix sim-eng build on Hardy
2010-09-16 23:51:31 -07:00
Brian Carlstrom
987ba54127 Merge "Fix sim-eng build on Hardy" into gingerbread 2010-09-16 23:48:53 -07:00
Mathias Agopian
876e0e5646 am 36f429d3: Fix typo which causes sensors to fail miserably
Merge commit '36f429d300be2550d7459b488dfc05b00ec59312' into gingerbread-plus-aosp

* commit '36f429d300be2550d7459b488dfc05b00ec59312':
  Fix typo which causes sensors to fail miserably
2010-09-16 22:16:02 -07:00
Mathias Agopian
36f429d300 Fix typo which causes sensors to fail miserably
Change-Id: Ieca18fc089e2bdf7d049f213836971b54d11cd76
2010-09-16 21:41:13 -07:00
Mathias Agopian
8f476407bf am 08710dcd: Merge "part of fix for [3004226] Cannot end the call - Proximity sensor doesn\'t work" into gingerbread
Merge commit '08710dcd589432c5828cefce25e4b565b15de9a6' into gingerbread-plus-aosp

* commit '08710dcd589432c5828cefce25e4b565b15de9a6':
  part of fix for [3004226] Cannot end the call - Proximity sensor doesn't work
2010-09-16 17:57:29 -07:00
Mathias Agopian
08710dcd58 Merge "part of fix for [3004226] Cannot end the call - Proximity sensor doesn't work" into gingerbread 2010-09-16 17:54:50 -07:00
Mathias Agopian
4d3cb63b9b part of fix for [3004226] Cannot end the call - Proximity sensor doesn't work
- In SensorEventQueue, only bail on errors from Looper::loopOnce
- Improve sensor error logging

Change-Id: Ib3cf8d5d9fdac8513a3d753155827e0feeda1662
2010-09-16 17:33:48 -07:00
Jeff Brown
d3576ef890 am 1ac48eab: Merge "Ensure input dispatcher and native looper handles EINTR." into gingerbread
Merge commit '1ac48eabd39e0cfd087ddf2c3b6ba8e56803bdd4' into gingerbread-plus-aosp

* commit '1ac48eabd39e0cfd087ddf2c3b6ba8e56803bdd4':
  Ensure input dispatcher and native looper handles EINTR.
2010-09-16 17:15:54 -07:00
Jeff Brown
6f0ff46c6f am 9c258710: Merge "Fix app switch latency optimization." into gingerbread
Merge commit '9c2587104ae259b9fa6a3525063197cc08e8820b' into gingerbread-plus-aosp

* commit '9c2587104ae259b9fa6a3525063197cc08e8820b':
  Fix app switch latency optimization.
2010-09-16 17:15:48 -07:00
Jeff Brown
1ac48eabd3 Merge "Ensure input dispatcher and native looper handles EINTR." into gingerbread 2010-09-16 17:12:31 -07:00
Jeff Brown
7dae0e47ab Ensure input dispatcher and native looper handles EINTR.
Change-Id: I0a42db5f273b9bfe4ab174e4ee65d5d852f9f6bc
2010-09-16 17:04:52 -07:00
Jeff Brown
54a1825121 Fix app switch latency optimization.
This optimization was broken due to recent changes in how ANRs are handled.

Change-Id: Ic99248a12755fadac8d4893e7d305b773e038d3d
2010-09-16 16:41:46 -07:00
Brian Carlstrom
dbb7b6da08 Fix sim-eng build on Hardy
Older glibc version do not include BSD htole32 and htole64 which are
present in bionic. This worksaround a sim-eng build issue by only
using htole32/htole64 if the host is not little endian.

Change-Id: Ia8d0d36285f3c34c51a331790458e52a21c2925f
2010-09-16 16:28:13 -07:00
Jeff Brown
61cf67a220 am 24326f72: Merge "Input API review." into gingerbread
Merge commit '24326f7223275ba9c85014b86d42040e3a7d2815' into gingerbread-plus-aosp

* commit '24326f7223275ba9c85014b86d42040e3a7d2815':
  Input API review.
2010-09-16 13:01:54 -07:00
Jeff Brown
24326f7223 Merge "Input API review." into gingerbread 2010-09-16 12:57:56 -07:00
Jeff Brown
9284b454e2 am b9eb949b: Merge "Fix input dispatcher regression on launcher drag&drop." into gingerbread
Merge commit 'b9eb949bcae977a3f86e8307f3854f157227c34c' into gingerbread-plus-aosp

* commit 'b9eb949bcae977a3f86e8307f3854f157227c34c':
  Fix input dispatcher regression on launcher drag&drop.
2010-09-16 12:40:30 -07:00
Jeff Brown
2a95c2a9ec Fix input dispatcher regression on launcher drag&drop.
Change-Id: I40e937bd712cd2ed6cceac95dfd1b8c8e070724f
2010-09-16 12:31:46 -07:00
Jeff Brown
03335af0db am 567c00a8: Merge "Fix NPE when handling certain kinds of ANRs." into gingerbread
Merge commit '567c00a86f748ad4d798ae50a09505cc051fc095' into gingerbread-plus-aosp

* commit '567c00a86f748ad4d798ae50a09505cc051fc095':
  Fix NPE when handling certain kinds of ANRs.
2010-09-16 11:08:46 -07:00
Jeff Brown
dc3e00563e Fix NPE when handling certain kinds of ANRs.
Change-Id: Iccef1852e52c84f6f49d30c491431460a10b33d3
2010-09-16 11:02:16 -07:00
Jeff Brown
7642c82c29 am f4d788c9: Merge "Make input dispatcher only ANR for foreground windows." into gingerbread
Merge commit 'f4d788c9309bc5480100d980608472e4cb04f309' into gingerbread-plus-aosp

* commit 'f4d788c9309bc5480100d980608472e4cb04f309':
  Make input dispatcher only ANR for foreground windows.
2010-09-15 18:57:48 -07:00
Jeff Brown
519e024d1e Make input dispatcher only ANR for foreground windows.
Redesigned the input dispatcher's ANR timeout mechanism so it is much
closer to Froyo's policy.  ANR is only ever signalled if the dispatcher
is waiting on a window to finish processing its previous event(s) and
there is new pending input.

In the old code, we tracked the dispatch timeout separately for each
input channel.  This was somewhat complicated and also resulted in the
situation where applications could ANR long after the user had pushed
them into the background.

Change-Id: I666ecada0952d4b95f1d67b9f733842b745c7f4b
2010-09-15 18:52:08 -07:00
Jeff Brown
dc1ab4b5cc Input API review.
Drop currently unsupported input features.
Add documentation comments.

Change-Id: I407d2e1dd90c5ee82983a3ccf177430d35ee7592
2010-09-14 20:46:14 -07:00
Jeff Brown
14bc6b5d06 am 09340a4b: Merge "Replace epoll() with poll() and rename PollLoop to Looper." into gingerbread
Merge commit '09340a4bb99507d9b6bfbfc68a450d4d4f354d73' into gingerbread-plus-aosp

* commit '09340a4bb99507d9b6bfbfc68a450d4d4f354d73':
  Replace epoll() with poll() and rename PollLoop to Looper.
2010-09-14 15:32:03 -07:00
Jeff Brown
09340a4bb9 Merge "Replace epoll() with poll() and rename PollLoop to Looper." into gingerbread 2010-09-14 15:27:33 -07:00
Mathias Agopian
48a862407d am b3ffc78f: Merge "Add logging of various important graphics events" into gingerbread
Merge commit 'b3ffc78f3432344702e6f5232067ab624083cad2' into gingerbread-plus-aosp

* commit 'b3ffc78f3432344702e6f5232067ab624083cad2':
  Add logging of various important graphics events
2010-09-14 15:14:10 -07:00
Jeff Brown
4fe6c3e51b Replace epoll() with poll() and rename PollLoop to Looper.
As part of this change, consolidated and cleaned up the Looper API so
that there are fewer distinctions between the NDK and non-NDK declarations
(no need for two callback types, etc.).

Removed the dependence on specific constants from sys/poll.h such as
POLLIN.  Instead looper.h defines events like LOOPER_EVENT_INPUT for
the events that it supports.  That should help make any future
under-the-hood implementation changes easier.

Fixed a couple of compiler warnings along the way.

Change-Id: I449a7ec780bf061bdd325452f823673e2b39b6ae
2010-09-14 01:59:45 -07:00
Mathias Agopian
04262e9f84 Add logging of various important graphics events
There are 16 events logged in the event log:
SF_APP_DEQUEUE_BEFORE
SF_APP_DEQUEUE_AFTER
SF_APP_LOCK_BEFORE
SF_APP_LOCK_AFTER
SF_APP_QUEUE

SF_REPAINT
SF_COMPOSITION_COMPLETE
SF_UNLOCK_CLIENTS
SF_SWAP_BUFFERS
SF_REPAINT_DONE

SF_FB_POST_BEFORE
SF_FB_POST_AFTER
SF_FB_DEQUEUE_BEFORE
SF_FB_DEQUEUE_AFTER
SF_FB_LOCK_BEFORE
SF_FB_LOCK_AFTER

all events log the buffer conserned and a timestamp in microseconds.

by default the logging is not enabled, to turn it on:
adb shell service call SurfaceFlinger 1006 i31 1
adb shell setprop debug.graphic_log 1

The effect is immediate in SurfaceFlinger, but applications need to be
restarted.

Change-Id: Ifc2e31f7aed072d9a7dede20ff2ce59231edbec1
2010-09-13 23:16:58 -07:00
Jeff Brown
0f0541e40c am b88102f5: Input dispatcher ANR handling enhancements.
Merge commit 'b88102f5b7e51552a3576cf197b4c8cf96f193d1' into gingerbread-plus-aosp

* commit 'b88102f5b7e51552a3576cf197b4c8cf96f193d1':
  Input dispatcher ANR handling enhancements.
2010-09-12 17:05:38 -07:00
Jeff Brown
b88102f5b7 Input dispatcher ANR handling enhancements.
This change is essentially a rewrite of the main input dispatcher loop
with the target identification folded in.  Since the input dispatcher now
has all of the window state, it can make better decisions about
when to ANR.

Added a .5 second deadline for processing app switch keys.  This behavior
predates Gingerbread but had not previously been ported.

Fixed some timing inaccuracies in the ANR accounting that could cause
applications to ANR sooner than they should have.

Added a mechanism for tracking key and motion events that have been
dispatched to a window so that appropriate cancelation events can be
synthesized when recovering from ANR.  This change helps to keep
applications in sync so they don't end up with stuck buttons upon
recovery from ANRs.

Added more comments to describe the tricky parts of PollLoop.

Change-Id: I13dffca27acb436fc383980db536abc4d8b9e6f1
2010-09-12 16:52:03 -07:00
Dianne Hackborn
510951e98b am a8512a71: Always set the scheduling group when starting a new thread.
Merge commit 'a8512a71d3c2e3e67bbccf11251ed594d66f1f25' into gingerbread-plus-aosp

* commit 'a8512a71d3c2e3e67bbccf11251ed594d66f1f25':
  Always set the scheduling group when starting a new thread.
2010-09-09 23:05:42 -07:00
Dianne Hackborn
a8512a71d3 Always set the scheduling group when starting a new thread.
Change-Id: Ia33acf13fc3752707f3819928c36315e223fa1bd
2010-09-09 22:12:25 -07:00
Jeff Brown
8723bb58b1 am b21fb104: Fix key repeat delay.
Merge commit 'b21fb104cc95fe7e5daf3b3626241e525c39a3f1' into gingerbread-plus-aosp

* commit 'b21fb104cc95fe7e5daf3b3626241e525c39a3f1':
  Fix key repeat delay.
2010-09-08 14:34:26 -07:00
Jeff Brown
b21fb104cc Fix key repeat delay.
Change-Id: I6216e082324ee29bf50e37acc673350ca5417c4d
2010-09-08 12:28:43 -07:00
Jeff Brown
a05088c18d am 85a31767: Add support for secure views.
Merge commit '85a3176704b5bfbeece9bd928369fbb76eec7dc6' into gingerbread-plus-aosp

* commit '85a3176704b5bfbeece9bd928369fbb76eec7dc6':
  Add support for secure views.
2010-09-08 11:55:24 -07:00
Jeff Brown
85a3176704 Add support for secure views.
Added the MotionEvent.FLAG_WINDOW_IS_OBSCURED flag which is set by the
input manager whenever another visible window is partly or wholly obscured
the target of a touch event so that applications can filter touches
accordingly.

Added a "filterTouchesWhenObscured" attribute to View which can be used to
enable filtering of touches when the view's window is obscured.

Change-Id: I936d9c85013fd2d77fb296a600528d30a29027d2
2010-09-08 11:50:55 -07:00
Kenny Root
2a08e2a9f8 am a19ef306: Revert "Free created FileMap when uncompressing files"
Merge commit 'a19ef306bd0a257c67b50f5e0e669e9fe52b0889' into gingerbread-plus-aosp

* commit 'a19ef306bd0a257c67b50f5e0e669e9fe52b0889':
  Revert "Free created FileMap when uncompressing files"
2010-09-07 19:35:47 -07:00
Kenny Root
a19ef306bd Revert "Free created FileMap when uncompressing files"
This reverts commit 52b8235238fb4d8cf141020cc1ae33880929dc3f.

munmap() on a region that overlaps something else (e.g, the ZIP Central
Directory in this case) unmaps those other regions as well making the
ZipFileRO class unhappy. Revert this for now until we can have FileMap
deal with this craziness.
2010-09-07 19:30:22 -07:00
Dianne Hackborn
a1205f07a6 am 2d3739d4: Merge "Modify native ALooper to take an explicit ident." into gingerbread
Merge commit '2d3739d479d67ba736cefbdd6087a11eadfb14ea' into gingerbread-plus-aosp

* commit '2d3739d479d67ba736cefbdd6087a11eadfb14ea':
  Modify native ALooper to take an explicit ident.
2010-09-07 16:38:45 -07:00
Dianne Hackborn
42c03e579a Modify native ALooper to take an explicit ident.
The ALooper API now uses an explicit "identifier" for the integer
that is returned rather than implicitly using the fd.  This allows
the APIs that had the fd to be a little more sane.

Change-Id: I8507f535ad484c0bdc4a1bd016d87bb09acd7ff0
2010-09-07 15:46:55 -07:00
Dianne Hackborn
05dff83894 am 11bbe200: Hopefully fix the build.
Merge commit '11bbe200cba150cfa5593bb87b54f3072a5ab2c5' into gingerbread-plus-aosp

* commit '11bbe200cba150cfa5593bb87b54f3072a5ab2c5':
  Hopefully fix the build.
2010-09-07 12:36:33 -07:00
Dianne Hackborn
11bbe200cb Hopefully fix the build.
Change-Id: Id8cd92c0895c9939e1386ef488bd1309a3be3568
2010-09-07 12:32:19 -07:00
Dianne Hackborn
b8bcfed552 am f703b77c: Merge "Add system property to turn off scheduling groups." into gingerbread
Merge commit 'f703b77c96a6d133fda534158eaf6190ff7c87f7' into gingerbread-plus-aosp

* commit 'f703b77c96a6d133fda534158eaf6190ff7c87f7':
  Add system property to turn off scheduling groups.
2010-09-07 11:30:08 -07:00
Dianne Hackborn
84bb52ed61 Add system property to turn off scheduling groups.
Do this:

adb shell setprop debug.sys.noschedgroups 1

Change-Id: I6e06a74205fd45ee1526ce71fe33944465d39984
2010-09-07 11:19:11 -07:00
Kenny Root
8d5250c601 am 2e246549: Merge "Add better debug output for ResourceType errors" into gingerbread
Merge commit '2e2465497c08061cccf4908e49095f2d19a35eea' into gingerbread-plus-aosp

* commit '2e2465497c08061cccf4908e49095f2d19a35eea':
  Add better debug output for ResourceType errors
2010-09-02 15:48:49 -07:00