2822 Commits

Author SHA1 Message Date
Alan Viverette
79936ddda4 Merge "Add consistent @NonNull annotations for drawable callbacks" into nyc-dev 2016-03-11 18:42:43 +00:00
Tenghui Zhu
335875bb48 Merge "Add the missing overriden API" into nyc-dev 2016-03-11 17:36:00 +00:00
Alan Viverette
5291a95715 Invalidate DrawableContainer's cached canConstantState on child add
Bug: 27553319
Change-Id: I625234baea8a992900935f562f9b767c85e527fd
2016-03-11 10:09:44 -05:00
Alan Viverette
f6d87ec193 Add consistent @NonNull annotations for drawable callbacks
Bug: 27599515
Change-Id: I33fdc5392302403bfff9cc74a8226173ec962af6
2016-03-11 10:09:14 -05:00
Derek Sollenberger
51e7805f14 Remove all non-porterduff xfermodes from the public API
bug: 14650725
Change-Id: I3c935c32849be8762281eb3d1c86481be3fa139f
2016-03-11 09:10:27 -05:00
Alan Viverette
24bf21b894 Ensure Outline consistently sets the radius to be undefined
Radius should only be defined when the rect is also defined. Also updates
ArcShape to not return an outline, since it may be convex.

Bug: 27593976
Bug: 27592381
Change-Id: I99010b139361607af6ec8cab26c9aa1d4dcbba77
2016-03-10 15:52:00 -05:00
Teng-Hui Zhu
1af03b1d53 Add the missing overriden API
This is exposed by the CTS test.

Change-Id: Ic25fda1567d8c8504612d4e825dbb646f7db1076
2016-03-09 15:38:55 -08:00
Makoto Onuki
4a07c34ca8 Merge "ShortcutManager: add remaining APIs." into nyc-dev 2016-03-09 22:28:45 +00:00
Alan Viverette
0dda14c671 Merge "Add missing annotations, getters to GradientDrawable" into nyc-dev 2016-03-09 19:22:34 +00:00
Alan Viverette
5f63721a6c Add missing annotations, getters to GradientDrawable
Fixes getColor() NPE when colors array is null.

Bug: 27543512
Change-Id: Ieec8a2315d0a2e4ab0ddbe053bccdd8c43080857
2016-03-09 13:30:35 -05:00
Tenghui Zhu
35d44ba439 Merge "Update the VD and AVD's getOpacity()" into nyc-dev 2016-03-09 18:07:43 +00:00
Makoto Onuki
5504622fb0 ShortcutManager: add remaining APIs.
- Icons are now persisted. (under /data/system_ce, as PNGs)
- the "load icon" APIs in LauncherApps are supported.
- Implement updateShortcuts()

- Addressed all the comments on the previous CL
- @hide the newly added constructor for PersistableBundle

- Enhance incoming shortcut validation
- A lot of internal clean-up.

Bug 27548047

Change-Id: I8e3c1ccd3e0a997a6d271c84d81170f0c022b60e
2016-03-08 18:37:32 -08:00
Teng-Hui Zhu
f10d08a3d4 Update the VD and AVD's getOpacity()
static VectorDrawable should be returning Transparent while root alpha is 0.
AnimatedVectorDrawable running on RenderThread now, and the opacity should
be conservatively set as Translucent.

http://b/27554766

Change-Id: I9a78696cab94f10ba40a733cc9c00f1c2d7ebb7f
2016-03-08 15:54:50 -08:00
Doris Liu
44027214d4 Handle multiple animation actions within one frame
Bug: 27438778
Change-Id: I1b14da4bc7b4e82e5b4e45f3eb9ad04e3d7842c4
2016-03-01 18:09:21 -08:00
Andreas Gampe
f6765f3965 Frameworks/base: Refactor Paint & Canvas native allocation support
Put the native allocation support into a holder class. This allows
statically initializing the classes in the boot image.

