Commit Graph

1180 Commits

Author SHA1 Message Date
Jean-Baptiste Queru ffb0795daf am 9df7f313: am f0f6c54b: Merge "frameworks/base: Destroy the overlay even if there is an error"
* commit '9df7f31359866a77a47c9fab3171c71715fd0056':
  frameworks/base: Destroy the overlay even if there is an error
2010-11-23 11:17:48 -08:00
Jean-Baptiste Queru ec756056ab am f0f6c54b: Merge "frameworks/base: Destroy the overlay even if there is an error"
* commit 'f0f6c54b13831b11bd7a3bd7a01dc49b7505e56e':
  frameworks/base: Destroy the overlay even if there is an error
2010-11-23 11:14:57 -08:00
Naomi Luis 29a73ba845 frameworks/base: Destroy the overlay even if there is an error
Allow the overlay object to be destroyed whenever the destroy is
invoked. Currently the destroy call returns if there is an error
encountered, which results in open data and control channels.

Change-Id: I1f2ef4ebb5fb1dcabf05ab50b5bbf6e5e240a63a
2010-11-22 14:03:18 -08:00
Jeff Brown 9ee93d18ed Fix SDK build on Windows due to use of mmap.
Change-Id: Id4bd9a6f932285c93c5853e540efc20b99876564
2010-11-19 13:52:19 -08:00
Jeff Brown 46aabb3f51 am b27b8c0c: Fix a key repeating bug. (DO NOT MERGE)
* commit 'b27b8c0caf8ff23d10eea655085769f314050427':
  Fix a key repeating bug. (DO NOT MERGE)
2010-11-18 12:36:59 -08:00
Jeff Brown 0b7b1960e7 am bfc1cc2d: Fix stuck keys when released out of order. (DO NOT MERGE)
* commit 'bfc1cc2d1ea85cc754e63b422eb8cef8ae6a3667':
  Fix stuck keys when released out of order. (DO NOT MERGE)
2010-11-18 12:36:50 -08:00
Jeff Brown a3477c862a Added support for full PC-style keyboards.
BREAKING CHANGE: Redesigned the key character map format to
accomodate full keyboards with more comprehensive suite of modifiers.
Old key character maps will not work anymore and must be updated.
The new format is plain text only and it not compiled to a binary
file (so the "kcm" tool will be removed in a subsequent check-in).

Added FULL keyboard type to support full PC-style keyboards.

Added SPECIAL_FUNCTION keyboard type to support special function
keypads that do not have any printable keys suitable for typing
and only have keys like HOME and POWER

Added a special VIRTUAL_KEYBOARD device id convention that maps
to a virtual keyboard with a fixed known layout.  This is designed
to work around issues injecting input events on devices whose
built-in keyboard does not have a useful key character map (ie.
when the built-in keyboard is a special function keyboard only.)

Modified several places where events were being synthesized
to use the virtual keyboard.

Removed support for the "qwerty" default layout.
The new default layout is "Generic".  For the most part "qwerty"
was being used as a backstop in case the built-in keyboard did
not have a key character map (probably because it was a special
function keypad) and the framework needed to be able to inject
key events anyways.  The latter issue is resolved by using the
special VIRTUAL_KEYBOARD device instead of BUILT_IN_KEYBOARD.

Added the concept of a key modifier behavior so that
MetaKeyKeyListener can distinguish between keyboards that use
chorded vs. toggled modifiers.

Wrote more robust key layout and key character map parsers
to enable support for new keyboard features and user installable
key maps.

Fixed a bug in InputReader generating key ups when keys
are released out of sequence.

Updated tons of documentation.

Currently QwertyKeyListener is being used for full keyboards
with autotext and capitalization disabled.  This mostly works
but causes some problems with character pickers, etc.
These issues will be resolved in subsequent changes.

Change-Id: Ica48f6097a551141c215bc0d2c6f7b3fb634d354
2010-11-18 09:49:03 -08:00
Jeff Brown 9cf416cbcf Fix a key repeating bug. (DO NOT MERGE)
This change fixes a bug in the dispatcher where the window manager
policy would incorrectly receive a key repeat count of 0 in the case
where the key repeat was generated by the hardware or driver.
Long-press on HOME was broken as a result.

Repeating keys could also get stuck down.

Bug: 3159581
Bug: 3208156
Change-Id: I1145487cfcc41a7850dba4cafc63c4a5951ace5b
2010-11-17 19:42:04 -08:00
Jeff Brown 9bb3ef2e78 Fix stuck keys when released out of order. (DO NOT MERGE)
Bug: 3208156
Change-Id: I14e4d54f4912de5e2fabcd8638120623aa2d16e0
2010-11-17 19:17:54 -08:00
Jean-Baptiste Queru 3f02b88af6 am 5e069074: am a15e4886: Merge "Framebuffer: Support variable number of framebuffers in the UI"
* commit '5e0690745a45f99d12d940dd4aaae814b00a429e':
  Framebuffer: Support variable number of framebuffers in the UI
