27763 Commits

Author SHA1 Message Date
John Reck
06e09f6928 Expand WebKitHitTest and do some preliminary caching
Change-Id: Id9e9cc11f1482f434133e70b14970d7248a39008
2012-01-13 17:56:49 -08:00
Dianne Hackborn
cc7bd5ab55 Merge "Update notification documentation to follow current guidelines." into ics-mr1 2012-01-13 16:36:05 -08:00
Michael Kolb
ba82e0675e Merge "fix layer scrollbar updates" 2012-01-13 16:25:14 -08:00
Gilles Debunne
14568c3f76 Fixes around extract mode
Stop selection mode after Edit/Copy while in extracted mode.

The selection mode was started by a long press in the ExtractedEditText.
Selection Copy in the menu simply sends the id to the context menu.
SelectionMode is not stopped in the underlying text since it was not
started there. Stop it directly in the ExtractedEditText.

Cut and paste do stop the mode because the text is modified.

Change-Id: Id7dbfa99de404c4eb85ced9627c99af4895ac628
2012-01-13 16:23:35 -08:00
Michael Kolb
4695e20aa5 fix layer scrollbar updates
Bug: 5868791

tell webkit the layer has been scrolled

Change-Id: Ib12963340d950be992fbe5f9520c9a33c04404e8
2012-01-13 16:15:11 -08:00
Jeff Sharkey
438304d515 Merge "Introduce FileRotator." 2012-01-13 15:33:42 -08:00
Jeff Sharkey
a27a3e8ad7 Introduce FileRotator.
Utility that rotates files over time, similar to logrotate. There is
a single "active" file, which is periodically rotated into historical
files, and eventually deleted entirely. Files are stored under a
specific directory with a well-known prefix.

Bug: 5386531
Change-Id: I29f821a881247e50ce0f6f73b20bbd020db39e43
2012-01-13 15:27:28 -08:00
Gilles Debunne
893eace609 Merge "Sub display list in TextView" 2012-01-13 14:53:54 -08:00
Kenny Root
fcbbaf1d83 resolved conflicts for merge of e80341c8 to master
Change-Id: I5d2150e20aebb6aba10caa391268c0fdbbf281ef
2012-01-13 13:39:28 -08:00
Martijn Coenen
6b5862d3b4 Remove LlcpPacket from public namespace.
This is a left-over, unused by the public API's.

Change-Id: I3ccccd58a6c52caeb476a6972126eb034a0ff917
2012-01-13 13:31:22 -08:00
Kenny Root
e80341c8c5 am 2ddf6ea6: Merge "Fix issue with selecting proper JNI libraries" into ics-mr1
* commit '2ddf6ea6dc67043fb9f91df366187c2153c30d30':
  Fix issue with selecting proper JNI libraries
2012-01-13 13:12:34 -08:00
Kenny Root
2ddf6ea6dc Merge "Fix issue with selecting proper JNI libraries" into ics-mr1 2012-01-13 13:11:02 -08:00
Dianne Hackborn
f88d1493aa am 10065177: am 2e282f35: Merge "Fix issue #5823276: home repaints after full-screen app is exited" into ics-mr1
* commit '100651779fde99f7ae2a10719d688b51115f08e9':
  Fix issue #5823276: home repaints after full-screen app is exited
2012-01-13 13:01:48 -08:00
Dianne Hackborn
100651779f am 2e282f35: Merge "Fix issue #5823276: home repaints after full-screen app is exited" into ics-mr1
* commit '2e282f35b009fe4c23daca35592dae2032641643':
  Fix issue #5823276: home repaints after full-screen app is exited
2012-01-13 12:58:45 -08:00
Dianne Hackborn
2e282f35b0 Merge "Fix issue #5823276: home repaints after full-screen app is exited" into ics-mr1 2012-01-13 12:56:40 -08:00
Romain Guy
44d79747b5 Remove unused parameter
Change-Id: I0896b2cdb9f1fa9c5e191e4ea425e22ac6f10f29
2012-01-13 12:12:09 -08:00
Glenn Kasten
bc1d77b6cb Use audio_stream_type_t consistently
At native level it was a mixture of audio_stream_type_t, int, uint32_t,
and uint8_t.  Java is still int.  Also fixed a couple of hard-coded -1
instead of AUDIO_STREAM_DEFAULT, and in startToneCommand a hard-coded 0
instead of AUDIO_STREAM_VOICE_CALL.

