1838 Commits

Author SHA1 Message Date
Todd Poynor
94d0024557 Power HAL PowerManagerService hookup
Use PowerHAL to set system awake/suspend state.

Change-Id: If58a6f548564ea141b68f304455997d9ff04eace
Signed-off-by: Todd Poynor <toddpoynor@google.com>
2012-02-17 22:19:45 -08:00
Mathias Agopian
b13b9bdad2 frameworks/base refactoring.
step 2: move libutils headers to their new home: androidfw

Change-Id: I14624ba23db92a81f2cb929f104386e1fab293ef
2012-02-17 19:01:26 -08:00
Jeff Brown
4a7571bc0b Merge "frameworks/base refactoring." 2012-02-17 16:28:20 -08:00
Mathias Agopian
b93a03f841 frameworks/base refactoring.
First step. Move libui includes to their new home: androidfw.

Change-Id: Ic042b52fdba72f30edc3cc6339bf30b4c1b99662
2012-02-17 15:36:10 -08:00
Romain Guy
6917e6550d Merge "Record possible clip rejects when recording display lists" 2012-02-17 15:18:14 -08:00
Iliyan Malchev
8d25cb8a64 bluetooth: replace malloc() + memset() to zero with calloc()
Change-Id: I86b0ee4babc79189184b09c51757ec1162517c7b
Signed-off-by: Iliyan Malchev <malchev@google.com>
2012-02-17 14:27:13 -08:00
Romain Guy
33f6beb10f Record possible clip rejects when recording display lists
This optimization allows us to quickly skip operations that lie
entirely outside of the known bounds of a display list. Because
of ViewGroup.setClipChildren, we must keep the operations recorded
in the display list. setClipChildren(false) is however a very
uncommon operation and we will therefore often benefit from this
new optimization.

Change-Id: I0942c864e55298e6dccd9977d15adefbce3ba3ad
2012-02-17 13:10:00 -08:00
Jeff Brown
9806a2307f Ignore broken input channel when finishing input event.
There are occasional races during application shut down where the
input dispatcher will close an input channel before the application
has finished its last event.  So just ignore EPIPE.

Also tweak the logging for failed input event injection to make
it clearer which pid was trying to perform the injection.

Bug: 6013004
Change-Id: I7bbb01441d41762b03eafd4d39dcf0323e1cadf3
2012-02-17 10:28:09 -08:00
Jeff Brown
b503f1eea1 Don't throw on EPIPE in consumeBatchedInputEvents.
Bug: 6014825
Change-Id: I59bd98a1fba5d86f9793fd6e9d9f0a271ac1c789
2012-02-16 20:15:22 -08:00
Jeff Brown
91ec0b722f Merge "Clean up InputChannel file descriptor data type." 2012-02-14 17:11:41 -08:00
Jeff Brown
91e328984c Clean up InputChannel file descriptor data type.
File descriptors are ints.

Change-Id: Ie36733bf36ddfeaa9a09ef6ebd7bd2f1788f5d27
2012-02-14 15:57:59 -08:00
Irfan Sheriff
870084d26d Merge "Initial support for concurrency" 2012-02-14 15:37:07 -08:00
Glenn Kasten
b3db213eb5 Update comments
We no longer put the filename at start of file.

Change-Id: Ic435b159a23105681e3d4a6cb1ac097bc853302e
2012-02-14 09:17:59 -08:00
Jeff Brown
a9daa164a5 Merge "Fix possible races in vsync infrastructure." 2012-02-13 20:38:24 -08:00
Jeff Brown
58aedbc9be Fix possible races in vsync infrastructure.
Applications sometimes crashed on exit due to the display event
receiver pipe apparently being closed while still a member of the
Looper's epoll fd set.

This patch fixes a few different possible races related to
the display event receiver lifecycle.

1. The receiver used to play a little dance with the Looper,
registering and unregistering its callback after each vsync
request.  This code was a holdover from a time before the
surface flinger supported one-shot vsync requests, so we can
get rid of it and make things a lot simpler.

