Drawing empty rects results in IllegalArgumentException on Mac JRE 1.6.
Prevent that by checking the bounds before attempting to draw the rect.
Bug: 20687353
Change-Id: I45f48ee125196480bb6510cc49b24d2122bc3e48
+ Added a session flag that avoids caching mImage. This is useful when
mImage is just a Graphics2D wrapper that might change at any time.
+ Make GcSnapshot aware of the clipping so it doesn't need to render the
whole area if not needed.
Change-Id: Ie0134c2bc2741b5fa6648313864c851bbac066cf
(cherry picked from commit 2c5e85b303077d2120b428bd4c7e6ecb6970935b)
When the theme does not longer exists on the Android Studio side,
getDefaultTheme will return null causing isThemeAppCompat to crash.
Change-Id: I5a5c17126dce72e9872522643219b9438666bc04
- Add another layout including more widgets and thus testing layoutlib
better.
- Update targetSdk Version to 22.
- Handling of dynamic ids (@+id/) in LayoutLibTestCallback is buggy.
Since this is not a problem in Studio, and this is not testing the
callback, work around the issue by declaring the ids in
values/ids.xml.
Change-Id: I457c105e8556c4df13cd86da2250fe5fd37843a8
- RecyclerView now supports XML attributes natively. Thus, remove the
custom support via tools attribute. Users with older versions of
RecyclerView should update.
- Add Context.getPackageName() support used by RecyclerView.
- Update SessionParamsFlags with the new changes and rename it to
RenderParamsFlags.
The attribute behaves slightly different from the original tools
attribute. For usage, see commit 044b5b61e96 in frameworks/support.
Change-Id: I12073e37a2ba411558ca1d3e30c399e3d9a0b144
BridgeResources.getDrawable(int) is not needed anymore, since the super
method is deprecated and it calls the alternative
getDrawable(int, Theme), which we override.
Change-Id: I00c0bfaef6c4167a787bb74990b91cebb951c847
- Change the guava version used to match the one included in the SDK.
The test server uses the same. However, the command line build still
uses the guava present at platform/external/guava, which is compiled
with Java 7. Thus, running the tests from inside the IDE can be done
via Java 6.
- Rebuilt the test app classes with Java 6 compatibility.
- Change similarity threshold to prevent differences due to some locale
settings different java versions.
Change-Id: Ic71d43256a8cf6f9df296e63550667a202c7105f
Better shadows for rectangles and rounded rectangles (includes circles).
The shadow painting code is mostly from CardView library, but modified
heavily since CardView needs to draw the shadow inside view bounds.
Change-Id: I88c9f19b1c16839b8d6db6df2bebff126fa5a9a3
Android APIs use radius for measuring the corner's curvature, but Java2D
APIs use diameter. Add the missing conversion.
Change-Id: I630fc8712e8301324c641885c0c4adf644d13b7e
The intensive bridge tests use some libraries that are compiled with
1.7. All other tests are capable of running on JRE 1.6. Thus, change the
run configurations appropriately.
Change-Id: Iaea0fef2e58877578b36ac2ffe0b20b3a55f572c