2335 Commits

Author SHA1 Message Date
Charlie Tsai
f7fe5a7ff8 Fixed Intent parsing error of PreferenceScreen
When PreferenceScreen contains the Intent tag with
the extra tag, the parsing of xml file is failed and
causes the render problem on Layout editor.

Test: N/A
Bug: http://b.android.com/233302

Change-Id: I987de7aa125299d46fc1b7670f07f3dd4427ee21
2017-04-04 02:15:38 +01:00
Dianne Hackborn
cc88ddd7ea Merge "Implement issue #36590595: Add ability to associated a ClipData with JobInfo" into oc-dev am: 2d161b1d3f
am: 666fe849e3

Change-Id: I61afc96a01bc8bc5d637d65a3f9a84452babd3ed
2017-03-31 23:44:42 +00:00
Winson Chung
c0e2621910 Merge "Ensure we show the PiP menu in response to KEYCODE_WINDOW." into oc-dev am: 2af994ec03
am: da7ef8060d

Change-Id: I715e2e79b729d28b856a8eda42b099db56cb0184
2017-03-31 23:27:58 +00:00
TreeHugger Robot
2d161b1d3f Merge "Implement issue #36590595: Add ability to associated a ClipData with JobInfo" into oc-dev 2017-03-31 23:21:11 +00:00
Winson Chung
ac52f2892d Ensure we show the PiP menu in response to KEYCODE_WINDOW.
Bug: 36687605
Test: android.server.cts.ActivityManagerPinnedStackTests
Test: #testWindowButtonEntersPip
Change-Id: I0bb35fd666eb6a438e4676267f6726b44bffb3db
2017-03-31 10:42:53 -07:00
Dianne Hackborn
a47223f99b Implement issue #36590595: Add ability to associated a ClipData with JobInfo
Yum!

Also needed to have a Context.revokeUriPermission() variant that is sane,
so reasonable CTS tests can be written.

Test: new ClipDataJobTest added.

Change-Id: Ia3135ea788a6e32c971bae7dab3a844d0ef4139c
2017-03-31 10:41:50 -07:00
Christopher Tate
08992ac57e API refactor: context.startForegroundService()
Rather than require an a-priori Notification be supplied in order to
start a service directly into the foreground state, we adopt a two-stage
compound operation for undertaking ongoing service work even from a
background execution state.  Context#startForegroundService() is not
subject to background restrictions, with the requirement that the
service formally enter the foreground state via startForeground() within
5 seconds.  If the service does not do so, it is stopped by the OS and
the app is blamed with a service ANR.

We also introduce a new flavor of PendingIntent that starts a service
into this two-stage "promises to call startForeground()" sequence, so
that deferred and second-party launches can take advantage of it.

Bug 36130212
Test: CTS

Change-Id: I96d6b23fcfc27d8fa606827b7d48a093611b2345
(cherry picked from commit 79047c62b58fb0a0ddf28e2b90fe4d17e05bc528)
2017-03-30 18:31:24 +00:00
Chris Tate
a94c58642f Merge "API refactor: context.startForegroundService()" 2017-03-30 18:24:53 +00:00
Diego Perez
0677ce27b6 Fix fonts following 455f1bfc05
Test: Fixes broken tests
Change-Id: I62d001c6d0ed84fe1d1d9865b1027be0e1cad8b4
(cherry picked from commit de5a95d42c9e5f4fbcf0064ae8eaa33ab5747637)
2017-03-30 15:35:09 +00:00
Diego Perez
1a67992704 Merge "Handle the case where no session exists" into oc-dev am: 261dd2305a
am: cd190037af

Change-Id: Ic5271f342f90b5b4d5057bffe38def7a4a107b96
2017-03-30 13:34:57 +00:00
TreeHugger Robot
261dd2305a Merge "Handle the case where no session exists" into oc-dev 2017-03-30 13:27:00 +00:00
Diego Perez
0d895396f2 Merge "Make layoutlib more lenient with recoverable errors" into oc-dev am: 3134462c5e
am: 510916c13f

Change-Id: I3c02fde71a2fc7b955b9ad124fe81eccf5a983a3
2017-03-30 13:21:51 +00:00
Diego Perez
a55b3ba642 Handle the case where no session exists
In some cases, if an error happens, no session will exist in
BridgeRenderSession.

Test: Added small regression test
Change-Id: Ic9be381767626766395c65044542c197ed7649e7
2017-03-30 12:21:07 +01:00
Diego Perez
d88c717b4e Make layoutlib more lenient with recoverable errors
In many cases, throwing an exception will stop the inflation or
rendering of a layout. Sometimes, we could recover from some of the
failures and render a layout that is "usable".
I've done a first pass trying to follow the following rules:
 - Try simple recoveries by choosing sensible defaults. Not trying
 complex recoveries.
 - Only recover if the exception is not part of the class behaviour.
 Avoided removing declared exceptions or exceptions that are expected by
 the framework.
 - I've kept assertions in place so, in most cases, the behaviour will
 be almost identical to the previous one with assertions enabled.