Change-Id: Ia33bfd70edca8c2daec9052984b369cd8eee2a83
2012-01-13 10:20:14 -08:00
Ken Wakasa
5a5b84c3e1 Merge "Bring LatinIME's privateImeOptions "forceAscii" to a formal public API" 2012-01-12 18:15:42 -08:00
Alon Albert
cf12902719 Merge "Log global autosync on dumpsys Protect dumpsys from divide by zero" 2012-01-12 17:39:37 -08:00
Adam Cohen
dc89357810 Merge "Getting rid of hack where the wallpaper offset was being deferred" 2012-01-12 16:47:00 -08:00
Ken Wakasa
c8f4183669 Bring LatinIME's privateImeOptions "forceAscii" to a formal public API
bug: 5850605
Change-Id: I6ab6076909c735a3e0729b457de68d0b5301184d
2012-01-13 09:45:41 +09:00
Gilles Debunne
b35ab7b729 Sub display list in TextView
TextView uses a sub-display list to 'cache' the rendering of its
text. This saves time when drawing an editable text, where the blinking
cursor forces a re-draw twice per second, which creates pauses during
scrolling.

Added a sub-display list invalidation when an appearance span is
modified/added/removed.

Also added an invalidation of the display list when selection range
is changed.

Change-Id: I41e8068a12902b8a745c5bb77de8c77def76a270
2012-01-12 15:56:37 -08:00
Dianne Hackborn
6ceca588a2 Update notification documentation to follow current guidelines.
The documentation is now consistent with the current UI guidelines
for handling notifications, and includes complete sample code showing
the correct way to do this.

Change-Id: I68f0afc62c2af164c3205535e62093679e2a256a
2012-01-12 15:48:20 -08:00
Svetoslav Ganov
bd2ff3666b Merge "AccessibilityService description not internationalized." 2012-01-12 15:36:58 -08:00
Jeff Brown
986f00faf4 Merge "Rewrite SQLite database wrappers." 2012-01-12 15:03:26 -08:00
Jeff Brown
156936975d Merge "Fix indentation and whitespace." 2012-01-12 14:59:30 -08:00
Jeff Brown
18c415c3c8 Merge "Clean up database tests a little bit." 2012-01-12 14:59:11 -08:00
Jeff Brown
e5360fbf3e Rewrite SQLite database wrappers.
The main theme of this change is encapsulation.  This change
preserves all existing functionality but the implementation
is now much cleaner.

Instead of a "database lock", access to the database is treated
as a resource acquisition problem.  If a thread's owns a database
connection, then it can access the database; otherwise, it must
acquire a database connection first, and potentially wait for other
threads to give up theirs.  The SQLiteConnectionPool encapsulates
the details of how connections are created, configured, acquired,
released and disposed.

One new feature is that SQLiteConnectionPool can make scheduling
decisions about which thread should next acquire a database
connection when there is contention among threads.  The factors
considered include wait queue ordering (fairness among peers),
whether the connection is needed for an interactive operation
(unfairness on behalf of the UI), and whether the primary connection
is needed or if any old connection will do.  Thus one goal of the
new SQLiteConnectionPool is to improve the utilization of
database connections.

To emulate some quirks of the old "database lock," we introduce
the concept of the primary database connection.  The primary
database connection is the one that is typically used to perform
write operations to the database.  When a thread holds the primary
database connection, it effectively prevents other threads from
modifying the database (although they can still read).  What's
more, those threads will block when they try to acquire the primary
connection, which provides the same kind of mutual exclusion
features that the old "database lock" had.  (In truth, we
probably don't need to be requiring use of the primary database
connection in as many places as we do now, but we can seek to refine
that behavior in future patches.)

Another significant change is that native sqlite3_stmt objects
(prepared statements) are fully encapsulated by the SQLiteConnection
object that owns them.  This ensures that the connection can
finalize (destroy) all extant statements that belong to a database
connection when the connection is closed.  (In the original code,
this was very complicated because the sqlite3_stmt objects were
managed by SQLiteCompiledSql objects which had different lifetime
from the original SQLiteDatabase that created them.  Worse, the
SQLiteCompiledSql finalizer method couldn't actually destroy the
sqlite3_stmt objects because it ran on the finalizer thread and
therefore could not guarantee that it could acquire the database
lock in order to do the work.  This resulted in some rather
tortured logic involving a list of pending finalizable statements
and a high change of deadlocks or leaks.)

