1457 Commits

Author SHA1 Message Date
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
Kenny Root
68c2e915fd Add better debug output for ResourceType errors
An error code is returned as -ESOMETHING, but the debug code was
printing out 0x%08x for these codes making -74 print out as 0xffffffb5
which is kind of silly.

Change-Id: I7d77fb3da2e146845949f121404f662b47288e61
2010-09-02 14:58:47 -07:00
Jeff Brown
df02df115a am 307ed31c: Merge "Remove incomplete input device enumeration NDK API." into gingerbread
Merge commit '307ed31c93f16dd3d34348c92cb22d81ddeba6c0' into gingerbread-plus-aosp

* commit '307ed31c93f16dd3d34348c92cb22d81ddeba6c0':
  Remove incomplete input device enumeration NDK API.
2010-08-31 15:49:39 -07:00
Jeff Brown
5fad2675e8 Remove incomplete input device enumeration NDK API.
Change-Id: I32de74ff5fcf0e29179a2aee03ddabd22fa485bb
2010-08-31 15:24:55 -07:00
Brad Fitzpatrick
ae087369c5 am 63070856: Merge "Don\'t propagate StrictMode over one-way Binder calls." into gingerbread
Merge commit '63070856d034a2819a26560bc7f2881e501c78b7' into gingerbread-plus-aosp

* commit '63070856d034a2819a26560bc7f2881e501c78b7':
  Don't propagate StrictMode over one-way Binder calls.
2010-08-31 15:02:21 -07:00
Brad Fitzpatrick
0234376503 Don't propagate StrictMode over one-way Binder calls.
This was causing stack stitching problems where a one-way call with
violations followed by a two-way call without violations was getting
the previous one-way call's violation stack stitched on to the second
caller's stack.

The solution is a little more indirect than I would've liked
(preserving the binder's onTransact flags until enforceInterface) but
was seemingly necessary to work without changing the AIDL compiler.
It should also be sufficiently cheap, since no new calls to
thread-local IPCThreadState lookups were required.  The additional
work is just same-thread getter/setters on the existing
IPCThreadState.

Change-Id: I4b6db1d445c56e868e6d0d7be3ba6849f4ef23ae
2010-08-31 13:16:49 -07:00
Jeff Brown
36f0cb26cb am 8d60866e: Input device calibration and capabilities.
Merge commit '8d60866e2100db70ecf0502c14768a384514d7e9' into gingerbread-plus-aosp

* commit '8d60866e2100db70ecf0502c14768a384514d7e9':
  Input device calibration and capabilities.
2010-08-30 18:22:32 -07:00
Jeff Brown
8d60866e21 Input device calibration and capabilities.
Finished the input device capability API.
Added a mechanism for calibrating touch devices to obtain more
accurate information about the touch contact area.
Improved pointer location to show new coordinates and capabilities.
Optimized pointer location display and formatting to avoid allocating large
numbers of temporary objects.  The GC churn was causing the application to
stutter very badly when more than a couple of fingers were down).
Added more diagnostics.

Change-Id: Ie25380278ed6f16c5b04cd9df848015850383498
2010-08-30 18:16:43 -07:00
Wu-cheng Li
6e46e6f748 am 7ec7b997: Remove camera metering mode API.
Merge commit '7ec7b9970cc3a6311bf043e228991adf24c43523' into gingerbread-plus-aosp

* commit '7ec7b9970cc3a6311bf043e228991adf24c43523':
  Remove camera metering mode API.
2010-08-30 13:48:07 -07:00
Wu-cheng Li
7ec7b9970c Remove camera metering mode API.
Metering mode is not supported yet.

Change-Id: Id6906d6ab0cd1a9dcbc5c303d8d5081b2cda699e
2010-08-30 13:33:53 -07:00
Kenny Root
8e72490526 am ad6731b0: Merge "Add debugging to ZipFileRO" into gingerbread
Merge commit 'ad6731b0fc759e446504bca163d8fd2fb6326577' into gingerbread-plus-aosp

* commit 'ad6731b0fc759e446504bca163d8fd2fb6326577':
  Add debugging to ZipFileRO
2010-08-27 13:00:22 -07:00
Kenny Root
ad6731b0fc Merge "Add debugging to ZipFileRO" into gingerbread 2010-08-27 12:58:00 -07:00
Kenny Root
6329fdbded Add debugging to ZipFileRO
Some assets are failing to read from ZIP files. This adds a bit more
debugging to figure out what's going on.

Change-Id: Id90e10546c54c85069a34478fbc28bc2523bda5d
2010-08-27 12:47:34 -07:00
Mathias Agopian
d322d16323 am ae66946b: Merge "fix a race in SF buffer management" into gingerbread
Merge commit 'ae66946bd9e9f1168241c75196d2379b43e3ca30' into gingerbread-plus-aosp

* commit 'ae66946bd9e9f1168241c75196d2379b43e3ca30':
  fix a race in SF buffer management
2010-08-27 12:23:35 -07:00
Mathias Agopian
c9289fa1c4 fix a race in SF buffer management
also remove some unused code.

Change-Id: Iae2c3309b7a08055f3e13a5b866c5c084993e352
2010-08-26 17:42:27 -07:00
Mathias Agopian
bc4389edfb am 8395b462: Merge "fix [2931513] Add support for setting the orientation of an ANativeWindow" into gingerbread
Merge commit '8395b4625b96f2133e2e4f595fdc69fbe222e4fc' into gingerbread-plus-aosp