Bug: 27265238
Bug: 23130675
Change-Id: I857aebfdbaec39067a5eb58afceb49630176af98
2016-02-29 10:49:01 -08:00
Alan Viverette
2d3ca47ef8 Always update drawable container source res
Bug: 27349209
Change-Id: I3bb3d4862a03fd5ce0beeb2bf5208f2917ec9320
2016-02-25 12:27:02 -05:00
Doris Liu
3005843506 Merge "Support running AVD on UI thread" into nyc-dev 2016-02-23 22:43:53 +00:00
Doris Liu
28cfd20f02 Support running AVD on UI thread
By default, AVD animates on RT thread. But since in some cases there's a
need for a finer control on when the frame update for the animation should
happen, such as coordiating the AVD animation with other animations that
run on UI thread, we are providing a way to force the AVD to run on UI
thread.

Bug: 27278616
Change-Id: I372ecd3dc52e3fa0bdce3a1e9c19443f9b199027
2016-02-23 14:40:47 -08:00
Alan Viverette
921ec44647 Fix NinePatchDrawable handling of density changes
Scaling is now manually applied when the canvas density is not set.

Removes set/getNinePatch accessors that were added in N, since these
are not used and setting the nine patch directly will break padding.
Also removes local NinePatch, which was not necessary.

Bug: 27038114
Change-Id: Ie8b2e485b54d1ed1521081b329a09915fd0a95c1
2016-02-23 14:54:01 -05:00
Doris Liu
c21e8bcb01 Ensure invalidate is called after start()/reverse()
Change-Id: Iec96ada74cc7b845e21b5f0eb208ff7c7b1071ed
2016-02-19 14:35:55 -08:00
Doris Liu
8b083206ae Revert "Revert "Check RenderNode's owning view before attaching animators""
This reverts commit eb40178af3b7c8d925eaf6c1aa0bef739c8ea47e.

Change-Id: I6838ecb35b50847746ee66ac204f14eb5f579b91
2016-02-19 13:52:41 -08:00
Doris Liu
c4bb185d41 VectorDrawable native rendering - Step 5 of MANY
This is reverting the revert of what reverts the revert of the original
implementation. Fourth revert is a charm!

This reverts commit df7fdb1e0bdb5c289bbc08047e5c710185503309.

Change-Id: I6fc3a5accfd8b79c3da31bbc101ad9e9b4d6e7dd
2016-02-19 13:51:31 -08:00
Doris Liu
5b7188aebc Merge "Revert "Revert "Revert "VectorDrawable native rendering - Step 5 of MANY"""" into nyc-dev 2016-02-18 19:06:20 +00:00
Doris Liu
b9fb8fdf78 Merge "Revert "Check RenderNode's owning view before attaching animators"" into nyc-dev 2016-02-18 19:04:28 +00:00
Doris Liu
df7fdb1e0b Revert "Revert "Revert "VectorDrawable native rendering - Step 5 of MANY"""
This reverts commit 0d20a275a5baf8579c8b9111cf2ce6615874a6b6.

Change-Id: I97c782f1164a5d39ab74dc098cca71d9e1b30cd8
2016-02-18 18:37:02 +00:00
Doris Liu
eb40178af3 Revert "Check RenderNode's owning view before attaching animators"
This reverts commit 12abdeb3c7bffbc7c07b913595f6ea2cb66154d1.

Change-Id: I938deddf5f294127f87a0e70f940fe5b9a85e0b2
2016-02-18 18:34:59 +00:00
Doris Liu
e6e57a9d51 Merge "Check RenderNode's owning view before attaching animators" into nyc-dev 2016-02-16 23:38:57 +00:00
Doris Liu
5b49c6f31b Merge "Revert "Revert "VectorDrawable native rendering - Step 5 of MANY""" into nyc-dev 2016-02-16 23:38:43 +00:00
Doris Liu
12abdeb3c7 Check RenderNode's owning view before attaching animators
-Only add animators to a RenderNode when its owning view is attached
-When changing animator's target RenderNode, remove the animator from
 the old target RenderNode that it's currently running on, if any.