2. When the Choreographer is being accessed from outside the UI
thread, it needs to take great care that it does not touch
the display event receiver.  Bad things could happen if the receiver
is handling a vsync event on the Looper and the receiver is
disposed concurrently.

3. It was possible for the Choreographer to attempt to dispose
the receiver while handling a vsync message.  Now we defer disposing
the receiver for a little while, which is also nice because we
may be able to avoid disposing the receiver altogether if we find
that we need it again a little while later.

Bug: 5974105
Change-Id: I77a158f51b0b689af34d07aee4245b969e6260d6
2012-02-13 20:34:38 -08:00
Jean-Baptiste Queru
b35b9a8642 am 6466f400: am fca4ff38: am eaf2617f: am 472512f6: Merge "Fix incorrect prototype for JNI call"
* commit '6466f400a40224dc113eb6d06009a1c655151045':
  Fix incorrect prototype for JNI call
2012-02-13 20:02:50 -08:00
Jean-Baptiste Queru
eaf2617fc2 am 472512f6: Merge "Fix incorrect prototype for JNI call"
* commit '472512f6970fa170e2e1a3e1c24ac2b742e2e6b6':
  Fix incorrect prototype for JNI call
2012-02-13 19:55:52 -08:00
Jean-Baptiste Queru
472512f697 Merge "Fix incorrect prototype for JNI call" 2012-02-13 14:32:33 -08:00
Jeff Brown
072ec96a49 Implement batching of input events on the consumer side.
To support this feature, the input dispatcher now allows input
events to be acknowledged out-of-order.  As a result, the
consumer can choose to defer handling an input event from one
device (because it is building a big batch) while continuing
to handle input events from other devices.

The InputEventReceiver now sends a notification when a batch
is pending.  The ViewRoot handles this notification by scheduling
a draw on the next sync.  When the draw happens, the InputEventReceiver
is instructed to consume all pending batched input events, the
input event queue is fully processed (as much as possible),
and then the ViewRoot performs traversals as usual.

With these changes in place, the input dispatch latency is
consistently less than one frame as long as the application itself
isn't stalled.  Input events are delivered to the application
as soon as possible and are handled as soon as possible.  In practice,
it is no longer possible for an application to build up a huge
backlog of touch events.

This is part of a series of changes to improve input system pipelining.

Bug: 5963420

Change-Id: I42c01117eca78f12d66d49a736c1c122346ccd1d
2012-02-13 10:28:41 -08:00
Jeff Brown
cbee6d6ede Rewrite input transport using sockets.
Since we will not longer be modifying events in place, we don't need
to use an ashmem region for input.  Simplified the code to instead
use a socket of type SOCK_SEQPACKET.

This is part of a series of changes to improve input system pipelining.

Bug: 5963420

Change-Id: I05909075ed8b61b93900913e44c6db84857340d8
2012-02-13 10:28:40 -08:00
Amith Yamasani
f0451db422 Merge "Multi-user - wallpaper service" 2012-02-10 14:34:52 -08:00
Amith Yamasani
37ce3a8af6 Multi-user - wallpaper service
- Allow each user to have their own wallpaper (live or static).
- Migrate old wallpaper on upgrade.
- Update SystemBackupAgent to backup/restore from primary user's
  new wallpaper directory.

Reduce dependency on Binder.getOrigCallingUser() by passing the
userId for bindService.

Change-Id: I19c8c3296d3d2efa7f28f951d4b84407489e2166
2012-02-10 14:34:07 -08:00
Glenn Kasten
1137be1a68 Follow raw pointer and sp<> conventions
Unconditional delete for raw pointers.
Use "if (sp != 0)" not "if (sp.get() != 0)" or "if (sp != NULL)".
Use "if (raw != NULL)" not "if (raw)".