* commit '8395b4625b96f2133e2e4f595fdc69fbe222e4fc':
  fix [2931513] Add support for setting the orientation of an ANativeWindow
2010-08-24 16:28:57 -07:00
Mathias Agopian
e96aa3e859 fix [2931513] Add support for setting the orientation of an ANativeWindow
Also implement support for cropping.

Change-Id: Iba5888dd242bf2feaac9e9ce26e404c1f404c280
2010-08-24 15:40:50 -07:00
Kenny Root
485de781f6 am 06c81f29: Merge changes I8a257579,I82d16312 into gingerbread
Merge commit '06c81f29a61ad3568a77f111b6be93e1f437f5bd' into gingerbread-plus-aosp

* commit '06c81f29a61ad3568a77f111b6be93e1f437f5bd':
  Add AStorageManager API to NDK
  Reorganize MountService IPC
2010-08-20 15:09:58 -07:00
Kenny Root
b90b9d54eb am 6be23712: Merge "Free created FileMap when uncompressing files" into gingerbread
Merge commit '6be237120e9673e3cfc5243da5bbca287effcf09' into gingerbread-plus-aosp

* commit '6be237120e9673e3cfc5243da5bbca287effcf09':
  Free created FileMap when uncompressing files
2010-08-20 13:18:22 -07:00
Kenny Root
be857d4284 Reorganize MountService IPC
Remove auto-generated AIDL files and replace them with manually edited
.java and .cpp/.h files so that binder calls can be made from either
Java or C++.

Update the makefiles to not attempt to generate the AIDL files and also
remove the old auto-generated .java files.

Put all the storage-related C++ things in libstorage so that we don't
pollute other libraries.

Change-Id: I82d1631295452709f12ff1270f36c3100e652806
2010-08-20 13:17:12 -07:00
Kenny Root
6be237120e Merge "Free created FileMap when uncompressing files" into gingerbread 2010-08-20 13:16:20 -07:00
Wu-cheng Li
346b6126d5 am 97a56269: Merge "Add camera fps range API." into gingerbread
Merge commit '97a56269d06770712f9da7a2a29385012ec9714e' into gingerbread-plus-aosp

* commit '97a56269d06770712f9da7a2a29385012ec9714e':
  Add camera fps range API.
2010-08-20 11:21:37 -07:00
Wu-cheng Li
97a56269d0 Merge "Add camera fps range API." into gingerbread 2010-08-20 11:19:51 -07:00
Wu-cheng Li
454630f237 Add camera fps range API.
Original preview frame rate API assumes the frame rate
is fixed. It does not not work with auto frame rate camera.

Change-Id: I38f7122ac8ec844ffd63558dc0763ffa17b0926a
2010-08-20 11:14:17 -07:00
Kenny Root
52b8235238 Free created FileMap when uncompressing files
Change-Id: Ice22c4ecb7c129b74bf60cd66ae79e110b017a4a
2010-08-19 18:39:58 -07:00
Mathias Agopian
a90a1e55c6 am 545eab8a: Merge "remove unused pixel format" into gingerbread
Merge commit '545eab8ae80b070177cc442931eadc8cd980de26' into gingerbread-plus-aosp

* commit '545eab8ae80b070177cc442931eadc8cd980de26':
  remove unused pixel format
2010-08-19 13:39:56 -07:00
Mathias Agopian
545eab8ae8 Merge "remove unused pixel format" into gingerbread 2010-08-19 13:37:35 -07:00
Jeff Brown
d7d58be0b8 am 00144745: Merge "Make the throttling more sensitive to end-to-end latency." into gingerbread
Merge commit '0014474569b8bb237f00fa692ab173678bff619e' into gingerbread-plus-aosp

* commit '0014474569b8bb237f00fa692ab173678bff619e':
  Make the throttling more sensitive to end-to-end latency.
2010-08-19 13:30:08 -07:00
Jeff Brown
0014474569 Merge "Make the throttling more sensitive to end-to-end latency." into gingerbread 2010-08-19 13:27:58 -07:00
Jeff Brown
0f4d7bc184 Make the throttling more sensitive to end-to-end latency.
The code now takes into account the time when the event was generated.
So with a 60Hz throttling rate, it ensures that a motion event will not
be delayed due to throttling by any more than 1/60th of second past
the time it was generated.

Change-Id: Iaea1d4f76e79036b4a18873485230731c3cd63c3
2010-08-19 13:26:58 -07:00
Mathias Agopian
e509328efc remove unused pixel format
Change-Id: I55bc3cc41385743c07f7e4de06335c922f746f73
2010-08-19 13:11:42 -07:00
Wu-cheng Li
6694c71dd8 am eba12749: Merge "Adding getSupportedPreviewSizes to CameraParameters.DO NOT MERGE" into gingerbread
Merge commit 'eba1274978911ea188eead128645299669d02f60' into gingerbread-plus-aosp

* commit 'eba1274978911ea188eead128645299669d02f60':
  Adding getSupportedPreviewSizes to CameraParameters.DO NOT MERGE
2010-08-19 11:10:44 -07:00