Bug: 27141983
Bug: 27145149
Change-Id: I9c9592382d64ecc0390f7ec743a59ce1ad7d9798
2016-02-16 14:25:48 -08:00
George Mount
d86d3fd768 Merge "Set the hover state to the same as focus state in RippleDrawable." into nyc-dev 2016-02-16 15:19:03 +00:00
Doris Liu
0d20a275a5 Revert "Revert "VectorDrawable native rendering - Step 5 of MANY""
This reverts commit e03ef25a3e44ef5d495e366c30b9b5b69fc58194.

Change-Id: I9c2e1c891667451a3ee668e414bf337ad67279ab
2016-02-12 19:49:29 -08:00
Tenghui Zhu
6f1033104d Merge "Fix the CSL theme support inside VectorDrawable's fill and stroke" into nyc-dev 2016-02-12 23:47:27 +00:00
Ben Wagner
fb95699364 Deduplicate font file mappings.
With ttc and gx variation fonts, it is now possible and common that a
number of fonts will use the same font file for data but with different
parameters. In the current code each font will map the font file data,
taking up an unecessary amount of virtual address space and is
inefficient with respect to memory management (like the tlb). This CL
deduplicates these file mappings so that a given font file will only be
mapped into memory once.

DO NOT MERGE
Change-Id: I5ca69f963a434c72ec4028402ecbf9e0f0ee7148
(cherry picked from commit fffcf0a31fd4c9a4ec8aa7de70b1eda0d48fb337)
2016-02-12 19:33:26 +00:00
Teng-Hui Zhu
f7ae8d727b Fix the CSL theme support inside VectorDrawable's fill and stroke
b/26774249

Change-Id: I9a9fcdb0e88c4b46ab86c6b3fd780d40b96024db
(cherry picked from commit 15cc49ae521699b70e3b011768b2ae58a7a9b2fd)
2016-02-12 17:51:20 +00:00
Ben Wagner
a87b07d7fa Add support for gx font variation axes.
This adds an 'axis' child element to the 'font' element. The 'axis'
element has attributes 'tag' (a four byte identifier) and 'stylevalue'
(a float value) to the parser. This also modifies reading the font file
name in a backwards compatible fashion by using only the direct #text
children of the 'font' element. (Both the Minikin and Skia parsers now
allow the font file name on a separate line in the fonts.xml file).

This information is then passed through to Skia in order to select the
desired variation. The Skia parser already parses this way and has for
some time, so Chrome and WebView can already read this format.

Change-Id: I15623fe864fa92b2bf0705af5e389daedfb77e5c
(cherry picked from commit b8e367fb7428076ff2e4aa2a97adaed1ef806e92)
2016-02-12 16:28:35 +00:00
John Reck
e03ef25a3e Revert "VectorDrawable native rendering - Step 5 of MANY"
Bug: 27136799

This reverts commit 18bdf443e371e9f293439b4ff92cc79abaa422e5.

Change-Id: I825b061eec2a591f2d18119ba64494624b9ad4f2
2016-02-11 17:02:33 +00:00
Doris Liu
18bdf443e3 VectorDrawable native rendering - Step 5 of MANY
Implemented reset() (public API for AVD)
and reverse() (internal API that needs to be supported)

Change-Id: Ife1650049f271cad1347943151a5800c40c20aa2
2016-02-11 01:08:47 +00:00
George Mount
e4f976dc3b Set the hover state to the same as focus state in RippleDrawable.
Bug 24810682

There was no hover state for bounded ripples and it was decided
that a solid background color exactly like the focus state
was desired. This change triggers the RippleDrawable to act as
if it is focused when it is hovered.