Change-Id: I531a8da7c37149261ed2f34b862ec4896a4b785b
2012-02-10 13:48:44 -08:00
Glenn Kasten
5dd4754f58 Merge "No newline or space at end of ALOG format string" 2012-02-10 13:36:24 -08:00
Mike Lockwood
3a74bd36f8 Add headless mode for running the framework without the surface flinger
Enabled by setting system property ro.config.headless to 1
This will allow the framework to run without starting activities,
system UI and the keyguard.
Framework can still run services, content providers and broadcast receivers.

Signed-off-by: Mike Lockwood <lockwood@android.com>

Conflicts:

	policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
	services/java/com/android/server/PowerManagerService.java
	services/java/com/android/server/am/ActivityManagerService.java
2012-02-10 10:51:24 -08:00
Girts Folkmanis
d3622e9e49 Disable output processing when opening serial port.
If post processing is not disabled, we end up translating LF to CRLF, which
makes binary protocols sad.
2012-02-10 10:51:23 -08:00
Mike Lockwood
7dbc4b457d Add SerialPort.sendBreak()
Signed-off-by: Mike Lockwood <lockwood@android.com>
2012-02-10 10:51:21 -08:00
Mike Lockwood
b01e8bf57b New Serial Manager API:
SerialManager: provides access to serial ports
SerialPort: for reading and writing data to and from serial ports

IO with both array based and direct ByteBuffers is supported.

Accessing serial ports requires android.permission.SERIAL_PORT permission

Each platform must configure list of supported serial ports in the
config_serialPorts resource overlay
(this is needed to prevent apps from accidentally accessing the bluetooth
or other system UARTs).

In addition, the platform uevent.rc file must set the owner to the
/dev/tty* files to "system" so the framework can access the port.

Signed-off-by: Mike Lockwood <lockwood@android.com>
2012-02-10 10:51:19 -08:00
Mike Lockwood
cbdb49dc5e Simple master volume support
Still needs integration with Settings (for persistence) and VolumePanel UI.

Change-Id: I9eca92c4b1ef2df2564411006a35753ab9618dce
Signed-off-by: Mike Lockwood <lockwood@android.com>
2012-02-10 09:01:28 -08:00
Glenn Kasten
0765c448ab No newline or space at end of ALOG format string
Change-Id: I0bef580cbc818cb7c87aea23919d26f1446cec32
2012-02-08 17:21:49 -08:00
Chih-Chung Chang
fb2cfa223b Comment out a warning message to avoid log spamming.
The warning message happens a lot when the region decoder is used (like
viewing a picture in the Gallery app).

Change-Id: I435f92eac8f322b091f3ed14ee48d0b5f0d84a8a
2012-02-07 13:07:51 +08:00
Jean-Baptiste Queru
0a3f6d69b6 am 33476f7a: am f79bcd2d: am 52da99fa: am a081c7b8: Merge "Skia API changes as a result of an update to the Skia library."
* commit '33476f7ad1c3b4dcaefddb306f315e201c4efb33':
  Skia API changes as a result of an update to the Skia library.
2012-02-06 14:45:36 -08:00
Jean-Baptiste Queru
52da99fac8 am a081c7b8: Merge "Skia API changes as a result of an update to the Skia library."
* commit 'a081c7b8bc5a3ea19fc7562b333fac525b17bc5f':
  Skia API changes as a result of an update to the Skia library.
2012-02-06 14:07:31 -08:00
Fabrice Di Meglio
ffd121233a Merge "Revert back to DroidSansArabic font for SystemUI" 2012-02-03 18:33:49 -08:00
Amith Yamasani
1ef7d13172 Merge "Multi-user - 1st major checkin" 2012-02-03 12:04:40 -08:00
Amith Yamasani
742a671273 Multi-user - 1st major checkin
Switching activity stacks
Cache ContentProvider per user
Long-press power to switch users (on phone)

Added ServiceMap for separating services by user
Launch PendingIntents on the correct user's uid
Fix task switching from Recents list
AppWidgetService is mostly working.

Commands added to pm and am to allow creating and switching profiles.

