2103 Commits

Author SHA1 Message Date
Alan Viverette
5398aec700 am a929b2d4: Merge "Set starting value on ripple exit animation" into lmp-preview-dev
* commit 'a929b2d49386cfb3cdf4e0eaecca61184fa0c857':
  Set starting value on ripple exit animation
2014-06-04 18:09:52 +00:00
Alan Viverette
d9ec3dafa0 am b1c7f7f5: Merge "Fix NPE when ripples are canceled due to visibility change" into lmp-preview-dev
* commit 'b1c7f7f538e8c4947f75406cc6089f6680f59a31':
  Fix NPE when ripples are canceled due to visibility change
2014-06-04 18:08:22 +00:00
Florin Malita
676f92e9a7 Merge "Canvas JNI cleanup." 2014-06-04 16:04:45 +00:00
Florin Malita
95d49149cc Canvas JNI cleanup.
As pointed out in a previous patch review, some native Canvas methods do not
receive a native canvas handle and instead have to use GraphicsJNI to query
the object mNativeCanvasWrapper field.

To avoid the extra JNI call, this change adds the missing Java wrapper
methods and ensures that all native calls are passed efficient native
handles.

Also, some native methods are consolidated: save, saveAll -> save,
clipRect* -> clipRect.

Change-Id: I2eae4a633f6a463d9fbae2ca632661acc8b5cfc3
2014-06-04 11:09:18 -04:00
Leon Scroggins III
a578ab00c4 Merge "Ignore inPurgeable and inInputShareable." 2014-06-04 14:04:18 +00:00
Raph Levien
854363e3d2 Fix incorrect getStringBounds (Minikin)
This patch wires up getStringBounds to do the layout with Minikin to get
accurate bounds, and with the correct typeface. It fixes bug 15416575
"getStringBounds gives wrong result in Minikin".

Change-Id: I5c020bc372acb1d785a33c3c296239c151bd8c87
2014-06-03 21:11:06 -07:00
Raph Levien
38bd7b9c4d Merge "Better Minikin integration" into lmp-preview-dev 2014-06-04 00:46:25 +00:00
Raph Levien
f2114d5646 Better Minikin integration
This patch improves the Minikin integration in a number of ways,
including:

Software rendering does text decorations and handles alignment
correctly. This fixes bug 15139067 "Centered text isn't working".

Paint implements getTextPath. This fixes bug 15143354 "Text rendering in
Maps Navigation wrong typeface?"

Also a bit of refactoring, since there was duplicated code for iterating
font runs that's now a static method in MinikinUtils.

Change-Id: I4cfdb2c0559982376348325a757d95235fab1768
2014-06-03 17:44:35 -07:00
Alan Viverette
bb938107b7 Merge "Temporary drawable for Quantum progress indicator" into lmp-preview-dev 2014-06-04 00:00:14 +00:00
Alan Viverette
3567140b04 Temporary drawable for Quantum progress indicator
Also cleans up unused 20dp spinner drawables.

Change-Id: I69aba84eca9f9e8d44a4237d894015caeb3d2308
2014-06-03 16:02:26 -07:00
Alan Viverette
a48e7b5500 Merge "Fix build, fix Drawable loop" into lmp-preview-dev 2014-06-03 22:49:33 +00:00
Alan Viverette
55a54e17df Merge "Update theme colors, fix EditText state transition" into lmp-preview-dev 2014-06-03 22:49:33 +00:00
Alan Viverette
bd4d1c31f3 Merge "Set starting value on ripple exit animation" into lmp-preview-dev 2014-06-03 22:49:33 +00:00
Alan Viverette
910a0b4d02 Fix build, fix Drawable loop
Change-Id: I524b7f40c700ebe601fdbe80644a46e90ab2bba0
2014-06-03 15:48:30 -07:00
Alan Viverette
dcf7b59f84 Update theme colors, fix EditText state transition
BUG: 11218747
BUG: 15200201
Change-Id: I94368897ea9466ae971b25fc80d6ca43433aadd5
2014-06-03 14:43:38 -07:00
ztenghui
a8cb975aa7 Merge "Handle the alpha in the group setting and fix the fill issue." 2014-06-03 18:07:31 +00:00
Leon Scroggins III
0aa39dc2dc Ignore inPurgeable and inInputShareable.
These are discouraged anyway, due to the fact that using them may
result in decoding on the UI thread. Now that they are ignored, the
images will still be decoded; they just will never have their
memory purged, meaning there could be a RAM penalty. This is
acceptable, since apps are encouraged to instead use inBitmap to
manage bitmap memory.

This incidentally fixes BUG:15390468 by converting purgeable index8
(e.g. gif) images to non purgeable.

Change-Id: Ieaf3ab25d28d93fb94bdaea1eb3bd762f163b09a
2014-06-03 14:05:58 -04:00
ztenghui
2af745b56c Handle the alpha in the group setting and fix the fill issue.
The fill used to be dafault as "none".
Now it is default to opaque black, which is consistent with svg now.
So it is better to always set the fill value.

