Commit Graph

70744 Commits

Author SHA1 Message Date
Hugo Benichi
de310dba78 Better LocalLog
This patch fixes the following issues in LocalLog:
  - reverseDump() uses a descending iterator with linear complexity
    instead of a quadratic loop using get(index) on a linked list.
  - reverseDump() is added to ReadOnlyLocalLog.
  - synchronized section in log() is restricted to mutation of internal
    list.
  - formatting of the log message does not create an internal
    StringBuilder.
  - the instance variable mNow is removed: it was only used inside log()
    as a local variable.
  - remaining instance variables are qualified with final.
  - the linked list is replaced by a fixed capacity array-backed queue.

Test: added unit tests
Change-Id: I1a54f0ad26dd35448d3297ea24df1fd626d20ef3
2016-10-11 09:54:19 +09:00
Jeff Sharkey
46e2afec48 Set MIME type when building BROWSE intents. am: 42a4aaab44 am: ac184d3c46
am: 6f5f03b8c1

Change-Id: Iab359d3b375db98986adf9314b6bec7530326381
2016-10-10 23:40:21 +00:00
Jeff Sharkey
6f5f03b8c1 Set MIME type when building BROWSE intents. am: 42a4aaab44
am: ac184d3c46

Change-Id: I3fb6cc86357c6e19efe58a6e4d31d1f79758b332
2016-10-10 23:34:28 +00:00
Jeff Sharkey
ac184d3c46 Set MIME type when building BROWSE intents.
am: 42a4aaab44

Change-Id: I9efdf0e7223b162988f9484b06c7e3665202738f
2016-10-10 23:29:28 +00:00
Jeff Sharkey
42a4aaab44 Set MIME type when building BROWSE intents.
If we created a BROWSE PendingIntent early during boot (while the
device was still locked), we would resolve the MIME type as "null"
meaning the intent would fail to launch.

Since we always know what the MIME type will be, set it explicitly.