2010-11-17 17:36:11 -08:00
Jean-Baptiste Queru af10976583 am a15e4886: Merge "Framebuffer: Support variable number of framebuffers in the UI"
* commit 'a15e4886de8f75f3cb137f51743d330414c910e8':
  Framebuffer: Support variable number of framebuffers in the UI
2010-11-17 17:29:48 -08:00
Kenny Root 7986fe5035 Merge "Split UTF functions from String8/16" 2010-11-15 11:11:22 -08:00
Kenny Root c412dcb3eb Split UTF functions from String8/16
Split out all the UTF-8/16/32 handling code from String8/16 to its own
file to allow better reuse of code.

Change-Id: If9ce63920edc75472c38da4adce0d13cda9ad2f7
2010-11-12 15:53:40 -08:00
Jeff Brown e33a9ecc25 Enable touch splitting for all windows by default.
New default only applies to applications with targetSdkVersion >=
HONEYCOMB.  Old applications default to no touch splitting for
their windows.

In addition, enabled split touch for various system windows.

Bug: 3049580
Change-Id: Idc8da9baa2cd8e1e4e76af8967d7b6a5ccb94427
2010-11-12 14:53:43 -08:00
Jamie Gennis 54cc83e8a4 Implement reducing the buffer count of a Surface.
Change-Id: I7f979c60c06d654aa8265002836277434bc1a64f
Bug: 3095167
2010-11-11 14:06:38 -08:00
Jamie Gennis e9ebae24b9 Fix a compile warning in the Surface class.
Change-Id: Id744e71d2cd23c287925a5090e13a6d9908cdd99
2010-11-11 13:41:43 -08:00
Mathias Agopian a2b1b7f71d Merge "fix [3148312] Region can access data out of bounds" into gingerbread 2010-11-08 13:40:40 -08:00
Joe Onorato d94206c41d The CHEEK_TOUCH stuff never worked. Remove it.
Bug: 3104906
Change-Id: Ia37236ba1775fc3ec8c111e2e0b85b105e0dea6a
2010-11-08 13:02:58 -08:00
Jeff Brown 8149991234 Tell system server whether the app handled input events.
Refactored ViewRoot, NativeActivity and related classes to tell the
dispatcher whether an input event was actually handled by the application.

This will be used to move more of the global default key processing
into the system server instead of the application.

Change-Id: If06b98b6f45c543e5ac5b1eae2b3baf9371fba28
2010-11-08 12:49:43 -08:00
Jeff Brown d4ecee9313 Rename the locked meta key constants for clarity.
Also added some tests for LED setting.

Change-Id: I3fd86322afd07ae8de52d1ccbc2fae2c6d586641
2010-11-05 13:27:35 -07:00
Rodrigo Obregon 71484f2f76 Framebuffer: Support variable number of framebuffers in the UI
This change defines a macro NUM_FRAME_BUFFERS to set
the desired number of framebuffers to be used by the UI,
instead of hard-coding 2 framebuffers.

Aditional logic has been  added to handle the initialization
and destruction of NUM_FRAME_BUFFERS buffers.

Change-Id: I3a4bfec3e0f453432f2ffebf084c00f574d3be46
Signed-off-by: Rodrigo Obregon <robregon@ti.com>
2010-11-03 15:16:18 -05:00
Jeff Brown 92988aab48 Fix a key repeating bug.
This change fixes a bug in the dispatcher where the window manager
policy would incorrectly receive a key repeat count of 0 in the case
where the key repeat was generated by the hardware or driver.
Long-press on HOME was broken as a result.

Bug: 3159581
Change-Id: If0f02662313f5b879a4e566fbb461389e274a550
2010-11-02 17:58:22 -07:00
Jeff Brown b0bb949f09 Merge "Add plumbing for volume mute key." 2010-11-02 17:38:18 -07:00
Jeff Brown 7e5660f3e2 Add plumbing for volume mute key.
Full support for the volume mute key will be implemented in a
later change.

Bug: 2912307
Change-Id: I98c27d6360f159c8b7447e04b45f442eff87b38a
2010-11-02 17:31:39 -07:00
Romain Guy e113710ebd Merge "Optimize FBO drawing with regions. This optimization is currently disabled until Launcher is modified to take advantage of it. The optimization can be enabled by turning on RENDER_LAYERS_AS_REGIONS in the OpenGLRenderer.h file." 2010-11-02 16:23:22 -07:00
Romain Guy b801624dc4 Optimize FBO drawing with regions.
This optimization is currently disabled until Launcher is
modified to take advantage of it. The optimization can be
enabled by turning on RENDER_LAYERS_AS_REGIONS in the
OpenGLRenderer.h file.

Change-Id: I2fdf59d0f4dc690a3d7f712173ab8db3848b27b1
2010-11-02 16:17:23 -07:00
Kenny Root ec033c57b6 Fix default return code for getResource
Reorganization of getResource to allow for other densities accidentally
overrode the default return code for getResource from BAD_VALUE to
BAD_INDEX. This corrects the default return to BAD_VALUE which restores
other things to working.

