Commit Graph

4027 Commits

Author SHA1 Message Date
Mathew Inwood
83b6163810 Merge "Derestrict mSurfaceTexture, mProducer." am: 8e6ce38bde am: c1dbf374d0
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1541665

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ie3321c80292eada053fa4ef3319d9d3555fee3e6
2021-01-07 11:47:32 +00:00
Mathew Inwood
6d1ff42ee6 Merge "Derestrict RippleDrawable.mState." am: b698722956 am: f11b14dfe0
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1541666

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: If77c45731d85f983573da7f05dcc1fd912a2be9c
2021-01-07 10:51:44 +00:00
Mathew Inwood
8e6ce38bde Merge "Derestrict mSurfaceTexture, mProducer." 2021-01-07 09:47:42 +00:00
Mathew Inwood
cc42f71234 Derestrict mSurfaceTexture, mProducer.
Usage has been discovered by an app so reverting this to its previous
state. This is conceptually a partial revert of change 5d123b6775.

NoNonSdkCheck: b/170729553

Bug: 176388660
Test: m
Change-Id: I4399e4d431f8a443343de312e131fbf86d0f60b5
2021-01-06 17:51:07 +00:00
Mathew Inwood
d5d9dc6828 Derestrict RippleDrawable.mState.
Usage has been discovered by an app so reverting this to its previous
state. This is conceptually a partial revert of change 5d123b6775.

NoNonSdkCheck: b/170729553

Bug: 175939224
Test: m
Change-Id: I277b085b490407bbe1899dd7f4614f51cd9ce36e
2021-01-06 17:49:09 +00:00
Leon Scroggins
aad0a30aa1 Merge "Add djsollen and scroggo to graphics OWNERS" am: ccdcfd5f43 am: 1cc6152362
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1530578

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: If354c39063b22212c93ae58bb24105da3814c18e
2020-12-16 15:40:39 +00:00
Leon Scroggins III
582e862543 Add djsollen and scroggo to graphics OWNERS
Bug: 174932174
Test: None

We are already OWNERS of the native side (libs/hwui), and we are active
in the development of the Java side as wel.

Change-Id: I3727411e0123b80843fc6f936b8b3700c8943825
2020-12-15 11:53:55 -05:00
Adrian Roos
c5f061be72 Merge "Add fonts/OWNERS for font-related files." am: 1ab0fea04b am: c8a88daa25
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1529699

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Iffa9b6a2d4ac9b7593096ec718005f51935191ac
2020-12-15 10:23:39 +00:00
Kohsuke Yatoh
3383d0b93b Add fonts/OWNERS for font-related files.
Test: n/a
Change-Id: I98bd4b1c6274e1414c107fd75f08bcd0367ede00
2020-12-15 05:31:26 +00:00
Wale Ogunwale
926aa8da2c Merge "Add more OWNERS coverages" am: 32ff0144bf am: 60f676c7d6
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1519794

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I32e5f8566ba916c892898f3f521a5a4309646142
2020-12-11 16:58:45 +00:00
Charles Chen
09f4e85ac2 Add more OWNERS coverages
Test: manual
Bug: 174932174
Change-Id: Ia798bdbce8516a3d675c55028ab637ad7f0695cf
2020-12-11 19:16:38 +08:00
Jeff Sharkey
24d251403b Improve OWNERS coverage across frameworks/base/. am: fab0ab3c9c am: c7c4a74a78
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1519383

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I5120a3701af3564f363900b20bca75f3ad2a854c
2020-12-08 16:43:17 +00:00
Jeff Sharkey
fab0ab3c9c Improve OWNERS coverage across frameworks/base/.
As general background, OWNERS files expedite code reviews by helping
code authors quickly find relevant reviewers, and they also ensure
that stakeholders are involved in code changes in their areas.

Some teams under frameworks/base/ have been using OWNERS files
successfully for many years, and we're ready to expand them to cover
more areas.  Here's the historical coverage statistics for the last
two years of changes before these new OWNERS changes land:

-- 56% of changes are fully covered by OWNERS
-- 17% of changes are partially covered by OWNERS
-- 25% of changes have no OWNERS coverage

