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
Merge commit 'a23964f9a1df7fb2f18e350fb4215933674f9991'
* commit 'a23964f9a1df7fb2f18e350fb4215933674f9991':
bug:3082865 don't use IN to construct sql to delete downloads
Merge commit 'ca1db5ae68971779fd8af83c908128849f470ae0'
* commit 'ca1db5ae68971779fd8af83c908128849f470ae0':
Fallback to SharedPreferences$Editor.commit() when no apply() exists.
Merge commit '41aabeb51305d19747687f246080f44fc2a74435'
* commit '41aabeb51305d19747687f246080f44fc2a74435':
Added more robust tracking and cancelation of events.
* Added preliminary ButtonGroup support for buttons that display as a unit.
* Fixed a bug with MenuBuilder that caused old-style icon menus to fail.
* Added support for explicitly setting line height in text.
Change-Id: I1ba65f09dd9e1bc833d247ebe72052a21e3f99f0
There is a hard-coded limit to the frame rate of animations; this commit increases that rate by changing the inter-frame delay from 30 ms to 10 ms (although the actual delay will be determined by the maximum refresh rate of the system and the system load). For example, the effective maximum on current devices is 55 fps, or a delay of about 16 ms.
Change-Id: Id96a41cef36851e2d9508a98934f4b25595251ea
Merge commit 'd5423321b920be10c00fbcbc5a702f15e00693a5'
* commit 'd5423321b920be10c00fbcbc5a702f15e00693a5':
Fix issue #3074745: Crash in system process
Merge commit 'b8f7a4831ac26d0447fd8a2982416b2627a286b5' into gingerbread-plus-aosp
* commit 'b8f7a4831ac26d0447fd8a2982416b2627a286b5':
bug:3082865 don't use IN to construct sql to delete downloads
DownloadManager should not use IN clause when constructing
SQL to delete downloaded files Dowload app.
Lexer code in Download app doesn't know how to parse it.
Real fix is to fix Lexer.
But seriously real fix is to get rid of this complexity -
that I am planning for next version.
also, the following 2 are identical, in terms of SQL performance
WHERE _id IN (?, ?, ?)
WHERE (_id = ? OR _id = ? OR _id = ?)
Change-Id: Icca659a17c412247a193879e8d2f34e1b43ec9e5
Merge commit 'dd644c179c1bf47d82d776d7f644e4fc1467159d' into gingerbread-plus-aosp
* commit 'dd644c179c1bf47d82d776d7f644e4fc1467159d':
Fallback to SharedPreferences$Editor.commit() when no apply() exists.
Gingerbread widened the SharedPreferences.Editor interface, adding an
apply() method. Most people don't implement this interface
themselves, but a couple apps do.
A few spots in the core framework take a SharedPreferences[.Editor]
from apps, which might be a pre-Gingerbread implementation without an
apply() method. This patch makes sure we never depend on the presence
of an apply() method, falling back to commit() if apply() isn't
available.
Change-Id: I32693ac9227a60b694526a26a30234fb17a40581
Merge commit '1e6a3a53fc4d56e3a0f86c8721dedfd46e738a32' into gingerbread-plus-aosp
* commit '1e6a3a53fc4d56e3a0f86c8721dedfd46e738a32':
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
Some users of the download API (eg system update) need to get the
actual local filename of a downloaded file, not just a content URI.
Change-Id: I877e2776e778c1712f654ba5c840bfe6ed3fe60f
Merge commit '22cb4ef8ce9c4d5536ac5cee5c40b82bfa56ccc5'
* commit '22cb4ef8ce9c4d5536ac5cee5c40b82bfa56ccc5':
Switch Looper back to using poll() instead of epoll().
Merge commit '7a64e3a6f3e9f4de9cb097f604187d06268c23be' into gingerbread-plus-aosp
* commit '7a64e3a6f3e9f4de9cb097f604187d06268c23be':
DO NOT MERGE Set the cap at alpha to 80% of the total available.
No matter how much the user drags, the alpha like the height
should not get greater than a max and that max is 80% of what
is available in the image.
Change-Id: I57d181d6ea685461a44ed3ee29f83a675bc07fbc