bug:15288554

Change-Id: I07ac41c5adc77665e66e52f2c0220139586fb09b
2014-06-03 10:54:14 -07:00
Alan Viverette
02a078d088 am 25931ade: Merge "Clean up drawable theming APIs" into lmp-preview-dev
* commit '25931adee5ba954220190f48901bb66c8c9dd462':
  Clean up drawable theming APIs
2014-06-03 17:16:27 +00:00
Raph Levien
690d45157d am faa91203: Merge "Support fallbacks for custom typefaces (Minikin)" into lmp-preview-dev
* commit 'faa912037ca4895eb99155a4a53354435ee413c2':
  Support fallbacks for custom typefaces (Minikin)
2014-06-03 17:15:56 +00:00
Alan Viverette
7a98f74438 Fix NPE when ripples are canceled due to visibility change
BUG: 15406248
Change-Id: I63ce42fef8e1614372ee4a82e45eb15e8bbe1fe3
2014-06-03 10:13:22 -07:00
ztenghui
5e9a42588e Merge "Add the tree hierarchy for the group" 2014-06-03 16:03:37 +00:00
Alan Viverette
840ff80962 Set starting value on ripple exit animation
Change-Id: I2eca91c02ea059591a2ee0c75c5355f0ecd5a4be
2014-06-02 18:01:38 -07:00
ztenghui
4d24caf1de Add the tree hierarchy for the group
bug:15288554

Change-Id: I7caedb8466d078a0d9a6148e00d02eded4a4d234
2014-06-02 17:18:10 -07:00
Alan Viverette
5a4af17e27 Merge "Clean up drawable theming APIs" into lmp-preview-dev 2014-06-02 23:41:59 +00:00
Alan Viverette
6dbe51b50e Clean up drawable theming APIs
Removes APIs for themed creation of a drawable from a stream, since
that doesn't involve any inflation. Also cleans up tinting methods
left over from previous clean up.

BUG: 15089957
Change-Id: I2af7aa9a6d351ae61b33ee1216c674fae1bffe11
Signed-off-by: Alan Viverette <alanv@google.com>
2014-06-02 16:39:04 -07:00
Raph Levien
596f0b1a03 Merge "Support fallbacks for custom typefaces (Minikin)" into lmp-preview-dev 2014-06-02 22:54:58 +00:00
Raph Levien
d573794d83 Support fallbacks for custom typefaces (Minikin)
This patch adds the fallback font list to custom typefaces created from
files and assets, as well as those created by name. This is a fix for
the deskclock half of bug 15139067 "Centered text isn't working".

Change-Id: I0cc60951953dfb73817a98ddfee5713f0387ee90
2014-06-02 10:56:23 -07:00
Alan Viverette
57f285d3ab am 73d37038: Merge "Fix null paint in GradientDrawable, make default values explicit" into lmp-preview-dev
* commit '73d370389338b97f801631182bd9a650b42f9a1b':
  Fix null paint in GradientDrawable, make default values explicit
2014-06-02 17:45:04 +00:00
Alan Viverette
08847c8344 Merge "Fix null paint in GradientDrawable, make default values explicit" into lmp-preview-dev 2014-06-02 17:36:50 +00:00
Florin Malita
9ec2eabe5a Merge "Add a native Canvas wrapper." 2014-06-02 13:37:11 +00:00
Alan Viverette
71b2fbde56 Fix null paint in GradientDrawable, make default values explicit
BUG: 15237001
Change-Id: I80844919b910163ed986257efb4b6f8fb62eaf6a
2014-06-01 18:03:09 -07:00
Alan Viverette
52a557fae5 am cc179e25: Merge "Allow ripple bounds to change during enter animation" into lmp-preview-dev
* commit 'cc179e25ccab51cddd16bd3be064590a4c5bb58b':
  Allow ripple bounds to change during enter animation
2014-06-02 00:36:59 +00:00
Alan Viverette
dc6046fca3 Allow ripple bounds to change during enter animation
BUG: 15315168
Change-Id: I7588be96648318473998cfd5deba678224f1db51
2014-06-01 16:48:31 -07:00
Alan Viverette
6a407b0d48 am 8709eeb9: Merge "Fix padding for GradientDrawable" into lmp-preview-dev
* commit '8709eeb9ed08a70550b308e4e79cadf884e2e2d3':
  Fix padding for GradientDrawable
2014-06-01 23:45:51 +00:00
Alan Viverette
c65c7ae635 Merge commit '6682183b' into manualmerge
Conflicts:
	core/res/res/values/public.xml