Because sqlite3_stmt objects never escape the confines of the
SQLiteConnection that owns them, we can also greatly simplify
the design of the SQLiteProgram, SQLiteQuery and SQLiteStatement
objects.  They no longer have to wrangle a native sqlite3_stmt
object pointer and manage its lifecycle.  So now all they do
is hold bind arguments and provide a fancy API.

All of the JNI glue related to managing database connections
and performing transactions is now bound to SQLiteConnection
(rather than being scattered everywhere).  This makes sense because
SQLiteConnection owns the native sqlite3 object, so it is the
only class in the system that can interact with the native
SQLite database directly.  Encapsulation for the win.

One particularly tricky part of this change is managing the
ownership of SQLiteConnection objects.  At any given time,
a SQLiteConnection is either owned by a SQLiteConnectionPool
or by a SQLiteSession.  SQLiteConnections should never be leaked,
but we handle that case too (and yell about it with CloseGuard).

A SQLiteSession object is responsible for acquiring and releasing
a SQLiteConnection object on behalf of a single thread as needed.
For example, the session acquires a connection when a transaction
begins and releases it when finished.  If the session cannot
acquire a connection immediately, then the requested operation
blocks until a connection becomes available.

SQLiteSessions are thread-local.  A SQLiteDatabase assigns a
distinct session to each thread that performs database operations.
This is very very important.  First, it prevents two threads
from trying to use the same SQLiteConnection at the same time
(because two threads can't share the same session).
Second, it prevents a single thread from trying to acquire two
SQLiteConnections simultaneously from the same database (because
a single thread can't have two sessions for the same database which,
in addition to being greedy, could result in a deadlock).

There is strict layering between the various database objects,
objects at lower layers are not aware of objects at higher layers.
Moreover, objects at higher layers generally own objects at lower
layers and are responsible for ensuring they are properly disposed
when no longer needed (good for the environment).

API layer: SQLiteDatabase, SQLiteProgram, SQLiteQuery, SQLiteStatement.
Session layer: SQLiteSession.
Connection layer: SQLiteConnectionPool, SQLiteConnection.
Native layer: JNI glue.

By avoiding cyclic dependencies between layers, we make the
architecture much more intelligible, maintainable and robust.

Finally, this change adds a great deal of new debugging information.
It is now possible to view a list of the most recent database
operations including how long they took to run using
"adb shell dumpsys dbinfo".  (Because most of the interesting
work happens in SQLiteConnection, it is easy to add debugging
instrumentation to track all database operations in one place.)

Change-Id: Iffb4ce72d8bcf20b4e087d911da6aa84d2f15297
2012-01-12 14:56:18 -08:00
Adam Cohen
791a6331e3 Getting rid of hack where the wallpaper offset was being deferred
-> This was a hack, and with all the work going into vsync etc, it
   really shouldn't be needed.

Change-Id: I59005e2644e0ba08846a6c661e8c4e22640d8e02
2012-01-12 14:38:38 -08:00
Jeff Brown
3f11f302c7 Fix indentation and whitespace.
Change-Id: Iccb954fb77f21b230eecb3f06328e11b14611f17
2012-01-12 14:37:58 -08:00
Jeff Brown
5a05c23f3d Clean up database tests a little bit.
Change-Id: Ib05c699bf59187cb51627b5f352c2a15ad2c28bb
2012-01-12 14:37:57 -08:00
Gilles Debunne
e340527eab Merge "Fixed fadingEdge documentation" 2012-01-12 14:21:58 -08:00
Dianne Hackborn
01b02a734d Fix issue #5823276: home repaints after full-screen app is exited
Don't consider a window as a candidate for the top fullscreen window
if it is not going to be a candiate for layout.

Also don't consider windows a candidate for layout if their app token
is hidden.  This fixes a transient state where we are preparing to
unhide the window but have not done so yet.

Change-Id: Ife5299ffa003c1df1a4f787b7a2809cbf614ec16
2012-01-12 14:05:03 -08:00
Matthew Xie
cf5cecd854 am 1890fa82: am 79d84930: Merge "Set Bluetooth adapter to PowerOff mode when turnoff with airplane on" into ics-mr1
* commit '1890fa822091ea700b7409ac79a57cf650b55003':
  Set Bluetooth adapter to PowerOff mode when turnoff with airplane on
2012-01-12 11:29:39 -08:00
Matthew Xie
1890fa8220 am 79d84930: Merge "Set Bluetooth adapter to PowerOff mode when turnoff with airplane on" into ics-mr1
* commit '79d84930cd776c7173330eeb13b3282b6034fc37':
  Set Bluetooth adapter to PowerOff mode when turnoff with airplane on
2012-01-12 11:27:10 -08:00
Matthew Xie
79d84930cd Merge "Set Bluetooth adapter to PowerOff mode when turnoff with airplane on" into ics-mr1 2012-01-12 11:24:06 -08:00
John Reck
6b9a41c55e am baaf136c: am 0a3fcc3e: Fix Apache stack
* commit 'baaf136cd279e22a7ae4b551ebd5fad23b84996d':
  Fix Apache stack
2012-01-12 11:03:06 -08:00
John Reck
baaf136cd2 am 0a3fcc3e: Fix Apache stack
* commit '0a3fcc3eed15ed50bcaa7808b6ccb170fb137210':
  Fix Apache stack
2012-01-12 11:00:17 -08:00
Teng-Hui Zhu
50ba5a26e6 Document update for WebView user to support HTML5 video
Change-Id: I299d2f2b3ec8dbf640e613b28635972e0a707903
2012-01-12 10:47:10 -08:00
Glenn Kasten
1c66547ba2 Merge "Use audio_format_t consistently" 2012-01-12 10:30:28 -08:00
Glenn Kasten
accb114e59 Use audio_mode_t consistently
It was int or uint32_t.
Also make getMode() const.

Change-Id: Ibe45aadbf413b9158e4dd17f2b3bcc6355288d37
2012-01-12 09:52:37 -08:00
Danielle Millett
2931d8ace9 Merge "DO NOT MERGE - Cherry picking from master to MR1" into ics-mr1 2012-01-12 07:28:24 -08:00
Brian Colonna
8a1131d789 Merge "DO NOT MERGE cherry-picked FU framework tablet commits" into ics-mr1 2012-01-12 06:33:49 -08:00
satok
11299b1b8c Make public SpellChecker utilities
Bug: 5639238
Change-Id: Id7dd2263a6305cc6ba0cf8f4d8ad8fb0d39a48ff
2012-01-12 13:54:53 +09:00
Alon Albert
27096822e2 Log global autosync on dumpsys
Protect dumpsys from divide by zero

Change-Id: I3474f2f4b41643ef1e95cbcf835c96b66b13de38
2012-01-11 18:06:41 -08:00
Xia Wang
4acb784630 am 87badc20: am 4ac4ab4e: Merge "Remove sleep from test acitivity to avoid ANR when key event is injected bug#: 5737922" into ics-mr1
* commit '87badc20c7d5462ee27f13adf50acaf6a3232884':
  Remove sleep from test acitivity to avoid ANR when key event is injected bug#: 5737922
2012-01-11 17:57:16 -08:00
Xia Wang
4ac4ab4ef0 Merge "Remove sleep from test acitivity to avoid ANR when key event is injected bug#: 5737922" into ics-mr1 2012-01-11 17:52:06 -08:00
John Reck
b123e96059 Merge "Initial NavCache removal support" 2012-01-11 16:34:26 -08:00
Matthew Xie
f3171fb60c Set Bluetooth adapter to PowerOff mode when turnoff with airplane on
Currently, when airplane mode was on and BT was on, turning BT off
moved BT to hotoff state. This fix moves BT all the way to Poweroff
state to have better power performance.
bug 5854282

Change-Id: I7ba41797a46a81ddb3a576453f2a8303b5eed525
2012-01-11 14:46:13 -08:00
Selim Gurun
51938e2691 Merge "Do Not Merge. Move ssl callbacks to webcore thread." into ics-mr1 2012-01-11 14:18:14 -08:00