Change-Id: I94b2a4d03dd4c47fc021c84bb0ba4b4be82f3e95
2016-02-10 07:31:18 -08:00
Jorim Jaggi
7cd1f0d39a Do not invalidate drawable if tint doesn't change
Change-Id: I99d7a679ba3aa4978f2915f1a52f23dbce7fd971
2016-02-09 22:07:32 -08:00
Doris Liu
469a828ac7 Merge "Ref count the nodes in VectorDrawable" 2016-02-05 21:31:24 +00:00
Doris Liu
43a5591c8d Merge "Revert "Revert "VectorDrawable native rendering - Step 4 of MANY""" 2016-02-05 21:31:06 +00:00
Doris Liu
ef062ebd20 Ref count the nodes in VectorDrawable
Also added API check so that for pre-N we ignore invalid VD animation,
in order to avoid breaking old apps.

Bug: 26975469
Bug: 26949340
Change-Id: I498539ad6a05de3d886e7dcdc8a167e78333ab11
2016-02-05 11:12:25 -08:00
Roozbeh Pournader
c9088c5d1b Merge "Various LocaleList cleanups" 2016-02-05 01:38:57 +00:00
Doris Liu
766431aa57 Revert "Revert "VectorDrawable native rendering - Step 4 of MANY""
This reverts commit 5a11e8d0ba21624025b89ac63bbd18befa55be0e.

Change-Id: I7a48b59c4f930dad65ddc8590c25a12636244ea2
2016-02-04 16:29:51 -08:00
Roozbeh Pournader
fee4484637 Various LocaleList cleanups
- Remove the LocaleList#getPrimary() API. It had become confusing
  after locale negotiation was completely implemented. For example,
  it could create the confusion that calling getPrimary() on the
  default locale list would provide the default locale, etc.
- Use the adjusted locale list from LocaleList.getAdjustedDefault()
  in Paints created with no locale list provided.
- Change LocaleList#get() to treat out of bound indexes from both
  negative indexes and too large indexes the same way.

Bug: 26984092
Bug: 26193251
Bug: 26834387
Change-Id: I75f77aea6b75e38793ed8477e5e5a4420d5e6d85
2016-02-04 15:44:03 -08:00
Jorim Jaggi
5bef2fcce8 Merge changes If489d2ba,I1fe12181,Ieb4f586a,Ib51163a0,Ifdfcf3ad, ...
* changes:
  Hide swipe-up gesture behind tuner flag
  When long pressing recents and already docked, undock
  More multi-window fixes
  Use separate flag to suppress resizes
  Only treat "null" bounds as fullscreen
  Exclude stable insets from task config
  Fix bug where surface was not clipped off during resizing
  Fix crash in SysUI when configuration changes
2016-02-04 22:49:52 +00:00
Jorim Jaggi
0a93214198 Exclude stable insets from task config
When a app is in fullscreen, we exclude navigation bar and status bar
size when calculating the config. However, when in multi-window, and
the task was almost fullscreen, the height/width reported to the app
was actually larger than when it was in fullscreen. In order to fix
this, exclude the stable insets when calculating the task
configuration, and also fix a bug when calculating the screen layout.

Change-Id: I843ae012fb3050c79643d125550aacb6e73d27da
2016-02-04 14:36:57 -08:00
Doris Liu
5a11e8d0ba Revert "VectorDrawable native rendering - Step 4 of MANY"
b/26949340 and b/26975469, b/26975079 as well 

This reverts commit f276acd98457bcaabc9e79a17a736b3b484f005e.

Change-Id: I4b55177daf0d289bc03604c71fd4bf579f65073a
2016-02-04 20:59:00 +00:00
Doris Liu
3aaff80f32 Revert "Fix NPE for invalid target exception"
This reverts commit d4fda02dd59adff9553dca5647ebb6c023145d5f.

Change-Id: I73341dc41c7effaa3209107b4e85503b17e2c826
2016-02-04 20:02:52 +00:00
Doris Liu
d4fda02dd5 Fix NPE for invalid target exception
Change-Id: I57b319fae617792351c6ec9872c3b73cd25dc4e5
2016-02-03 11:10:49 -08:00