Bug: 3155824
Change-Id: I13dafff85bc6978c5f5435fc09ab0474c7885c4d
2010-11-02 11:27:31 -07:00
Jeff Brown 2d283a68e4 am 7ab5d2d9: am a87ea46c: Fix bugs related to cheek event suppression.
* commit '7ab5d2d951792c9b1a1e7cfb279280c2d076506f':
  Fix bugs related to cheek event suppression.
2010-11-02 02:34:15 -07:00
Jeff Brown f6149c3229 Fix bugs related to cheek event suppression.
Two issues:

1. First, due to an inverted conditional in the input dispatcher, we were
   reporting touches as long touches and vice-versa to the power manager.

2. Power manager user activity cheek event suppression also suppresses touch
   events (but not long touch or up events).  As a result, if cheek event
   suppression was enabled, touches would not poke the user activity timer.
   However due to the above logic inversion, this actually affected long
   touches.  Net result, if cheek suppression was enabled in the power manager
   and you held your thumb on the screen long enough, the phone would
   go to sleep!

Cheek event suppression is commonly turned on when making a phone call.
Interestingly, it does not seem to get turned off afterward...

This change fixes the logic inversion and exempts touches from the cheek
suppression.  The reason we do the latter is because the old behavior
was actually harmful in other ways too: a touch down would be suppressed
but not a long touch or the touch up.  This would cause bizarre behavior
if you touched the screen while it was dimmed.  Instead of brightening
immediately, it would brighten either when you lifted your finger or
300ms later, whichever came first.

Bug: 3154895
Change-Id: Ied9ccec6718fbe86506322ff47a4e3eb58f81834
2010-11-01 20:51:58 -07:00
Jeff Brown fd749c63b0 Fix policy issues when screen is off.
Rewrote interceptKeyBeforeQueueing to make the handling more systematic.
Behavior should be identical except:
- We never pass keys to applications when the screen is off and the keyguard
  is not showing (the proximity sensor turned off the screen).
  Previously we passed all non-wake keys through in this case which
  caused a bug on Crespo where the screen would come back on if a soft key
  was held at the time of power off because the resulting key up event
  would sneak in just before the keyguard was shown.  It would then be
  passed through to the dispatcher which would poke user activity and
  wake up the screen.
- We propagate the key flags when broadcasting media keys which
  ensures that recipients can tell when the key is canceled.