Change-Id: I15810e8cfbe50a04bd3323a7ef5a8ff4230870ed
2012-02-03 12:01:47 -08:00
Fabrice Di Meglio
2d315df641 Merge "Fix bug #5929529 Parentheses aren't correctly rendered in RTL context" 2012-02-03 11:57:54 -08:00
Glenn Kasten
191c849283 Merge "Use ToneGenerator::tone_type consistently" 2012-02-03 08:00:52 -08:00
Fabrice Di Meglio
ab8c73882e Fix bug #5929529 Parentheses aren't correctly rendered in RTL context
- do BiDi mirrored char mirroring in TextLayoutCache
- see BiDi mirrored chars list at:

 http://www.unicode.org/Public/6.0.0/ucd/extracted/DerivedBinaryProperties.txt

Change-Id: Ia0af0e252dbb0c55cc689bc9db34e05591bb6ee8
2012-02-02 19:07:02 -08:00
Fabrice Di Meglio
9b255cac77 Revert back to DroidSansArabic font for SystemUI
- see bug #5957987 Revert to use DroidSansArabic instead of DroidNaskh font for Arabic Shaping in SystemUI
- DroidNaskh was having FontMetrics not compatible with Roboto

Change-Id: I9f3031c250f907c80f3992f71d929dc91686e1e5
2012-02-02 18:57:19 -08:00
Bhanu Chetlapalli
8835f2928e Fix incorrect prototype for JNI call
This issue caused every Application launch to crash when using
portable JIT

Signed-Off-By: Bhanu Chetlapalli <bhanu@mips.com>

Change-Id: Id7cfdeb4fc00ba4b1ca6fa24bc01c8f3432857ff
2012-01-31 12:44:04 -08:00
Derek Sollenberger
889a3fa6ab Skia API changes as a result of an update to the Skia library.
These changes are required to work with r3022 of Skia

Change-Id: Ib7cebeb2eba6790bb38edfc2397b311cf419e17c
2012-01-31 14:08:22 -05:00
Romain Guy
13631f3da8 Add debug markers to OpenGLRenderer
These markers will be used to group the GL commands by View in the
OpenGL ES debugging tool. This will help correlate individual GL
calls to higher level components like Views.

Change-Id: I73607ba2e7224a80ac32527968261ee008f049c6
2012-01-30 17:41:55 -08:00
Romain Guy
530041d319 Add stencil buffer to the EGL config
Change-Id: If76c0cd6127534d90f9526b75c0f8e56259c6722
2012-01-30 12:04:17 -08:00
Jeff Brown
2d2d7d6f42 Merge "Implement a cancelation mechanism for queries." 2012-01-27 17:37:24 -08:00
Jeff Brown
75ea64fc54 Implement a cancelation mechanism for queries.
Added new API to enable cancelation of SQLite and content provider
queries by means of a CancelationSignal object.  The application
creates a CancelationSignal object and passes it as an argument
to the query.  The cancelation signal can then be used to cancel
the query while it is executing.

If the cancelation signal is raised before the query is executed,
then it is immediately terminated.

Change-Id: If2c76e9a7e56ea5e98768b6d4f225f0a1ca61c61
2012-01-27 17:33:21 -08:00
Glenn Kasten
23f7ad39ef Use ToneGenerator::tone_type consistently
Also remove defaults in startToneCommand(), they're not needed and the
default for tone type was nonsense.

Change-Id: I70fa8cee4f3dbb8c66ceb3719c8d3d2f447f05b9
2012-01-27 16:01:44 -08:00
Fabrice Di Meglio
39d18f53b3 Merge "Code cleaning: centralize use of #if USE_TEXT_LAYOUT_CACHE" 2012-01-27 14:42:06 -08:00
Fabrice Di Meglio
a731b082b2 Code cleaning: centralize use of #if USE_TEXT_LAYOUT_CACHE
- also clean some destructors (was not quite compulsory because
they are related to some Singletons)

Change-Id: I3091cac7b38628cda593d72570ba7a5d7ea2a15c
2012-01-27 14:24:46 -08:00
Glenn Kasten
c14639a9a1 Merge "Use audio_source_t consistently" 2012-01-27 09:06:00 -08:00