CloseGuard instances are allocated in constructors and usually
assigned to final fields. This implies they're non-null in finalizers
except in the case where the constructor throws. We add a null check
to make sure we can continue cleaning up other state in the finalizer
(if applicable).
Also, this change decouples closeguard warnings in constructors
from other state based logic. This because the logic there is usually
duplicated with the call to close().
NOTE: This change is not a "complete" fix. Many of these finalizers
are broken in the case where <init> throws. The only objective of
this change is to make such errors more obvious.
Note that some of these classes don't have CTS tests.
Test: make, CtsMediaTestCases.
Bug: 35609098
Change-Id: I24d9e0215f80e44914dba8ab99b6312fd6ed1fc0
It tooks 10 years, but better late than never!
Bug: 32984164
Test: Compiled documentation and checked in Chrome
Change-Id: I6dfd7fba6d3077f8c774b203589083bdbc15f9d2
This follows the pattern established by other "out" fields
in BitmapFactory.Options
Bug: 32984164
Test: CtsGraphicsTestCases
Change-Id: Ie72e47338b578b41c550453e2698d2d49eddf6da
Currently there are over 170 font files are installed in system directory.
Opening 170+ files and keep them is not unacceptable. Pass URI instead.
At the same time, this CL hides full font path from FontConfig since
/system/fonts directory will be deprecated in future.
Bug: 36660849
Test: android.text.cts.FontManagerTest passed
Change-Id: I1d216dc9c6dec702a4ce3b946bfda6dcbe12b7fe
(cherry picked from commit 455f1bfc05bf972ee4fe8cd5fa135ed232126bb7)
Make the class final because its instances are immutable and
it contained only static methods prior to O. Fix a couple of
typos/issues reported by external developers. Add a new variant
of getComponents() to avoid allocations, as requested by
external dev.
Test: Color_ColorLongTest
Bug: 32984164
Change-Id: I3c22e124c9fdf66142d530afa4beb05fe0669359
(cherry picked from commit 48f38f18385e8aed0df48524d8ea3d20eba9199f)
Currently there are over 170 font files are installed in system directory.
Opening 170+ files and keep them is not unacceptable. Pass URI instead.
At the same time, this CL hides full font path from FontConfig since
/system/fonts directory will be deprecated in future.
Bug: 36660849
Test: android.text.cts.FontManagerTest passed
Change-Id: I1d216dc9c6dec702a4ce3b946bfda6dcbe12b7fe
Make the class final because its instances are immutable and
it contained only static methods prior to O. Fix a couple of
typos/issues reported by external developers. Add a new variant
of getComponents() to avoid allocations, as requested by
external dev.
Test: Color_ColorLongTest
Bug: 32984164
Change-Id: I3c22e124c9fdf66142d530afa4beb05fe0669359
- Add support for opaque RAW_DEPTH image format.
- Add support for RAW_DEPTH in ImageReader.
Bug: 36015382
Test: testPDStats
Change-Id: Id77b8e9fb22c2616a938c394c9ddc6c34bfff655
The certs needed to identify non preinstalled providers
can now be declared in XML, using a resources array.
Test: runtest --path frameworks/base/core/tests/coretests/src/android/provider/FontsContractTest.java
runtest --path frameworks/base/core/tests/coretests/src/android/content/res/FontResourcesParserTest.java
Bug: 35025705
Change-Id: Ibf12ad409aa5a873ddb32b1383c147728e664c23
These APIs are necessary to construct Typeface from various combination
TTC index, variation settings, etc.
Bug: 33062398
Test: android.graphics.cts.TypefaceTest passes
Change-Id: Ie069700ed4f67efbec55331bef867f94d58e2a61
Introduce Builder class for creating Typeface from various
sources with optional TTC index and font variation settings.
Bug: 33062398
Test: Manually verified new Builder create Typeface.
Change-Id: Ia23ee6a73516707d854c7387fe75fbb22f80673d
Bug: 36025103
Test: cts-tradefed run singleCommand cts-dev --module CtsGraphicsTestCases
Now, similar to Shaders, we defer native creation until Paint is being
used, and ensure that we have an up to date filter when drawing.
Also implements ColorMatrix#equals to behave like Matrix#equals.
Change-Id: I5f74addd97f5662800802e6f660fead58d518725
b/36088922
Test: Settings app
This utility class can be used to bake shadow in drawable level in
system ui surfaces such as Settings, Overview and ShareSheet.
Change-Id: Iaec867d9ce5b949380c1e5004b68269d1bbeacd4
Now setFontVariationSettings returns false if the given settings is not
effective.
Bug:35764323
Test: ran TextViewTest and PaintTest in cts
Change-Id: Ic31d9e47ec006c8e7bb2c907ff0ea2936bd71d01
We were using a generic context that caused crashes for
the content providers.
Bug: 34657204
Test: manual, calling getCallingPackage() from the provider
doesn't crash anymore.
Change-Id: I2b61e6510d8c6647007987373d03ee5dc97c0889
This CL contains following clean up:
- Hide unnecessary constructors.
- Change List<XX> to XX[] since actually all fields are immutable.
- Change font's variant type from String to int.
- Decouple resource related members to FontResourcesParser.
- Add NonNull/Nullable to all fields.
Test: ran android.content.res.FontResourcesParserTest
Change-Id: If456266ffff86d41342572a19662cc8f3cd13181
Previously, the getTextRunCursor() implementation in Minikin ignored
the font and just used the characters in the buffer in order to
determine cursor positions. Now we calculate the advances beforehand
in order to find potential Indic clusters.
Test: Manually tested some Tamil sequences
Bug: 35721792
Change-Id: I2500bd4c2c9d07bb6c965b2d41e04853886a7391
- identity matrix
- no save stack
- wide-open clip
Behavior around the new bitmap is the same.
Tests : CtsGraphicsTestCases
Change-Id: Ieaf8c2a1b96262ed33940dd852a86089eb93efdb
This was requested by the current users, need to state
that a font is unavailable (needs downloading) or that
the query is unsupported.
Also add tests :)
Test: runtest --path frameworks/base/core/tests/coretests/src/android/provider/FontsContractTest.java
Also CTS attached to topic
Bug: 35097775
Change-Id: Ib15bf4c70185d81a4c20426722eb44c4210771c2
Bug: 36025103
Test: cts-tradefed run singleCommand cts-dev --module CtsGraphicsTestCases
Test: cts-tradefed run singleCommand cts-dev --module CtsUiRenderingTestCases
Test: manually inspected for leaks via SK_TRACK_SHADER_LIFETIME and forcing a GC after ComposeShaderTest
Change-Id: Ib5d33a80d2f9f468705806b05832e753508143cc