Test: Checked with existing tests
Change-Id: I0001fdd3c808cf405c4eb8d734b9bbe63493e05c
2017-03-30 12:07:28 +01:00
Christopher Tate
79047c62b5 API refactor: context.startForegroundService()
Rather than require an a-priori Notification be supplied in order to
start a service directly into the foreground state, we adopt a two-stage
compound operation for undertaking ongoing service work even from a
background execution state.  Context#startForegroundService() is not
subject to background restrictions, with the requirement that the
service formally enter the foreground state via startForeground() within
5 seconds.  If the service does not do so, it is stopped by the OS and
the app is blamed with a service ANR.

We also introduce a new flavor of PendingIntent that starts a service
into this two-stage "promises to call startForeground()" sequence, so
that deferred and second-party launches can take advantage of it.

Bug 36130212
Test: CTS

Change-Id: I96d6b23fcfc27d8fa606827b7d48a093611b2345
2017-03-29 13:12:09 -07:00
TreeHugger Robot
19f710b8a2 Merge "Fix warnings in Bridge" 2017-03-29 15:22:46 +00:00
Diego Perez
ab53e46aae Fix warnings in Bridge
Test: N/A
Change-Id: I7ce6c1d78ad02c410eb3c01f29f95aaf9e2417e4
2017-03-29 14:41:18 +01:00
Diego Perez
d3549d5c87 Merge "Add audio service support to BridgeContext" into oc-dev am: 92b3242827
am: c95297654f

Change-Id: Ic9359116c9746565fdecf8b542b22647ea1044b8
2017-03-29 13:35:49 +00:00
Diego Perez
de5a95d42c Fix fonts following 455f1bfc05
Test: Fixes broken tests
Change-Id: I62d001c6d0ed84fe1d1d9865b1027be0e1cad8b4
2017-03-29 12:29:58 +01:00
Diego Perez
31f7d6f535 Add audio service support to BridgeContext
Bug: http://b.android.com/259326
Test: N/A
Change-Id: Ie43ccca49a5e77d82426b4f265e3c05dddfacad9
2017-03-29 12:03:58 +01:00
Chad Brubaker
336ae5b616 Add ACTION_EPHEMERAL_RESOLVER_SETTINGS
This Intent will be used in Settings to show the settings UI for the
Ephemeral resolver. Settings can get the correct component to send the
Intent to by calling
PackageManager.getInstantAppResolverSettingsComponent

Bug: 35918998
Test: Boots
Change-Id: I0edcf85704f2c19e0ee27f91b6ef057d52e32778
(cherry picked from commit aa49cb86e6d5f23d82c97db32c848bc4ea2b81bc)
2017-03-28 20:34:55 +00:00
Chad Brubaker
22a5cf6d9b Merge "Add ACTION_EPHEMERAL_RESOLVER_SETTINGS" 2017-03-28 20:33:35 +00:00
Chad Brubaker
aa49cb86e6 Add ACTION_EPHEMERAL_RESOLVER_SETTINGS
This Intent will be used in Settings to show the settings UI for the
Ephemeral resolver. Settings can get the correct component to send the
Intent to by calling
PackageManager.getInstantAppResolverSettingsComponent

Bug: 35918998
Test: Boots
Change-Id: I0edcf85704f2c19e0ee27f91b6ef057d52e32778
2017-03-28 10:25:36 -07:00
TreeHugger Robot
3561b414e3 Merge "Revert "Layoutlib changes to support the new ResourceUrl"" 2017-03-28 12:21:18 +00:00
Diego Perez
e1024bc3f9 Merge "Fix broken perf tests" 2017-03-28 08:48:42 +00:00
TreeHugger Robot
48a153e570 Merge "Fix font golden image using Oracle JDK" 2017-03-27 15:57:21 +00:00
Diego Perez
f1532e36e1 Fix broken perf tests
Do not dispose Bridge on tearDown. The concept of disposing the Bridge
only made sense when we were loading it dynamically. Some classes have
static initializers that will fail after the dispose (like Typeface).

Test: N/A
Change-Id: I9c934432232bda02a4d26425587096fb6dc957b0
2017-03-27 16:49:17 +01:00
Diego Perez
06ed84f7b3 Merge "Handle case where canvas is 0x0 for shadows" 2017-03-27 14:28:56 +00:00
Diego Perez
25cbb6c009 Fix font golden image using Oracle JDK
Test: Fixes test
Change-Id: Ie90d55ee73d6342524ba2b8b267d190cb5218fc8
2017-03-27 14:20:31 +01:00
TreeHugger Robot
42a872ac4a Merge "Updating font test after the TextView fix" 2017-03-27 11:13:01 +00:00
Diego Perez
ef74ede008 Handle case where canvas is 0x0 for shadows
Test: N/A
Change-Id: Ie837fb4097d7e1e47e8f96c73bb79ac8e7772a6b
2017-03-24 19:06:05 +00:00
Diego Perez
f170175402 Updating font test after the TextView fix
Test: Updated
Change-Id: Ia427cc25936b7a6aed035a4068d53151c74e839d
2017-03-24 14:55:38 +00:00
Diego Perez
a4e82144b2 Revert "Layoutlib changes to support the new ResourceUrl"
This reverts commit 9fb4d6876a78fb336cb3650aca84bce723f96ecb.