Test: boot device while USB device attached
Bug: 30742481
Change-Id: I23c523cbe2660ca63a3b7df1f41300ab803b314c
2016-10-10 21:28:40 +00:00
Chet Haase
49a513b571 Add API to query whether animators are enabled
Animators can be scaled to have zero duration globally in any device.
This can happen either via Developer Options (an uncommon path) or
Battery Saver mode (much more common for real users).
In general, this works fine; it just causes app animations to be jump-cuts
instead (which is the desired effect, either to make transitions faster
(Developer Options setting) or to optimize battery usage by rendering
fewer frames (Battery Saver mode).

But sometimes, choreographed animations can have undesired artifacts. For
example, an animation that calls an end listener to restart itself
will end up doing this almost constantly due to this effect. Other artifacts
can also occur, such as intermediate results in a complex choreography of
multiple animations can show several intermediate results in a way that is
confusing to the user.

For these cases, there is nothing that the platform can do to automatically
determine how to best handle the result. Instead, we surface this new
API to help developers discover this behavior and compensate accordingly.

Bug: 31052471 Animation playback is abnormally fast during Battery saver mode
Test: unit tests, CTS test upcoming

Change-Id: Id7ef1a9652ac5c6cdaca0c126756e82582d49b1c
2016-10-10 19:52:07 +00:00
Alex Hills
30e45f5de4 Updates documentation for MessagingStyle constructor am: fd590441c1 am: d86df31497
am: 21863add46

Change-Id: I1ab5b5f60df0c946040ed069a99e2b775bbee9a9
2016-10-10 15:27:37 +00:00
John Reck
5cb74bca88 Canvas fastjni -> @FastNative
Just the basic cleanup first, will follow-up with a more
comprehensive update later
Test: builds & boots, refactor no behavior change

Change-Id: Ie3a7144b5fefdfda085e2ab50da8b0e627a1ecb8
2016-10-10 08:19:15 -07:00
John Reck
32995223a8 Convert utils fastjni -> @FastNative
Test: builds & boots, refactor no behavior change
Change-Id: Ieb569a70fd05b88a8d2bd7b285099c1fc1888a75
2016-10-10 07:59:25 -07:00
Alan Viverette
39a561f5bb Scale bitmap shaders for target density am: 0d2a46b733 am: 444f2043d1
am: 36d83ffc5b

Change-Id: I97a23b431247f4541f5517787a486aca7d95a618
2016-10-10 14:30:50 +00:00
Jorim Jaggi
b1ce491d78 Merge changes from topic 'latency_pin'
* changes:
  Unlock latency improvements
  Add latency tracking for checking PIN (1/2)
2016-10-10 11:48:06 +00:00
Robert Carr
6f10b511a9 When adding dialog window but not creating update the configuration. am: d7dbec7e4c am: 7696b0d06b
am: 3d2783c82b

Change-Id: Iaf8dd88bbbb63c7ebc5b5963f1e30a23d6df0909
2016-10-08 21:33:16 +00:00
Nancy Zheng
d9157b8b01 Fix race condition in checkPattern and verifyPattern. am: 9475460e66
am: ce2cef46b3

Change-Id: I7777ce413f30d99d4712bd9aa4a2b4f5f371403f
2016-10-08 21:29:39 +00:00
TreeHugger Robot
ba039066d8 Merge "Allow some packages to be excluded during during work profile creation." 2016-10-08 19:23:29 +00:00
Dimitry Ivanov
1e78f82948 Merge "Relax namespace restriction on system server classloader" am: a8135325c1 am: 3c6b4961cb am: 097ff24545
am: 629ad7e37e

Change-Id: I04ed9be5bb8167fd5ed41f7d120e7c25194aec97
2016-10-08 19:07:03 +00:00
Hugo Benichi
d0f9bc1a52 Reject DHCP packets with no magic cookie am: 006e061301 am: 1ade34dd76
am: 7720c01fcf

Change-Id: Id6c52e0e8819ab70c21939519b617da1b25da255
2016-10-08 19:05:17 +00:00
Hugo Benichi
88bcf2f65e Catch runtime exceptions when parsing DHCP packets am: e0ea7fecd6 am: c4a13afe92
am: 9f713864ca

Change-Id: I41b2576f5e944e4d52160570b60bb53315cb7009
2016-10-08 18:48:55 +00:00
Dianne Hackborn
a448099fea Fix issue #31305336: File corrupt: too many wake locks 101 am: cb99a72e62 am: 50b9f3513c
am: a89e1ec692

Change-Id: Ia020798e19ced931b0f690c8626ccf728e4157e4
2016-10-08 18:15:02 +00:00
TreeHugger Robot
917d108f66 Merge "Added minimum supported version in SQLiteOpenHelper" 2016-10-08 07:34:55 +00:00
Sudheer Shanka
7cb54a34c4 Allow some packages to be excluded during during work profile creation.
Bug: 31657192
Test: adb shell am instrument -e class com.android.server.pm.UserManagerTest#testAddManagedProfile_withDisallowedPackages -w com.android.frameworks.servicestests/android.support.test.runner.AndroidJUnitRunner
Change-Id: I37eab6084e0f911d0e2407186b789875588194a2
2016-10-07 18:11:11 -07:00
Alex Hills
21863add46 Updates documentation for MessagingStyle constructor am: fd590441c1
am: d86df31497

Change-Id: I6bdc90b7fde47569823b49c556f3bca9b50b0e48
2016-10-07 20:50:26 +00:00
Alan Viverette
36d83ffc5b Scale bitmap shaders for target density am: 0d2a46b733
am: 444f2043d1

Change-Id: Ia0f4da2963e3a4a775cd2bb1324bd69ff86244b6
2016-10-07 20:46:37 +00:00
Alex Hills
d86df31497 Updates documentation for MessagingStyle constructor
am: fd590441c1

Change-Id: I341c9a18c5a64e8cb63ad277611b9e55f61047c1
2016-10-07 20:43:57 +00:00
Alan Viverette
444f2043d1 Scale bitmap shaders for target density
am: 0d2a46b733

Change-Id: I8e3274a9c6047d943336827e7e0c8563e40c2ca5
2016-10-07 20:39:48 +00:00
TreeHugger Robot
67c70a263c Merge "Updates documentation for MessagingStyle constructor" into nyc-mr1-dev 2016-10-07 20:34:50 +00:00
TreeHugger Robot
0f6cec369f Merge "Scale bitmap shaders for target density" into nyc-mr1-dev 2016-10-07 20:31:01 +00:00
Alan Viverette
0d2a46b733 Scale bitmap shaders for target density
Also fixes progress bar sample tile to reflect density and ensures
that ProgressBar.tileify() clones inner drawables into the correct
density.

Bug: 31841123
Test: BitmapDrawableTest#testPreloadDensity()
Test: ThemeHostTest
Test: Visual inspection of ApiDemos
Change-Id: I9dcb9817d8d91d61ff0215987247e9e7fb089c46
2016-10-07 16:23:32 -04:00
Suprabh Shukla
6222176963 Added minimum supported version in SQLiteOpenHelper
Added a convenience mechanism to delete the whole database if it is of
a version that is so old that the application does not want to support
upgrading it. SQLiteOpenHelper now automatically deletes such a database
and creates a fresh one with the newest version provided. A callback
onBeforeDelete is added if the application wants to collect some data
from the db before it is deleted.

Test: Tested by upgrading contacts database using ContactsDatabaseHelper

Bug: 31559016
Change-Id: I3f924d247cdca2015c4244cc987de2538a086651
2016-10-07 13:23:31 -07:00
Robert Carr
3d2783c82b When adding dialog window but not creating update the configuration. am: d7dbec7e4c
am: 7696b0d06b

Change-Id: I536f02e97cb0969859454fd6250703056bca0b93
2016-10-07 19:29:56 +00:00
Robert Carr
7696b0d06b When adding dialog window but not creating update the configuration.
am: d7dbec7e4c

Change-Id: I137783f64cec9f9134e1c66b123993d65397deb5
2016-10-07 19:21:51 +00:00
Rob Carr
93becf5148 Merge "When adding dialog window but not creating update the configuration." into nyc-mr1-dev 2016-10-07 19:16:02 +00:00
Nancy Zheng
ce2cef46b3 Fix race condition in checkPattern and verifyPattern.
am: 9475460e66

Change-Id: I88a9304c1f7d23b70cb23988112fc6c34db51338
2016-10-07 18:00:24 +00:00
Nancy Zheng
1e746a415d Merge "Fix race condition in checkPattern and verifyPattern." into cw-f-dev 2016-10-07 17:47:47 +00:00
Nancy Zheng
9475460e66 Fix race condition in checkPattern and verifyPattern.
Bug: 31939282
Change-Id: I3250ab900f190ca9c820ac355ce94a699315b137
2016-10-07 10:41:00 -07:00
Alex Hills
fd590441c1 Updates documentation for MessagingStyle constructor
MessagingStyle expects the field userReplyName to be non-null, but the
documentation doesn't describe it as such. This updates the documentation
to say the field is required, and adds a NonNull annotation.

This has no behavior changes.

BUG:31747744
Change-Id: If832d059c276e856fba366dabfa8a5821bb63054
2016-10-07 15:44:23 +00:00
Jorim Jaggi
ed3032b6b8 Unlock latency improvements
- Make sure the latency also gets tracked on first unlocked in
which we cancel the AsyncTask.
- Also add it for pattern authentication

Change-Id: Ie1561264b0a3b75c09819ccc6d269e61e367e1be
2016-10-07 17:26:59 +02:00
Jakub Pawlowski
00be0387cc Merge "Fix connecting to profiles when bonding from local device (1/3)" am: 44c013d739 am: 6fe3900791 am: 56757a44a6
am: 4984d66b6a

Change-Id: I4b78ff54941ada956d4330a6192d0f1c279d953c
2016-10-07 15:11:55 +00:00
Dimitry Ivanov
629ad7e37e Merge "Relax namespace restriction on system server classloader" am: a8135325c1 am: 3c6b4961cb
am: 097ff24545

Change-Id: I9fcc4eeb399da4bdfef2a415e175f2a59f332c84
2016-10-07 09:00:19 +00:00
Dimitry Ivanov
097ff24545 Merge "Relax namespace restriction on system server classloader" am: a8135325c1
am: 3c6b4961cb

Change-Id: I60ab1b74e82a11da485e30a7ea5e45e49c5498c9
2016-10-07 08:53:06 +00:00
Dimitry Ivanov
3c6b4961cb Merge "Relax namespace restriction on system server classloader"
am: a8135325c1

Change-Id: Ie6b5e9041c1a03a8a6b2343069ef2a37b9aba9aa
2016-10-07 08:45:18 +00:00
Dimitry Ivanov
a8135325c1 Merge "Relax namespace restriction on system server classloader" 2016-10-07 08:34:41 +00:00
Hugo Benichi
7720c01fcf Reject DHCP packets with no magic cookie am: 006e061301
am: 1ade34dd76

Change-Id: Idc93ed44260f9e2dd3343dda57b790d3efa87a18
2016-10-07 02:36:53 +00:00
Hugo Benichi
1ade34dd76 Reject DHCP packets with no magic cookie
am: 006e061301

Change-Id: I54a32519d13e8d5463ca86630540722d73ff75cb
2016-10-07 02:29:49 +00:00
Hugo Benichi
ea2f7a4f05 Merge "Reject DHCP packets with no magic cookie" into nyc-mr1-dev 2016-10-07 02:22:35 +00:00
Christopher Tate
44cf2b869a Explicitly close FD binder parameters in backup/restore API calls am: 91bb0e5cca am: 3fa99a6d11
am: 79a3ee5a98

Change-Id: Idc4ae96cf8237bd6439604476d7f5e7887cb8655
2016-10-07 00:56:11 +00:00
Hugo Benichi
9f713864ca Catch runtime exceptions when parsing DHCP packets am: e0ea7fecd6
am: c4a13afe92

Change-Id: I53cb258a3b04f2bd8b31e15794b2fcd3ae295ce6
2016-10-06 21:45:08 +00:00
Dianne Hackborn
a89e1ec692 Fix issue #31305336: File corrupt: too many wake locks 101 am: cb99a72e62
am: 50b9f3513c

Change-Id: Idfc3a5413248ac0b74f88d21a9f1f4f642b3f73c
2016-10-06 21:27:35 +00:00
Jakub Pawlowski
4984d66b6a Merge "Fix connecting to profiles when bonding from local device (1/3)" am: 44c013d739 am: 6fe3900791
am: 56757a44a6

Change-Id: I3bdacc816923d012f061e5310d5e076fcaf9d387
2016-10-06 21:12:06 +00:00
Hugo Benichi
c4a13afe92 Catch runtime exceptions when parsing DHCP packets
am: e0ea7fecd6

Change-Id: I1e701bb19b5c062f1527dd3e5b79e2e7860ca025
2016-10-06 21:11:47 +00:00
Jakub Pawlowski
56757a44a6 Merge "Fix connecting to profiles when bonding from local device (1/3)" am: 44c013d739
am: 6fe3900791

Change-Id: I8e04aa89379c4a50031fade065c288fd1cc30668
2016-10-06 21:07:44 +00:00