Working closely with team leads, we've now identified clear OWNERS on
a per-package basis, and we're using "include" directives whenever
possible to to simplify future maintenance.  With this extensive
effort, we've now improved our coverage as follows:

-- 98% of changes are fully covered by OWNERS
-- 1% of changes are partially covered by OWNERS
-- 1% of changes have no OWNERS coverage

This specific change is automatically generated by a script from
detailed ownership information confirmed by team leads.

Bug: 174932174
Test: manual
Exempt-From-Owner-Approval: refactoring with team leads buy-in
Merged-In: I9789c97c1de8e5d962b48c29c57d82fe83729eba
Change-Id: I9789c97c1de8e5d962b48c29c57d82fe83729eba
2020-12-08 08:36:27 -07:00
Mathew Inwood
5d123b6775 Add maxTargetSdk restriction to unused APIs.
These are APIs that have @UnsupportedAppUsage but for which we don't
have any evidence of them currently being used, so should be safe to
remove from the unsupported list.

Bug: 170729553
Test: Treehugger
Merged-In: I626caf7c1fe46c5ab1f39c2895b42a34319f771a
Change-Id: I54e5ecd11e76ca1de3c5893e3a98b0108e735413
2020-11-04 09:45:53 +00:00
Joshua Baxter
492cb32c3a docs: fix "buidler" typos in Typeface.Builder am: 8aeade4629 am: f36f2de31a am: 88dce482e3 am: 7e20c36a51 am: 7a30eae665
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/9975934

Change-Id: Iece05fb4b30c057728cee465cb0cb788a9220304
2020-11-04 01:12:04 +00:00
Joshua Baxter
7a30eae665 docs: fix "buidler" typos in Typeface.Builder am: 8aeade4629 am: f36f2de31a am: 88dce482e3 am: 7e20c36a51
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/9975934

Change-Id: I7178d3d8360cc5986785bce67e809b7542a4f51a
2020-11-04 00:57:54 +00:00
Joshua Baxter
88dce482e3 docs: fix "buidler" typos in Typeface.Builder am: 8aeade4629 am: f36f2de31a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/9975934

Change-Id: I7593fd1af6e5e310322ffba85d6140f6e71b4cb5
2020-11-04 00:16:41 +00:00
Joshua Baxter
8aeade4629 docs: fix "buidler" typos in Typeface.Builder
Change-Id: Ic27a4ea036ca5506793795bf838ff63355eeeaf8
test: make ds-docs
bug: 119301911
2020-11-03 20:00:09 +00:00
Mathew Inwood
5f0edaaaf5 Add maxTargetSdk restriction to unused APIs.
These are APIs that have @UnsupportedAppUsage but for which we don't
have any evidence of them currently being used, so should be safe to
remove from the unsupported list.

Bug: 170729553
Test: Treehugger
Merged-In: I8285daa8530260251ecad6f3f38f98e263629ca7
Change-Id: I626caf7c1fe46c5ab1f39c2895b42a34319f771a
2020-11-02 10:30:09 +00:00
Leon Scroggins III
d172a0cff8 ImageDecoder: Use AssetFileDescriptor's length
Bug: 166069819
Test: ImageDecoderTest (cts)

The contained asset may only be a subset of the AssetFileDescriptor.
SkWebpCodec reads the entire stream into a contiguous block of memory.
(This is because libwebp does not provide a streaming API for creating
its demuxer.) If the AssetFileDescriptor contains data after the webp
file, this wastes memory. In some cases, there may be a *lot* of data
after the webp file, so this can use too much memory, particularly on
low memory devices.

Merged-In: I8d8e520f43a7ef0d7e4534ef165d8c7e4d2a0b55
Change-Id: I8d8e520f43a7ef0d7e4534ef165d8c7e4d2a0b55
2020-09-15 15:52:38 +00:00
Xin Li
628590d7ec Merge Android R (rvc-dev-plus-aosp-without-vendor@6692709)
Bug: 166295507
Merged-In: I3d92a6de21a938f6b352ec26dc23420c0fe02b27
Change-Id: Ifdb80563ef042738778ebb8a7581a97c4e3d96e2
2020-08-31 21:21:38 -07:00
Leon Scroggins III
f663182d52 Update graphics language to comply with Android’s inclusive language guidance
Bug: 161896447
Test: make