Test: N/A
Change-Id: I57a09c6f011b8d8c9c2d054b03536e0a6fcc5688
2017-03-24 11:27:05 +00:00
Diego Perez
d7437d649e Dispose font cache on bridge.dispose
Test: N/A
Change-Id: I81404740835814a018bfd70cf70b5c22933f19f5
2017-03-24 11:10:38 +00:00
Diego Perez
b4e6b5a719 Merge "Layoutlib changes to support the new ResourceUrl" 2017-03-23 10:06:44 +00:00
Jerome Gaillard
f7a594358e Update FontFamily_Delegate following Change Ia23ee6a7
Test: layoutlib tests
Change-Id: I8815060f9bab65f913a0272e439f6c86a63acbcf
2017-03-22 16:55:04 +00:00
Diego Perez
9fb4d6876a Layoutlib changes to support the new ResourceUrl
Updates the resource handling after the changes to the ResourceUrl API
changes.

Test: Existing tests should pass
Change-Id: I314a20673cf94e4ef27e9712d3fa7b6f69bba796
2017-03-22 14:16:53 +00:00
Diego Perez
ba152c09d3 Fix build following change 0763650
Test: N/A
Change-Id: Ie376cb34f0a6ea1f33fab3871abb9db43c5fcf62
2017-03-21 11:48:46 +00:00
Charlie Tsai
3ccd67dc9c Merge "Replace rectangle shadow algorithm" 2017-03-19 01:18:39 +00:00
Charlie Tsai
e18bf49be6 Replace rectangle shadow algorithm
Test: Rectangle Shadow test
Change-Id: Id9635df8769e85d835dc6f99201b86e5bba110d2
2017-03-18 21:34:00 +00:00
Diego Perez
37ecda0eba Merge "Fix BitmapShader to work with adaptive icons" 2017-03-17 18:01:30 +00:00
Jerome Gaillard
3ce947f482 Merge "Update ColorFilter_Delegate following Change I5f74addd" 2017-03-17 16:29:36 +00:00
Andrii Kulian
c1b59ed73e Merge "Separate global and override config sent to client" 2017-03-17 15:39:37 +00:00
Diego Perez
f4291b03cc Fix BitmapShader to work with adaptive icons
Test: Existing test should pass
Change-Id: Ie4c78eab4dfacf1eb6060d71edb98b836c4eff78
2017-03-17 15:09:00 +00:00
Jerome Gaillard
5aa62827ca Update ColorFilter_Delegate following Change I5f74addd
Test: layoutlib tests
Change-Id: Ifb18946edb0c40e0120868e211c99a304801e740
2017-03-17 12:15:36 +00:00
Andrii Kulian
446079600e Separate global and override config sent to client
There is some flakiness in View#onConfigurationChanged callback -
if ViewRootImpl receives config update earlier than ActivityThread,
it may not detect the configuration change and skip inner updates.
Also now ViewRootImpl assumes that it receives the global config as
a param, but instead it gets merged config from WM. This means that
ViewRootImpl#sConfigCallbacks was sending incorrect values to the
recipients.

This CL switches to sending global and override configuration to the
client separately. Also in case if there is a corresponding activity,
it first updates it and waits for update callback to ViewRootImpl.
This way global config and override config for activity will always
be set first and resources will be updated before inner state of
ViewRootImpl is updated.

Bug: 35870157
Bug: 34164473
Test: android.server.cts.ActivityManagerDisplayTests
Test: testOnMovedToDisplayCallback
Change-Id: Ic9e7541cf25ecfac6ec90e48f7efb0ece91f657e
2017-03-16 19:13:02 -07:00
Jerome Gaillard
95f36e23c3 Update layoutlib following Changes I2500bd4c and If456266f
Test: layoutlib tests
Change-Id: Idd3993bdc4010fa80a8c78ad80998bc7586322a5
2017-03-16 12:42:37 +00:00
Rob Carr
287452cf40 Merge "Delete some SurfaceView support code." 2017-03-16 05:07:10 +00:00
Robert Carr
d0a2cd3061 Delete some SurfaceView support code.
repositionChild, performDeferredDestroy, and SurfaceControl with
background were all only used by SurfaceView and are now no longer
required in the wm.

Test: Only red.
Change-Id: Icb773572e6d6202f78a6d23b2431fbfacbe272c6
2017-03-15 14:40:20 -07:00
TreeHugger Robot
5fff20cac1 Merge "Clean up public FontConfig APIs" 2017-03-15 18:52:04 +00:00