- We ignore endcall or power if canceled (shouldn't happen anyways).

Changed the input dispatcher to not poke user activity for canceled
events since they are synthetic and should not wake the device.

Changed the lock screen so that it does not poke the wake lock when the
grab handle is released.  This fixes a bug where the screen would come
back on immediately if the power went off while the user was holding
one of the grab handles because the sliding tab would receive an up
event after screen turned off and release the grab handles.

Fixed a couple of issues where media keys were being handled inconsistently
or not at all, particularly in the case of the new PAUSE, PLAY
and RECORD keys.

Bug: 3144874
Change-Id: Ie630f5fb6f128cfdf94845f9428067045f42892c
2010-11-01 15:00:25 -07:00
Mathias Agopian 0cc0399b6b fix [3148312] Region can access data out of bounds
Change-Id: Ic46f31d40943f405e37da21a50b55edd5a2c4124
2010-10-29 15:14:08 -07:00
Kenny Root 133cde5805 Add path to get different DPI drawables
Allow a caller to request a different density than their current display
allows. This can mean a device displaying mdpi can get a resource that's
in hdpi and have it pretend to be in mdpi resolution. If a drawable
that's returned is not in the requested density, it will set it at the
appropriate density to be scaled up later on.

The API for this is hidden currently.

Bug: 3134688
Change-Id: I6c3908cbdef4907b8d3f1576df9e3b0e7af1755a
2010-10-29 12:47:07 -07:00
Jeff Brown 4c766ccea5 resolved conflicts for merge of df3cccf3 to master
Change-Id: I425496a9fc4e9cbc50ad6938e9dccb14827d9558
2010-10-27 22:18:43 -07:00
Jeff Brown fef5b04203 Drop all dispatcher state when dispatcher is disabled.
This patch makes the dispatcher drop all of its state when it is
disabled (when the screen turns off).  This ensures that the dispatcher
does not get stuck thinking a pointer is still down if the screen
turned off while the user was touching the display (such as a fat touch
while hitting the power button).

Bug: 3098344
Change-Id: If50ef5804870aa1acd3179fd4b40e3cda58dd39d
2010-10-27 18:43:51 -07:00
Vasu Nori 252ebf3643 Merge "convert one of the LOGE to LOG_WINDOW msg to reduce grief" 2010-10-26 18:39:27 -07:00
Vasu Nori 82bd26d904 convert one of the LOGE to LOG_WINDOW msg to reduce grief
grief from people who think this message is bad news.
but in reality, this message is really just an informational message
to aid in debugging

Change-Id: I1a2ab1666a27adb7d3fd210528b2c5218640d53d
2010-10-26 16:44:44 -07:00
Mathias Agopian 88456883da am 85c5ca07: am 2f19f56a: Merge "Updade Surface (ANativeWindow) format based on its buffers format" into gingerbread 2010-10-26 12:26:23 -07:00
Jeff Brown 53f291e55f Tweak log messages a bit.
Change-Id: Ifadf78c1ab8db49106216c70086f98860795c65f
2010-10-25 17:37:46 -07:00
Mathias Agopian 367dc0bd5f Updade Surface (ANativeWindow) format based on its buffers format
this is to allow applications to change the format of a surface's
buffer, and have it reflected in EGL; which is needed for
EGLConfig validation.

Change-Id: Iee074c30ad765881e2409c1d37450b05e561c44d
2010-10-25 17:08:37 -07:00
Jeff Brown 5e871b47ef Add test stubs for newly added methods.
Change-Id: I44139adebbbed1358f613fbcbfcddac6617ef5bd
2010-10-24 15:25:53 -07:00
Jeff Brown bc9f053156 am 2ef36763: am 860c2df4: Merge "Add unit tests for native input and fix bugs identified." into gingerbread
Merge commit '2ef36763700eff5679d6012e7f078c57f1a4c465'

* commit '2ef36763700eff5679d6012e7f078c57f1a4c465':
  Add unit tests for native input and fix bugs identified.
2010-10-24 14:36:23 -07:00
Jeff Brown 3c3cc62e24 Add unit tests for native input and fix bugs identified.
Fixed a bug where we would lose the first touch point when swiping out of
the virtual key area.

Fixed a bug where we would not send an ACTION_MOVE event in cases where
individual pointers went down/up and the remaining pointers actually moved.
This is important since many applications do not handle pointer movements
during ACTION_POINTER_DOWN or ACTION_POINTER_UP.  In the case of
ACTION_POINTER_UP the movement was completely lost since all pointers were
dispatched using their old location rather than the new location.

Improved motion event validation to check for duplicate pointer ids.

Added an input source constant that was missing from the NDK api but
defined in the framework api.

Added a timestamp when reporting added/removed devices in EventHub.

Bug: 3070082
Change-Id: I3206a030f43b7616e2f48006e5a9d522c4d92e56
2010-10-23 03:52:57 -07:00
Kenny Root 4b3d8bd9a4 am 7ba8c44e: am 8ad30b5b: Merge "Initialized check in ZipFileRO::findEntryByName" into gingerbread
Merge commit '7ba8c44ef7ba22d83a670e50314d69d0ddce1b9c'

* commit '7ba8c44ef7ba22d83a670e50314d69d0ddce1b9c':
  Initialized check in ZipFileRO::findEntryByName
2010-10-22 09:14:28 -07:00
Kenny Root 6d9d44aecc Merge "Initialized check in ZipFileRO::findEntryByName" into gingerbread 2010-10-22 07:55:44 -07:00
Kenny Root a209aa866e am d7cd560a: am 1d79a9d9: Use correct size of GAMEPAD_KEYCODES
Merge commit 'd7cd560af506f75d07034c136bea09b409b4d408'

* commit 'd7cd560af506f75d07034c136bea09b409b4d408':
  Use correct size of GAMEPAD_KEYCODES
2010-10-21 17:21:56 -07:00
Kenny Root bc9c82fb79 Use correct size of GAMEPAD_KEYCODES
Compute the actual number of indices in the GAMEPAD_KEYCODES instead of
the pure size in bytes.

Bug: 3121536
Change-Id: I71edbd8bf6eff2c8cc0ea5c6845362b3d1e06466
2010-10-21 15:46:03 -07:00
Kenny Root 06dbe50a1a Initialized check in ZipFileRO::findEntryByName
If a ZipFileRO object is uninitialized, the hash table will not have
been initialized. This condition wasn't checked in findEntryByName.

Bug: 3121109
Change-Id: Ib696e0e7e0cb4dd0fb2e456d6a847e5e8f4fe14e
2010-10-21 15:25:12 -07:00
Brad Fitzpatrick c6a98bb73d resolved conflicts for merge of 368fdba4 to master
Change-Id: I42b7b433c86a71a5da5db67109f056a280077c9d
2010-10-21 07:39:10 -07:00
Joe Onorato fc1a4df523 Reduce logging.
Remember, the system and main logs are
    - Shared resources
    - Primarily for recording problems
    - To be used only for large grained events during normal operation

Bug: 3104855
Change-Id: I136fbd101917dcbc8ebc3f96f276426b48bde7b7
2010-10-19 15:08:05 -04:00
Jeff Brown 2659f40403 am f2c40603: am 7689dd49: Merge "Fix bug where home presses were not poking user activity." into gingerbread
Merge commit 'f2c406030874b355ca9e4e67cc0e3aff6103c23e'

* commit 'f2c406030874b355ca9e4e67cc0e3aff6103c23e':
  Fix bug where home presses were not poking user activity.
2010-10-19 09:55:39 -07:00
Jeff Brown 60b5776c87 Add support for calibrating touch position.
Useful for tweaking touch screen alignment without having to modify the
kernel device driver x/y axis bounds.

Change-Id: I6ca43d3c138548f9dfb76aa33150a0c853698fb6
2010-10-18 17:24:49 -07:00
Jeff Brown ef3a823482 Fix bug where home presses were not poking user activity.
We now poke user activity twice: once upon dequeueing an event
for dispatch and then again just before we dispatch it.  The second
poke is to compensate for the fact that it can take a few seconds to
identify the dispatch target (if the application is responding slowly)
but we want to keep the display from going to sleep for X amount of time
after the app gets a chance to actually receive the event.  This mirrors
pre-Gingerbread behavior.

Removed some unnecessary code that filters user activity pokes when sending
events to KeyGuard.  We don't need this because KeyGuard already tells the
power manager to disable user activity.

Bug: 3101397
Change-Id: I8c3a77601fdef8f584e84cfdd11aa79da0ff51db
2010-10-18 14:50:13 -07:00
Jeff Brown ace3dc4f7c am 9e0e0543: am 36e65ffd: Merge "Fix a native crash in input dispatcher when windows are removed." into gingerbread
Merge commit '9e0e054388689fd618c84a283c28ee484477b44d'

* commit '9e0e054388689fd618c84a283c28ee484477b44d':
  Fix a native crash in input dispatcher when windows are removed.
2010-10-18 10:31:43 -07:00
Jeff Brown 7d8733fc7a am 5f0cbfce: am c1e7b218: Merge "Improve input device calibration format." into gingerbread
Merge commit '5f0cbfcecc4db20f897507c826296b3aac70c592'

* commit '5f0cbfcecc4db20f897507c826296b3aac70c592':
  Improve input device calibration format.
2010-10-16 09:13:13 -07:00
Jeff Brown e68d9e0be4 Add support for secure system overlays.
Manual merge from Gingerbread.

This change adds a new window type for secure system overlays
created by the system itself from non-secure system overlays that
might be created by applications that have the system alert permission.
Secure views ignore the presence of secure system overlays.

Bug: 3098519
Change-Id: Id876736fd8bf332ff9a5428bde59f5268aa49c3a
2010-10-15 17:10:55 -07:00
Jeff Brown b13d7b5cf0 Fix a native crash in input dispatcher when windows are removed.
Bug: 3101826
Change-Id: I040838600a6105c8d9f3235025dc0a7b5b27da2e
2010-10-15 16:20:51 -07:00
Jeff Brown d9dd44d867 Add support for secure system overlays. (DO NOT MERGE)
This change adds a new window type for secure system overlays
created by the system itself from non-secure system overlays that
might be created by applications that have the system alert permission.
Secure views ignore the presence of secure system overlays.

Bug: 3098519
Change-Id: I8f8398f4fdeb0469e5d71124c21bedf121bd8c07
2010-10-15 16:03:35 -07:00
Jeff Brown 6a817e22e4 Add keycodes and meta-key modifiers to support external keyboards.
Added new key maps for external keyboards.  These maps are intended to
be shared across devices by inheriting the "keyboards.mk" product
makefile as part of the device's product definition.

One of the trickier changes here was to unwind some code in
MetaKeyKeyListener that assumed that only the low 8 bits of the meta key
state were actually used.  The new code abandons bitshifts in favor
of simple conditionals that are probably easier to read anyways.
The special meta key state constants used by MetaKeyKeyListener
are now (@hide) defined in KeyEvent now so as to make it clearer that they
share the same code space even if those codes are not valid for KeyEvents.

The EventHub now takes care of detecting the appropriate key layout
map and key character map when the device is added and sets system
properties accordingly.  This avoids having duplicate code in
KeyCharacterMap to probe for the appropriate key character map
although the current probing mechanism has been preserved for legacy
reasons just in case.

Added support for tracking caps lock, num lock and scroll lock and
turning their corresponding LEDs on and off as needed.

The key character map format will need to be updated to correctly support
PC style external keyboard semantics related to modifier keys.
That will come in a later change so caps lock doesn't actually do
anything right now except turn the shiny LEDs on and off...

Added a list of symbolic key names to KeyEvent and improved the toString()
output for debug diagnosis.  Having this list in a central place in the
framework also allows us to remove it from Monkey so there is one less
thing to maintain when we add new keycodes.

Bug: 2912307
Change-Id: If8c25e8d50a7c29bbf5d663c94284f5f86de5da4
2010-10-15 16:00:07 -07:00
Raphael Moll cc13ed145c am 729503c2: am 848a2bc4: Merge "MinGW/Cygwin requires open() in O_BINARY mode." into gingerbread
Merge commit '729503c280e0d5b2621a8b7a6c93dd20fe1f5d0f'

* commit '729503c280e0d5b2621a8b7a6c93dd20fe1f5d0f':
  MinGW/Cygwin requires open() in O_BINARY mode.
2010-10-15 14:28:15 -07:00
Jeff Brown 28699cce02 am 567db077: am 2d441e14: Merge "Make sure EventHub reports added/removed devices immediately." into gingerbread
Merge commit '567db07702f851f2e7fb1fb0021ce2871469183e'

* commit '567db07702f851f2e7fb1fb0021ce2871469183e':
  Make sure EventHub reports added/removed devices immediately.
2010-10-15 14:26:18 -07:00
Kenny Root d72b033033 am 8fda1636: am bdf8034c: Merge "OBB: use PBKDF2 for key generation." into gingerbread
Merge commit '8fda1636e3e35f060b9046294efd3c062a1fdb84'

* commit '8fda1636e3e35f060b9046294efd3c062a1fdb84':
  OBB: use PBKDF2 for key generation.
2010-10-15 14:00:58 -07:00
Mathias Agopian e33a35f025 am 5bfa3a34: am 011b5bcc: Merge "implement part of [3094280] New animation for screen on and screen off add support for screen on animation" into gingerbread
Merge commit '5bfa3a34eaef759c3ec4def76f646eb1c0bf997f'

* commit '5bfa3a34eaef759c3ec4def76f646eb1c0bf997f':
  implement part of [3094280] New animation for screen on and screen off
2010-10-15 08:33:43 -07:00
Jeff Brown d055ca828a Merge "Improve input device calibration format." into gingerbread 2010-10-15 01:15:08 -07:00
Jeff Brown 6b337e74f0 Improve input device calibration format.
Added support for calibrating touch size for devices that report
size as an area measurement rather than as a width.
Fixed some bugs.

Bug: 3096045
Change-Id: I30a12e73752883516ed054f8af407204bca45814
2010-10-14 21:44:16 -07:00
Raphael Moll 6f3c5bd194 Merge "MinGW/Cygwin requires open() in O_BINARY mode." into gingerbread 2010-10-14 13:01:17 -07:00
Jeff Brown c04563d340 Merge "Make sure EventHub reports added/removed devices immediately." into gingerbread 2010-10-14 11:52:58 -07:00
Jeff Brown 7e40f36237 Make sure EventHub reports added/removed devices immediately.
Fixed a bug where EventHub would not report changes in devices
until the next event.

Bug: 3096147
Change-Id: Ie4c3e1d14d0ad806cfaa212611ce06034d1b94d4
2010-10-14 02:23:43 -07:00
Joe Onorato 503d2d4a08 am 9a12a3c8: am ba799098: Merge changes I76513387,I335fb671 into gingerbread
Merge commit '9a12a3c8d4bb20042cf69e07d268e3a04ac71f96'

* commit '9a12a3c8d4bb20042cf69e07d268e3a04ac71f96':
  Remove dead code, and make the animation a setting.
  turn off the electron beam
2010-10-13 23:34:21 -07:00
Raphael Moll 2cf43c6988 MinGW/Cygwin requires open() in O_BINARY mode.
Alsso printf %zd is not supported on MinGW/Cygwin.

Change-Id: I03811dabb46e2b05dd1d8abcc0ff97b125c77d54
2010-10-13 21:55:15 -07:00
Kenny Root 7f7c9a24b6 Merge "OBB: use PBKDF2 for key generation." into gingerbread 2010-10-13 18:29:43 -07:00
Kenny Root 95a6889312 OBB: use PBKDF2 for key generation.
Switch to using PBKDF2 for the key generation for OBBs. Any previously
generated OBBs will stop being read correctly. A small pbkdf2gen program
is available to allow generation of appropriate keys with the salts.

Bug: 3059950
Change-Id: If4305c989fd692fd1150eb270dbf751e09c37295
2010-10-13 18:25:33 -07:00
Jeff Brown 29ba9b8d3e am 4b255a23: am 03aa28fb: Merge "Improve the input policy handling a bit." into gingerbread
Merge commit '4b255a23041225103a6870e77a236f78c2816eda'

* commit '4b255a23041225103a6870e77a236f78c2816eda':
  Improve the input policy handling a bit.
2010-10-13 17:02:48 -07:00
Jeff Brown 5d0d23dba9 am b05632aa: am a28d5aff: Merge "Fix a bug synthesizing cancelation events for motions." into gingerbread
Merge commit 'b05632aae37ea3a3573aabf10e6868733546de96'

* commit 'b05632aae37ea3a3573aabf10e6868733546de96':
  Fix a bug synthesizing cancelation events for motions.
2010-10-13 17:01:53 -07:00
Mathias Agopian 9daa5c9b9d implement part of [3094280] New animation for screen on and screen off
add support for screen on animation

Change-Id: If50cf52ae04b95b42da7d74cf7fa96d5cb54d238
2010-10-13 14:28:26 -07:00
Mathias Agopian 59119e658a turn off the electron beam
Change-Id: I335fb6719f1d5a3f1c6f37a046fd1c2c4ed2bbc6
2010-10-12 14:16:11 -07:00
Jeff Brown a8ed856a8a Improve the input policy handling a bit.
Fixed some issues with Monkeys turning off their own screens.  Ook ook!
Added some more comments to explain what's going on.

Change-Id: Id2bc0466161a642a73ef7ef97725d1c81e984b12
2010-10-12 00:16:14 -07:00
Jeff Brown b6702e5972 Track input state when transferring touch focus.
Copies the input state to the destination window and sends synthesic
cancelation events to the source window.

Change-Id: Ia75820b0d756ed5d6cd22dce7830251ac85141ed
2010-10-11 18:32:20 -07:00
Jeff Brown 316237d554 Fix a bug synthesizing cancelation events for motions.
Change-Id: I881c0fa16c1d22c4b1b6cca24deb0105405ff5b0
2010-10-11 18:22:53 -07:00
Jeff Brown 33d54ce97d Fix an event injection bug when the policy is bypassed.
Added the concept of a "trusted" event to distinguish between events from
attached input devices or trusted injectors vs. other applications.
This change enables us to move certain policy decisions out of the
dispatcher and into the policy itself where they can be handled more
systematically.

Cherry pick of b931a1b4 from gingerbread into master.

Change-Id: I700a5f07b8b227878cea9437a289a45a245c0424
2010-10-11 17:54:12 -07:00
Jeff Brown d129348647 am 41aabeb5: am 1e6a3a53: Merge "Added more robust tracking and cancelation of events." into gingerbread
Merge commit '41aabeb51305d19747687f246080f44fc2a74435'

* commit '41aabeb51305d19747687f246080f44fc2a74435':
  Added more robust tracking and cancelation of events.
2010-10-11 17:42:30 -07:00
Jeff Brown 1fe6dec097 Fix an event injection bug when the policy is bypassed.
Added the concept of a "trusted" event to distinguish between events from
attached input devices or trusted injectors vs. other applications.
This change enables us to move certain policy decisions out of the
dispatcher and into the policy itself where they can be handled more
systematically.

Change-Id: I4d56fdcdd31aaa675d452088af39a70c4e039970
2010-10-11 16:26:13 -07:00
Jeff Brown 90f0cee685 Added more robust tracking and cancelation of events.
This change fixes several issues where events would be dropped in the
input dispatch pipeline in such a way that the dispatcher could not
accurately track the state of the input device.

Given more robust tracking, we can now also provide robust cancelation
of input events in cases where an application might otherwise become
out of sync with the event stream due to ANR, app switch, policy decisions,
or forced focus transitions.

Pruned some of the input dispatcher log output.

Moved the responsibility for calling intercept*BeforeQueueing into
the input dispatcher instead of the input reader and added support for
early interception of injected events for events coming from trusted
sources.  This enables behaviors like injection of media keys while
the screen is off, haptic feedback of injected virtual keys, so injected
events become more "first class" in a way.

Change-Id: Iec6ff1dd21e5f3c7feb80ea4feb5382bd090dbd9
2010-10-10 14:45:51 -07:00
Jamie Gennis fe2987d865 Merge "Move binder magic from the Surface class to GraphicBuffer." 2010-10-10 13:36:13 -07:00
Jamie Gennis 309d3bb2f9 Move binder magic from the Surface class to GraphicBuffer.
- Register buffers with Gralloc when unflattening a GraphicBuffer (rather than
doing it in the Surface class).
- Add support for a GraphicBuffer that wraps an android_native_window_t*.

Change-Id: I029ac086111bbac800e5ca37eb505f558b718cd8
2010-10-10 13:09:46 -07:00
Jeff Brown 26c336a468 am f10929fb: am a1bf0a06: Merge "Minor fix for InputReader support for non-touchscreen devices." into gingerbread
Merge commit 'f10929fb350395c21edd2cba7641479afe75e750'

* commit 'f10929fb350395c21edd2cba7641479afe75e750':
  Minor fix for InputReader support for non-touchscreen devices.
2010-10-10 12:53:39 -07:00
Jeff Brown 2eb1995a5d am 22cb4ef8: am d577cfd7: Merge "Switch Looper back to using poll() instead of epoll()." into gingerbread
Merge commit '22cb4ef8ce9c4d5536ac5cee5c40b82bfa56ccc5'

* commit '22cb4ef8ce9c4d5536ac5cee5c40b82bfa56ccc5':
  Switch Looper back to using poll() instead of epoll().
2010-10-10 12:52:40 -07:00
Jeff Brown 77e26fce8e Minor fix for InputReader support for non-touchscreen devices.
Change-Id: I2256e37dd1c6f3836f82786aae14ee5d0c98f4c6
2010-10-07 13:44:51 -07:00
Jeff Brown 54e1cdacd2 Switch Looper back to using poll() instead of epoll().
Added a couple of micro-optimizations to avoid calling wake() unnecessarily
and reduce JNI overhead slightly.

Fixed a minor issue where we were not clearing the "next" field of Messages
returned by the MessageQueue so the Message would hold on to its successor
and potentially prevent the GC from collecting it if the message were leaked
somehow.

Change-Id: I488d29417ce0cdd7d0e447cda76ec978ef7f811c
2010-10-07 13:26:39 -07:00
Jeff Brown 6d462b1221 am 56364bcd: am 78d15acf: Merge "Make secure views tolerate IME overlays." into gingerbread
Merge commit '56364bcd0d1a1b064db3e83fdb64f948ce5c2ad7'

* commit '56364bcd0d1a1b064db3e83fdb64f948ce5c2ad7':
  Make secure views tolerate IME overlays.
2010-10-07 12:20:45 -07:00
Mathias Agopian e1c290b97d am ff04e97f: am f4619308: Merge "fix [2835280] Add support for cancelling buffers to ANativeWindow" into gingerbread
Merge commit 'ff04e97faf75c435e453d4c1caf7eeac8b9c1ceb'

* commit 'ff04e97faf75c435e453d4c1caf7eeac8b9c1ceb':
  fix [2835280] Add support for cancelling buffers to ANativeWindow
2010-10-06 17:07:39 -07:00
Kenny Root 8c4edc02d5 am bfa33b94: am f84a5918: Merge "Use pread() in ZipFileRO for Linux" into gingerbread
Merge commit 'bfa33b9484e2c0a019ab81f30261b9696df23a9b'

* commit 'bfa33b9484e2c0a019ab81f30261b9696df23a9b':
  Use pread() in ZipFileRO for Linux
2010-10-05 17:02:42 -07:00
Vasu Nori 91abfdd3ed turn off some useless messages
Change-Id: I5ed5696cd052b70e7cf7b872205470cd56fada90
2010-10-05 16:50:51 -07:00
Jeff Brown 35cf0e9854 Make secure views tolerate IME overlays.
Change-Id: I3cf09b9d91045f4d9c558b4aace482a7b0bbd3d8
2010-10-05 12:26:23 -07:00
Mathias Agopian 19957553cb fix [2835280] Add support for cancelling buffers to ANativeWindow
There is a new ANativeWindow::cancelBuffer() API that can be used to
cancel any dequeued buffer, BEFORE it's been enqueued. The buffer is
returned to the list of availlable buffers. dequeue and cancel are not
mutually thread safe, they must be called from the same thread or
external synchronization must be used.

Change-Id: I86cc7985bace8b6a93ad2c75d2bef5c3c2cb4d61
2010-10-04 20:10:11 -07:00
Mathias Agopian 566b728c93 Merge "refactored screenshot code" into gingerbread 2010-10-04 20:04:42 -07:00
Mathias Agopian df85c455c3 refactored screenshot code
the core screenshot function now can capture the screen at any lower resolution
performing bilinear filtering.

we also now have some client code to interface with the screenshot service.

it's now possible to request a screenshot at a lower resolution.

Change-Id: I33689bba98507ab928d0898b21596d0d2fe4b953
2010-10-04 17:36:17 -07:00
Kenny Root 61ef747e0e Use pread() in ZipFileRO for Linux
AssetManager instances are created by zygote and passed to all its
children so that they don't have to individually open
frameworks-res.apk. This creates a problem for determining the current
file offset when using lseek() on those files, because you can't
guarantee the cross-process locking of a mutex. Luckily, Linux
implements pread() to get around this suckiness.

The problem is that only Linux implements this, so we have to keep the
old locking for use on host builds with aapt and friends. aapt doesn't
have this same problem of sharing file descriptors across forked
processes, so we can keep the local AutoMutex to protect accesses of
those files.

Change-Id: Ibe9f11499a53fe345f50fbaea438815ec0fd363e
2010-10-04 15:17:19 -07:00
Kenny Root 3d20bc9ff6 am ac754073: am b58b2714: Merge "ZipFileRO: moar logging and wrap close" into gingerbread
Merge commit 'ac7540733cafcca5bdb1842e1ebcb396ba064583'

* commit 'ac7540733cafcca5bdb1842e1ebcb396ba064583':
  ZipFileRO: moar logging and wrap close
2010-10-04 07:54:06 -07:00
Kenny Root a2b0e61228 Merge "ZipFileRO: moar logging and wrap close" into gingerbread 2010-10-04 07:28:20 -07:00
Jeff Brown c0242197ea am ea58d1ba: am e951ef07: Merge "Wait for initial device scan to finish before updating config." into gingerbread
Merge commit 'ea58d1bac2960c1794f048bfa5d1a60b1a3d23a1'

* commit 'ea58d1bac2960c1794f048bfa5d1a60b1a3d23a1':
  Wait for initial device scan to finish before updating config.
2010-10-01 21:49:39 -07:00