Bug: 63909536
Bug: 63908092
Test: CTS: I0f36ce34c968fd7fae4d8edebabea3a421859615
One-pager:
https://docs.google.com/document/d/1IWSdXb5O9lu-Zbj7SaNWo5pS7-FHlonFnqazjnecozM/
Design doc:
https://docs.google.com/document/d/15S6DSAV4EwOuJLv29UC_9cdSGdPg3KvOJVn2EHoP3fw/
ImageDecoder is designed to streamline certain patterns of BitmapFactory
use:
- choosing sample size based on actual dimensions
- choosing a specific output size
- post-processing (e.g. for rounded corners)
- copying to HARDWARE
- decode directly to ashmem
- creating a Drawable
- use as an alpha mask
- save RAM (e.g. use RGB_565)
In addition, it will include new features:
- animated drawables (TODO)
- report failures *and* optionally create a partial image
- crop
Add PostProcess to handle post-processing. It is separate from
ImageDecoder so that it may be used in the future by other commands that
might want something similar (e.g. capturing a View).
Consolidate NinePatch code for sharing between BitmapFactory and
ImageDecoder.
Some features left out of this CL:
- Create from ContentResolver + URI
- animation
- report more info in ImageInfo
- more overloads (e.g. null OnHeaderDecodedListener)
Change-Id: Icf011dc1b97b492788e47cf51fcf8abe8e9c7b88
* Fixes the ripple interpolator to match UX spec
* Adjusts behavior if the ripple is re-sized mid-ripple
to look less bad
Bug: 63635160
Test: mashed a bunch of buttons
Change-Id: I26de59fe81372512b287a646ca7377d052227aee
Bug: 69322344
Test: visual inspection on VectorDrawableTest with AA off. Jagged edges
that are otherwise smooth were spotted.
Change-Id: Ib2dfbd3a941be0b4ff92b8458346f8c8f5015a4b
* Updates press state ripple to match UX spec
* Makes it ungodly silky smooth LIKE BUTTAH
* Update hover & focus states to be closer to UX spec,
still needs a final pass.
Bug: 63635160
Test: Clicked on a bunch of stuff
Change-Id: I162ab9d8d669002f2ae511f93b5d9fe67f99c533
Indroduced DisplayFrames object to track frames used to calculate
window insets per display vs. at a global level in PhoneWindowManager.
Bug: 64148922
Change-Id: I19f166920eba0a4f933a223a77e096bcc8dab0c1
Test: bit FrameworksServicesTests:com.android.server.wm.ScreenDecorWindowTests
Test: go/wm-smoke
Indroduced DisplayFrames object to track frames used to calculate
window insets per display vs. at a global level in PhoneWindowManager.
Bug: 64148922
Test: bit FrameworksServicesTests:com.android.server.wm.ScreenDecorWindowTests
Test: go/wm-smoke
Change-Id: I4a668d6c2dd0bfa666cb6acecf663cf83545ea87
This CL contains followins:
- Use enum class FontVariation instead of legacy enum.
- Store FontStyle in MinikinPaint.
Bug: 65024629
Test: minikin_tests
Change-Id: I86bf64fd5d9a8c08eff47db851fa4655da84b1e4
This is a pure refactoring with no a behavior change other than
that these calls now go through android.system.Os, which immediately
delegates to Libcore.os.
This is a first step towards separating framework (via
android.system.Os) vs. libcore (via Libcore.os) clients of these
low level APIs. Separating these is a prerequisite towards moving
the API parts of android.system into framework, and moving the
rest into a different package in libcore.
Test: Treehugger
Bug: 67901714
Change-Id: Ifd8349ec5416e5693f40dba48fdf2bef651b7d81
This change adds support for specifying the TTC index on font entries,
relevant in the context of .ttc font files used to deliver multiple
fonts in the same file.
Bug: 37853920
Test: adb shell am instrument -w -e class android.content.res.FontResourcesParserTest com.android.frameworks.coretests/android.support.test.runner.AndroidJUnitRunner
Change-Id: I3f74e87dec78e1f5a68ccead80b0f637af1aa7a3
Matching the interpolators to be declerate on both enter and exit.
According to the UX team feedback.
b/63635160
Test: demo app, settings app and calculator app
Change-Id: I49b88ef73f0bd45cd2b2c26feb2443633f171575
1. Consistent enter and exit duration and speed. Both bounded and
unbouned. It used to be that exit is much faster than enter.
2. Instead of starting from 0 size radius, we start from some size
according to the current drawable's bound.
b/63635160
Test: demo app, settings app and calculator app
Change-Id: I1135fefc9d9103f170ab889269b38a9900835450
For camera devices, DEPTH_POINT_CLOUD coordinates are in meters and
are in the camera's local coordinate system.
Test: Built docs, manually verified output.
Bug: 67308479
Change-Id: I028e13a2fb79688a7ce440f905fa82826fc38a03
According to the spec, the foreground will cover the whole area at
the end of expansion, and do not show the background.
In bounded case, the ripple exit should start from the current value.
b/63635160
Test: demo app, calculator and settings
Change-Id: I64d8b941e2b28ea11165d29de3e6ef77d5ee78f5
We didn't trace the draw from cache.
Here we add trace for draw into bitmap, which is normally heavy.
fix: 65060698
Bug: 65060698
Test: run test app and get systrace and check
Change-Id: Ia81127c4aa285b3277e9c9edbdf356d85cb28b5e
(cherry picked from commit cf0c41dbc221c2619212c7e25e6d90a9c4d05b05)
This will also show circular ripple when focus is on.
Previously, bounded case behaved differently than unbounded case. Now
they are consistent, too.
b/63635160
Test: sample app and calculator app
Change-Id: I5c96c8079c789d6e571af2c2356e3ce6add37b46
We didn't trace the draw from cache.
Here we add trace for draw into bitmap, which is normally heavy.
fix: 65060698
Test: run test app and get systrace and check
Change-Id: Ia81127c4aa285b3277e9c9edbdf356d85cb28b5e
If the constructor throws an exception, the object will still be
finalized. Hence we have to make sure to set objects that are cleaned up
to 0/null and clean up everything else. Otherwise the finalizer might
double clean up a failed PdfRenderer.
It also appears that the Pdfium error state is only set if a open-doc
function fail. Hence remove it in every other case. Otherwise successes
might read the error of the last call.
Fixes: 63875707, 37052344
Test: cts-tradefed run singleCommand cts-dev -m Pdf --test=android.graphics.pdf.cts.PdfRendererTest
Change-Id: I6d9fc26be768ba1e338344740e340cf9b56386e9
Typeface.create has not been thread-safe. This CL makes it thread safe.
At the same time, reorganize cache and lock in Typeface.
Bug: 64606109
Test: bit FrameworksCoreTests:android.graphics.TypefaceTest
Test: bit CtsGraphicsTestCases:android.graphics.cts.TypefaceTest
Change-Id: Id18e9b8bfab508a26fc0c83af6b1ca97e132b732
* Increase the ascent and descent of individual lines in StaticLayout
as needed, if any fallback fonts that end up getting used call for
it. For backward compatibility, this is hidden behind a builder
flag.
* Document in Paint.java that the returned parameters are only for
the default font, and a layout may need more space based on
fallbacks used.
Also update for changes in minikin API:
* MinikinFont now requires a method for getting vertical extents
(ascent, descent, and line gap).
* minikin API now allows asking for vertical extents of laid out
text.
* minikin API's LineBreaker now returns ascents and descents for each
line.
Finally, added performances test for creating a StaticLayout.
Follwing are the numbers on a marlin with a stable clock before and
after this CL.
For fixed text almost always hitting the cache:
Before: mean=260684 median=260188 min=258532 standardDeviation=1897
After: mean=262432 median=261509 min=260429 standardDeviation=2185
For random text almost never hitting the cache:
Before: mean=5971827 median=5991126 min=5886871 standardDeviation=83724
After: mean=6337093 median=6317010 min=6311222 standardDeviation=40213
Bug: 28963299
Bug: 29063863
Bug: 32057121
Bug: 37756858
Test: bit FrameworksCoreTests:android.text.
Test: bit CtsTextTestCases:*
Change-Id: I482a98ff8f472e8bab4f0ba9d1d7b368858038ff
Implement enough functionality in protobuf dumpsys to replicate
old functionaltiy in android.server.cts.WindowManagerState
Test: cts-tradefed run commandAndExit cts-dev --module CtsWindowManagerHostTestCases
cts-tradefed run commandAndExit cts-dev --module CtsServicesHostTestCases
Change-Id: Ib527ab3f44620a08cf03b77c37c2bae883d90e13
Minikin already supports multiple languages specified per font in
I7f13b51464c9b01982bb573251d77052b9ddbd70. This CL adds a couple of
such cases into fonts.xml and clarifies in the method and the
variable names and parameters that the frameworks is handling a
multi-language string when it is.
Fixes: 26687969
Test: make -j checkbuild
Test: bit FrameworksCoreTests:android.graphics.TypefaceSystemFallbackTest
Change-Id: Ifa540a95f87921983f9069330d1dd0892538a8df
Bug: 64269689
Test: m checkbuild
Test: bit CtsGraphicsTestCases:*
Test: bit CtsViewTestCases:*
Test: bit CtsTextTestCases:*
Change-Id: Idc9f2b4612741be949204cd06efc41e1738d6587
This fixes the cases where the replacement of parts of text with
ellipsis may result in more-than-expected width of text due to
contextual width changes in the font, such as kerning or Arabic
shaping.
The calculations in TextUtils.ellipsize() and StaticLayout are fixed
to recalculate the new width and reduce it further until the text
actuall fits. BoringLayout and DynamicLayout get fixed too since
they use the other two implementations indirectly.
Also reverse a recently-introduced incorrect check for
multi-character ellipsis in Layout.java.
Fixes: 31537595
Fixes: 64156587
Test: Manual (Arabic edge cases ellipsize correctly)
Test: bit CtsTextTestCases:*
Test: bit CtsWidgetTestCases:android.widget.cts.TextViewTest
Test: bit CtsWidgetTestCases:android.widget.cts.EditTextTest
Test: bit CtsWidgetTestCases:android.widget.cts.CheckedTextViewTest
Test: bit CtsWidgetTestCases:android.widget.cts.AutoCompleteTextViewTest
Test: bit CtsWidgetTestCases:android.widget.cts.MultiAutoCompleteTextViewTest
Test: bit FrameworksCoreTests:android.text.
Test: adb shell am instrument -w com.android.documentsui.tests/android.support.test.runner.AndroidJUnitRunner
Change-Id: Iaddcc8b01c78d477e2c29b339d321c9631426f34
Adding Typeface.create(Tyepface, int weight, boolean italic).
This API is a most primitive API for specifying exact weight value
for drawing text.
Test: CtsGraphicsTestCases:android.graphics.cts.TypefaceTest
Bug: 63135308
Change-Id: I5766870f68026fd1b13815e794f5df243cd8c912
This reverts commit 0d253e46aa0b4cb2ea56e220812aeab92de64ae1.
The original CL changed Typeface internal methods and broke
TypefaceCompatApi26Impl in support library which uses reflections.
Ideally, TypefaceCompatApi26Impl must fall back to public API
implementation but due to lack of method availability check, it ended up
crashing the application.
The original patch didn't change any behaviors in MR1, so reverting
that change is the best solution for MR1.
Bug: 64033594
Change-Id: Ie86afeb1b809e57915d62c1db5a70c8d210d2354
Test: N/A
Added documentation to clarify what happens in the case of null or
empty arguments.
Change-Id: I694dc0f6a6d95ab6ca7ed95b51d81938618eb75f
Fixes: 36861796
Test: bit CtsTextTestCases:*
Test: bit CtsGraphicsTestCases:android.graphics.cts.FontVariationAxisTest