See https://source.android.com/setup/contribute/respectful-code for reference

Change-Id: I57b81fb5fd2177fbf96f9cc900097f7da1955fca
2020-07-22 13:00:12 -04:00
Makoto Onuki
42bec243c0 Remove unnecessarily @System/TestApi annotations
We can't expose APIs if the enclosing class is hidden, so these
annotations are redundant. We need to remove them so that we can enable the
check.

Exempt-From-Owner-Approval:Cherry-pick from goog/master
Bug: 159121253
Test: treehugger (i.e. this shouldn't trigger "API has changed" error.)
Merged-in: Ie1841a670bdf6c6f4b25a1fc5deed8ec2d18cda2
Change-Id: Ie1841a670bdf6c6f4b25a1fc5deed8ec2d18cda2
2020-06-24 18:02:10 +00:00
Philip P. Moltmann
8bbf9bae6f Fix small issue in PdfDocument docs
Test: Doc fix only
Fixes: 157396387
Change-Id: If1c7a875d8915f53726b832f51cb59fa1f12ae31
2020-05-26 16:29:43 -07:00
Andrew Solovay
b9001d1b8a docs: Removing spurious heading from Javadoc comment
There's an H3 at the top of the PorterDuff.Mode javadoc comment,
and that breaks the TOC in various ways. We don't need that
heading so I'm removing it.

Test: make ds-docs-java
Exempt-from-owner-approval: Docs-only change
Change-Id: I6d5f98b5103a77a7d0245a438b6961c4a21fb059
Bug: 311897143
2020-05-20 00:13:07 +00:00
Leon Scroggins III
e9b2cc829e Update ImageDecoder docs regarding Files
Bug: 139186570
Test: make docs

As part of enforcing Scoped Storage for the next Android release, we're
encouraging app developers to steer away from using raw file path access
and, instead, use FileDescriptor or Uri to access files.

Update createSource(File)'s docs to suggest why they might want to use a
different method.

Update the top level example to use createSource(ContentResolver, Uri)
instead of createSource(File).

Change-Id: Icbccdb5183edd0b6a052ec905f999f02ac4e61d3
(cherry picked from commit 4056974583)
Merged-In: Icbccdb5183edd0b6a052ec905f999f02ac4e61d3
2020-05-12 14:09:56 +00:00
Andrew Sapperstein
8fe35e5f21 Fix broken @see tags in public documentation.
These were previously being suppressed by doclava but with this change,
all failures are fixed and the suppression logic has been removed.

To fix the issues, there were a few possible changes made:
- broken reference to a public API (such as incorrect parameters): fixed
- unnecessary @link inside an @see tag: fixed
- @see referring to an @hide or @SystemApi: reference removed
- broken references to inner class constructors
 - worked around by fully qualifying the constructor

Bug: 6963924
Test: make doc-comment-check-docs
Exempt-From-Owner-Approval: cherry-picked from master
Change-Id: Ifbdce2de96cdffa560bd90f549fa7184d1f9af85
Merged-In: Ifbdce2de96cdffa560bd90f549fa7184d1f9af85
(cherry picked from commit e0624c7a40)
2020-05-01 18:25:32 +00:00
Andrew Sapperstein
1f6e22cbd8 Fix broken @see tags in public documentation.
These were previously being suppressed by doclava but with this change,
all failures are fixed and the suppression logic has been removed.

To fix the issues, there were a few possible changes made:
- broken reference to a public API (such as incorrect parameters): fixed
- unnecessary @link inside an @see tag: fixed
- @see referring to an @hide or @SystemApi: reference removed
- broken references to inner class constructors
 - worked around by fully qualifying the constructor

Bug: 6963924
Test: make doc-comment-check-docs
Change-Id: Ifbdce2de96cdffa560bd90f549fa7184d1f9af85
Merged-In: Ifbdce2de96cdffa560bd90f549fa7184d1f9af85
2020-05-01 00:42:22 +00:00
Leon Scroggins III
6419ebff5c Fix .equals call in ImageDecoder
Bug: 154954875
Bug: 143231863
Test: I93b01cb60a8c76110ea2ff4250d0048512629d8d

I9229039b752bafa9a9b85b914a62093dff1eec34 switched from "==" to
".equals", but it did not take into account that Uri#getScheme() can
return null. Switch around the .equals check so that it is called on
SCHEME_CONTENT, which will never be null.

Change-Id: I0df5d2407a32fad0e21e597697af293fbc2fb315
Merged-In: I0df5d2407a32fad0e21e597697af293fbc2fb315
2020-04-28 14:14:30 +00:00
Rob Carr
9005cdcf01 Merge "BLAST: Two start-up optimizations" into rvc-dev 2020-04-27 17:20:42 +00:00
Robert Carr
b9cf275b9b BLAST: Two start-up optimizations
1. Avoid a seperate IPC querying in to system-server
   to initialize the mUseBLAST flag.
2. Avoid calling property_get_bool with each BufferQueue
   creation.

Instead we piggy-back both values inside addWindow return values.

Bug: 152501005
Test: Existing tests pass
Change-Id: If130560a8230f8d399cf7631264d551522939faa
2020-04-24 14:42:55 -07:00
Sumir Kataria
67d06a9965 Update doc formatting.
Add missing <p> tags which should make some methods
more readable.  Also added a few {@code} tags and a
couple of missing {@link} tags.

Fixes: 154547852
Test: m offline-sdk-docs

Change-Id: I1b8d0212b54e902378d5d25f6d555f69af207604
2020-04-20 16:13:13 -07:00
John Reck
9c52543162 Merge "Document that getTransformMatrix can inset" into rvc-dev 2020-04-17 19:20:38 +00:00
John Reck
62f8b4f3d6 Document that getTransformMatrix can inset
Bug: 152621633
Test: none, docs only change
Change-Id: I4a357affdf698c8eb70ed7abbfa828586b2da0ec
2020-04-16 15:42:14 -07:00
Leon Scroggins III
865f0f1ec9 Support Skia's gray SkColorSpaces
Bug: 153410582
Test: I0a280cdfdb02766f5e415408386cce49a59504ab

For gray color spaces, Skia creates a special toXYZD50 matrix which does
not have any concept of primaries. Update the Java ColorSpace to
recognize such a matrix and treat it specially. Instead of creating
primaries, use a set of dummy values.

This fixes a bug where the Java ColorSpace was invalid (NaNs in its
transforms) and applying it to a new Bitmap yielded incorrect results.

Fix up the @see links in getPrimaries and surrounding methods.

Change-Id: I94fe232e10f56a69832d4a39a2e5909eac641264
(cherry picked from commit d82d585f28)
Merged-In: I94fe232e10f56a69832d4a39a2e5909eac641264
2020-04-14 18:43:16 +00:00
Ryan Mitchell
26ff673458 Add mSourceDrawableId to copy constructor
The copy constructor of AdaptiveIconDrawable#LayerState currently does
not copy mSourceDrawableId from the original layer state. This prevents
drawables created from preloaded AdaptiveIconDrawables from having the
correct source drawable resource id.

Bug: 148488431
Test: CtsContentTestCases:android.content.pm.cts.PackageManagerTest
Change-Id: I7795a337a2a364677e375776c7aec5bc9189e0da
2020-03-27 10:32:52 -07:00
Derek Sollenberger
f8d4a6684c Fix mmap errors when reading font files via the AssetManager.
Previous attempts to do this ignored the offset that the
AssetFileDescriptor may have.

Bug: 149927583
Test: CtsTextTestCases and androidx.appcompat.widget.AppCompatTextViewTest
Change-Id: Idcc8cb83a7f265cfa12707b7ce643b35f7f72352
2020-02-27 15:12:43 -05:00
TreeHugger Robot
781185099b Merge "Do not attempt to special case uncompressed font assets." 2020-02-21 22:35:55 +00:00
Derek Sollenberger
dd03a8ef81 Do not attempt to special case uncompressed font assets.
The logic to attempt to directly mmap uncompressed font assets
has resulted in breakages for some applications and utilities.
This CL disables this speculative optimzation until we can determine
the problem with this approach and if such an optimization is required.

Bug: 149780695
Test: CtsTextTestCases and androidx.appcompat.widget.AppCompatTextViewTest
Change-Id: I3b10a801a5600aefe8573fab1b28cd79c848c892
2020-02-21 15:28:52 -05:00
Derek Sollenberger
76e7430bae Merge changes from topic "HWUI_JNI"
* changes:
  Export symbols for the newly exposed APEX/internal headers
  Remove dependence on libandroid_runtime from Bitmap.cpp
  Update Region.cpp to use AParcel NDK APIs
  Cleanup header and build targets for libhwui clients.
  Remove dependencies on headers outside UI module
  Cleanup LOG_TAG when bundled in HWUI
  Move android.graphics JNI & APEX files into HWUI
2020-02-21 11:43:02 +00:00
Derek Sollenberger
42c50042d1 Remove dependence on libandroid_runtime from Bitmap.cpp
The end goal is to have Bitmap.cpp use AParcel, but until that
API is extended to support this use case this is an alternative
way to isolate the graphics files from the libandroid_runtime.

Test: CtsGraphicsTestCases
Bug: 145227478
Change-Id: Ie3854fe03dec4f7b1b485295bb9a5ebba52ddb7c
2020-02-20 21:50:06 -05:00
Leon Scroggins
251888e9eb Merge "Add details regarding setConvexPath deprecation" 2020-02-20 20:00:38 +00:00
Leon Scroggins III
076bbe1ceb Add details regarding setConvexPath deprecation
Bug: 149857968
Test: make docs
Change-Id: I995e035fc7d73d196a50b4e515db38110baa0fe5
2020-02-20 11:16:11 -05:00
Leon Scroggins III
5a190b19bb Add Bitmap#getHardwareBuffer
Bug: 148155907
Bug: 135299581
Test: TODO

Hidden for now. We'd like to make it an SDK API eventually
(b/148155907).

Internal code is currently calling createGraphicBufferHandle. This is
not something we plan to expose from the UI rendering module, so add a
method to get a HardwareBuffer instead. This is something we were
already planning to add. It seems that clients of
createGraphicBufferHandle really wanted a Parcelable to pass the
HARDWARE Bitmap to another thread. This should satisfy that use case.

Change-Id: Id701f7c7eab37830cd7d2cdb929cbe6ba4eca119
2020-02-18 16:35:56 -05:00
Derek Sollenberger
db8164c0ac Merge "Move RenderNodeAnimator to android.graphics.animation package" 2020-02-14 16:32:50 +00:00
TreeHugger Robot
8780aae16c Merge "Create a ParcelableColorSpace" 2020-02-14 00:58:30 +00:00
Derek Sollenberger
8c2f6b6e15 Move RenderNodeAnimator to android.graphics.animation package
A wrapper still exists at android.view.RenderNode animator
as it needs access to internals of the view that would violate
the package layering if moved into android.graphics.animation.

This CL also moves the Java and cpp files associated with creating
a native interpolator that can be run directly on the RenderThread.

Bug: 149293249
Test: CtsViewTestCases
Change-Id: I5260331fedbd634cf2f6d6d392941e7284527420
2020-02-13 16:14:06 -05:00
John Reck
aa5f38577a Create a ParcelableColorSpace
Bug: 148412652
Test: ParcelableColorSpaceTest CTS
Change-Id: If0901367e501e2ecfc71b9ed29ec7d8dd4d0550f
2020-02-12 14:28:10 -08:00
Derek Sollenberger
e2edcebb2b Merge "Consolidate AssetManager calls in Font/FontFamily" 2020-02-11 13:11:42 +00:00
Derek Sollenberger
4db7bd28e7 Consolidate AssetManager calls in Font/FontFamily
The Font/FontFamily classes use private API calls in native
code to get the contents of an Asset.  These calls need to
be made on public APIs in order to isolate the graphics module
from the rest of the system.  Public Java APIs already exist so
this CL refactors the code to use those methods.

Test: CtsTextTestCases
Bug: 147136234
Change-Id: I35a6558b597684e59279d7a841669c5f909d5152
2020-02-10 20:05:31 +00:00