Change-Id: Ic91db6ee85dcd8a6b13716b600b04c78ceac4b33
2014-06-01 16:44:28 -07:00
Alan Viverette
c6c967b68a Merge "Fix padding for GradientDrawable" into lmp-preview-dev 2014-06-01 23:23:51 +00:00
Alan Viverette
982c59a55f Fix padding for GradientDrawable
BUG: 15197745
Change-Id: Ibd1c20dd8ba8c7ffbf65031be4ca9813304d4d0f
2014-06-01 16:11:32 -07:00
Alan Viverette
4d2f2483f6 Fixes hotspot list transitions, update to use a single hotspot
Also updates background and button colors to match spec, removes
dependency on bouncycastle Arrays. Vastly simplifies ripple drawing.
Adds APIs for maximum ripple radius. Makes selectableItemBackground
bounded by default and adds an unbounded version and theme attribute.

BUG: 15315168
BUG: 15314684
BUG: 15314830
BUG: 15316768
BUG: 15333033
BUG: 15344050
Change-Id: Ib0619587ce78e43056b66571bae185e0f1613185
2014-06-01 15:58:04 -07:00
Florin Malita
5c3d927e17 Add a native Canvas wrapper.
Instead of storing a direct SkCanvas reference, Canvas now tracks
an opaque native wrapper class. The native wrapper can be used to
store additional info for emulating deprecated Skia features
(at this point it only stores a canvas).

Some notes:

* all native handle -> SkCanvas conversions are routed through a
  handful of native utility methods.
* safeCanvasSwap() refactored as a lower level setNativeBitmp() - which
  is what clients need.
* removed unused get_thread_msec() (Canvas.cpp)

Change-Id: I715a5a6f1e1621c1cfc1e510ae4f2ea15cf11114
2014-05-30 16:11:04 -04:00
Raph Levien
ca672f2758 am 953fe800: Merge "Language and variant selection for Minikin" into lmp-preview-dev
* commit '953fe800caf1771217ff1e828d6aa93fbc16729c':
  Language and variant selection for Minikin
2014-05-29 22:38:34 +00:00
Raph Levien
f9e3d31127 Language and variant selection for Minikin
This is the frameworks/base side of what's needed to support language
selection (especially Han unification, but also compact/elegant
selection for scripts that require more vertical space).

This is part of the fix for bug 15179652 "Japanese font isn't shown on
LMP".

Change-Id: I8f0f3aa9a1915659f8d0b590cf1c56529356049a
2014-05-29 14:21:24 -07:00
ztenghui
c9ad54e8ec Merge "Add translation and scale to the group tag and related tests." 2014-05-28 21:59:42 +00:00
ztenghui
452f6ece7f Add translation and scale to the group tag and related tests.
bug:15288554

Change-Id: Iebe176d0a9c2c566d1910674a068e65e15569829
2014-05-28 13:22:44 -07:00
Derek Sollenberger
0d181540e0 Cleanup Canvas API by deprecating a few methods.
The clipRegion(Region) API exposed a different semantic than all other clip APIs by not
respecting the current matrix. The same behavior can be achieved by calling clipRect(Rect)
on the Rects within a Region.

bug: 14650725
Change-Id: I7e91813b8e2474f327e070e549fa303d66f8b552
2014-05-28 14:26:06 -04:00
ztenghui
63cfd85bcc Move the rotation information from path to group.
Also update the 3rd test to correctly testing clipping.

Removing some naive tests which rotate 360 or 0.

bug:15288554

Change-Id: I436e8e494cb78fc665a3890171a1af87367db419
2014-05-28 09:31:19 -07:00
Deepanshu Gupta
baef8c1ffe Layoutlib fixes for L [DO NOT MERGE]
This adds the new delegates that were missing. This starts the work on
changes related to Minikin Fonts.

There are some changes related to TypedArray that still need to be
fixed.

Change-Id: Ic2397b64aa3f1f48926e849b14689c47d9ee7f8c
(cherry picked from commit 7ca3612094270183243938e79337c84effea7ad0)
2014-05-27 18:01:34 -07:00
Deepanshu Gupta
b00cb8b8c7 Merge "Layoutlib fixes for L" 2014-05-27 21:18:04 +00:00
ztenghui
bd67759a3d Merge "Bring the group tag back to VectorDrawable." 2014-05-27 20:08:23 +00:00
ztenghui
6d9c422de5 Bring the group tag back to VectorDrawable.
This is the first step, including:
1. Bring the group tag back by reverting.
2. If there is no group tag, then treat all the paths as a single group.
Make sure our test cases covering both cases.

At the same time, fix one tiny UI bug in the test.

TODO:
1. Move the rotation to the group tag.
2. Add translation/scale to the group tag.
3. Convert the group into a tree hierarchy.

This reverts commit 404211630ba3bb865109434aba4433e7541b39d3.

Conflicts:
	graphics/java/android/graphics/drawable/VectorDrawable.java

Change-Id: Ife65bb6a7fc85f9947124b8e356cd5b82119796a
2014-05-27 10:15:52 -07:00