Commit Graph

3169 Commits

Author SHA1 Message Date
Seigo Nonaka
4fab38f1be Merge "Fix NPE happens if no source was specified to font element." into oc-dev am: b3e92234fa
am: 159f549c8f

Change-Id: Ief83bf6522468ab40d8dd9c3a68ab72892952ea4
2017-05-02 17:44:46 +00:00
Seigo Nonaka
5e0aed49a8 Fix NPE happens if no source was specified to font element.
This also fixes unexpected fallback to the old implemntation by calling
allowUnsupportedFont() which is only for backward compatibility.

This CL also remove getResourceId() method. Nobody uses this method.

Bug: 37865521
Bug: 37844248
Test: am instrument -w -e class android.content.res.cts.ResourcesTest\
      android.content.cts/android.support.test.runner.AndroidJUnitRunner
Change-Id: I987448add728c53c916f24a2ea8f337be417248f
2017-05-01 23:23:50 -07:00
Hyunyoung Song
d6afaa8563 Merge "Add @TestApi annotation to AdaptiveIconDrawable" into oc-dev am: 1e8f451bbf
am: 090109cb19

Change-Id: I688ef5dd83d10529e8669dfb9e5ea818e0fdc348
2017-05-01 23:40:10 +00:00
TreeHugger Robot
1e8f451bbf Merge "Add @TestApi annotation to AdaptiveIconDrawable" into oc-dev 2017-05-01 23:18:41 +00:00
Jeff Sharkey
15971f8328 Merge "Remove FontVariationAxis.InvalidFormatException." into oc-dev am: 408ec0b463
am: 11188aee8a

Change-Id: I49be72bd46caf9d3a9e71fb68326ade9ffd5826f
2017-04-29 16:53:35 +00:00
Hyunyoung Song
d2afdab226 Add @TestApi annotation to AdaptiveIconDrawable
Bug: 37779858
Bug: 37788590

Test: $ make -j31
Test: $ make update-api -j31

Change-Id: I459317e8b9f6db227a4bb567c17b212639454e9d
2017-04-28 15:40:50 -07:00
Seigo Nonaka
0f07dd5b14 Remove FontVariationAxis.InvalidFormatException.
Use IllegalArgumentException instead.

Bug: 37769084
Bug: 37765945
Test: am instrument -w -e class android.widget.cts.TextViewTest
      android.widget.cts/android.support.test.runner.AndroidJUnitRunner
Test: am instrument -w -e class android.graphics.cts.TypefaceTest
      android.graphics.cts/android.support.test.runner.AndroidJUnitRunner
Test: am instrument -w -e class android.graphics.cts.PaintTest
      android.graphics.cts/android.support.test.runner.AndroidJUnitRunner
Test: am instrument -w -e class android.graphics.cts.FontVariationAxisTest
      android.graphics.cts/android.support.test.runner.AndroidJUnitRunner
Test: am instrument -w -e class android.text.VariationParserTest
      com.android.frameworks.coretests/\
      android.support.test.runner.AndroidJUnitRunner

Change-Id: I50b70e3e7e37585c937dcce2416a83353de62a5d
2017-04-28 15:24:40 -07:00
Chris Craik
05cdededbe Merge "Add conic support for Path#approximate" into oc-dev am: ebd44d0076
am: a1e500ebf4

Change-Id: Ifc5033fbb595a672a29539599e39ac7e56c62d50
2017-04-28 19:11:02 +00:00
TreeHugger Robot
ebd44d0076 Merge "Add conic support for Path#approximate" into oc-dev 2017-04-28 18:47:37 +00:00
Chris Craik
4226800aa4 Merge "Make SurfaceTexture#isReleased public API" into oc-dev am: 533538c96e
am: 7b026d8aa4

Change-Id: Ia6d5b4179881c20f30a4de3b3e2efde38bfa4c23
2017-04-28 17:32:16 +00:00
Chris Craik
533538c96e Merge "Make SurfaceTexture#isReleased public API" into oc-dev 2017-04-28 17:09:55 +00:00
Chris Craik
96202d56ad Add conic support for Path#approximate
Fixes: 37722722
Test: bit CtsGraphicsTestCases:PathTest
Test: bit CtsUiRenderingTestCases:android.uirendering.cts.testclasses.PathTests

Also adds static asserts to path-walking code, to avoid this problem
in the future.

Also adds annotations, since this is public API now.

Change-Id: Ic39b167968b98fd8197be2d0f9aca79949717237
2017-04-27 16:24:18 -07:00
Seigo Nonaka
a517948365 Merge "Merge "Revise method comment on setFontVariationSettings" into oc-dev am: e6746726bc" into oc-dev-plus-aosp
am: af77018f5a

Change-Id: I4d1ebb95729eaad4f59d4ae7590d47665e927aa6
2017-04-27 17:56:53 +00:00
TreeHugger Robot
e6746726bc Merge "Revise method comment on setFontVariationSettings" into oc-dev 2017-04-27 17:34:48 +00:00
Seigo Nonaka
865ae63322 Merge "Font API clean up" into oc-dev am: 25c2cdc052
am: 7de96042ed

Change-Id: If2580c1ea3b58b377484a26fd7e9107e9958e3ed
2017-04-26 23:49:09 +00:00
Seigo Nonaka
443afa50fc Merge "Load font file from remote provider synchronously." into oc-dev am: 1c661d1943
am: 6c0dd10a7c

Change-Id: Ifc66af9b116093e3d63bfedd1782f017a7126d3a
2017-04-26 18:13:40 +00:00
Seigo Nonaka
080b054bdd Font API clean up
- Move FontRequest from android.graphics.fonts to android.provider since
  this is only used by android.provider.FontsContract and never draw
  anything.
- FontRequest is no longer being Parcelable.
- Remove FontSpec.aidl which is not necessary.

Bug: 37326126
Test: am instrument -w -e class android.provider.FontsContractTest
      com.android.frameworks.coretests/\
      android.support.test.runner.AndroidJUnitRunner
Test: am instrument -w -e class android.provider.cts.FontProviderTest
      android.provider.cts/android.support.test.runner.AndroidJUnitRunner
Test: am instrument -w -e class android.provider.cts.FontRequestTest
      android.provider.cts/android.support.test.runner.AndroidJUnitRunner

Change-Id: I0eb501844247c2f07eaa1fc7a71f72e404888b5b
2017-04-26 18:00:17 +00:00
Seigo Nonaka
d9de8be233 Load font file from remote provider synchronously.
Since CancellationSignal is not guaranteed to be handled by remote
process, introduce threaded font loading mechanism.
At the same time, this fixes possible NPE issue in openFont.

Bug: 37552479
Test: am instrument -w -e class android.provider.FontsContractE2ETest
      com.android.frameworks.coretests/\
      android.support.test.runner.AndroidJUnitRunner

Change-Id: Ie235c5a57bd172b0882da5aa27a990d7c6686ff2
2017-04-25 21:19:22 -07:00
Seigo Nonaka
802c41bd11 Merge "Font provider cleaning ups." into oc-dev am: 5313eee98a
am: a3d5786a3d

Change-Id: Ic9a30e9bf8404c3a469bb0c998fd876ee94a3488
2017-04-26 00:39:15 +00:00
Chris Craik
f461219185 Make SurfaceTexture#isReleased public API
Bug: 36902442
Test: bit CtsUiRenderingTestCases:android.uirendering.cts.testclasses.TextureViewTests

This method is already tested in TextureViewTests in CtsUiRenderingTestCases.

Change-Id: Id2d186f966d5e2b7c50a8b2ecefcd66c8a87c1fd
2017-04-25 15:57:57 -07:00
Seigo Nonaka
54084b64b1 Font provider cleaning ups.
- Remove Columns.STYLE
- Decouple Context from Typeface.
- Make FontsContract constructor private since it is essentially static.
- Removed unused constants.

Bug: 37281200
Bug: 37268410
Test: am instrument -w -e class android.provider.FontsContractE2ETest
      com.android.frameworks.coretests/\
      android.support.test.runner.AndroidJUnitRunner
Test: am instrument -w -e class android.provider.FontsContractTest
      com.android.frameworks.coretests/\
      android.support.test.runner.AndroidJUnitRunner
Test: am instrument -w -e class android.graphics.cts.TypefaceTest
      android.graphics.cts/android.support.test.runner.AndroidJUnitRunner
Change-Id: Ic46c256141d27ca28f30023bcc40f4e1161d5338
2017-04-25 19:40:58 +00:00
Seigo Nonaka
94bc52b2e1 Merge "Remove Typeface.create" into oc-dev am: 0a7096dccb
am: 0582ccb776

Change-Id: Ie116f1f179730d488913bf89627dad1f76b635b3
2017-04-25 19:38:26 +00:00
Seigo Nonaka
5a09c64345 Remove Typeface.create
Test: Manually done
Bug: 37514611
Bug: 37463988
Bug: 37281200
Change-Id: Ida704af910e0ae195b96803de506fa1e1d66c9f5
2017-04-25 09:38:39 -07:00
Jeff Sharkey
e01a56bb66 Merge "More auto-doc work." into oc-dev am: 6bc03748a7
am: f25b285706

Change-Id: Ic6b7c359259b6fd809b1a01ba249a7b44e15a29f
2017-04-24 18:37:08 +00:00
Jeff Sharkey
6bc03748a7 Merge "More auto-doc work." into oc-dev 2017-04-22 19:11:34 +00:00
John Reck
edc106d63e Merge "Fix @throws javadoc on SurfaceTexture ctors" into oc-dev am: aec1fbeaa3
am: 30baf2affa

Change-Id: I55e33f2d6b4e536d93daac57ff543c1f0d4780e9
2017-04-21 23:48:38 +00:00
Adam Lesinski
ea957eb6d2 Merge "Propagate density through AdaptiveIconDrawable and BitmapDrawable" into oc-dev am: 5be3647a9e
am: 091fe96343

Change-Id: Ib313379b085c4d3ee435b22bb844aeeef6ff74cf
2017-04-21 23:40:31 +00:00
TreeHugger Robot
aec1fbeaa3 Merge "Fix @throws javadoc on SurfaceTexture ctors" into oc-dev 2017-04-21 23:25:54 +00:00
TreeHugger Robot
5be3647a9e Merge "Propagate density through AdaptiveIconDrawable and BitmapDrawable" into oc-dev 2017-04-21 22:35:57 +00:00
Jeff Sharkey
910e081216 More auto-doc work.
Add support for AnyThread, CallSuper, and UiThread.

Another related CL started documenting @RequiresPermission, so remove
duplicated information in existing APIs.

Suppress auto-doc on a handful of classes that are already
well-documented.

Test: make -j32 offline-sdk-docs
Bug: 37526420
Change-Id: I791437dccec0f11d5349a23b982ba098cb551af8
2017-04-21 16:35:08 -06:00
John Reck
b8d152f5cd Fix @throws javadoc on SurfaceTexture ctors
Change-Id: I63bd76ec4e44251b7e06ad6fc8aa5a3372104656
Fixes: 37323694
Test: Looked at generated docs, verified correct
2017-04-21 13:49:36 -07:00
Adam Lesinski
50954d2b4e Propagate density through AdaptiveIconDrawable and BitmapDrawable
Resources#getDrawableForDensity now propagates the overridden
density through to AdaptiveIconDrawable so that the density can be
propagated to leaf BitmapDrawables correctly.

This enables AdaptiveIconDrawable to support higher resolution
foreground/background bitmaps for use in Launcher.

Bug: 36039665
Test: bit CtsContentTestCases:android.content.res.cts.ResourcesTest
Change-Id: Iaa9a5592626e38e1ff839a76f7c6cfb9e16e5dc1
2017-04-21 13:25:44 -07:00
Lucas Dupin
db83feae54 Merge "Add transfer mode support to ColorDrawable" into oc-dev am: eedceb5721
am: a17c58ff59

Change-Id: Ied2dd786e7a31f53c685b920e119bd127f9d9f82
2017-04-21 20:04:00 +00:00
TreeHugger Robot
eedceb5721 Merge "Add transfer mode support to ColorDrawable" into oc-dev 2017-04-21 19:29:07 +00:00
Seigo Nonaka
a691442ce0 Merge "Cache the Typeface based on the FontRequest." into oc-dev am: 5b96e55d90
am: a121eabf99

Change-Id: Ib4e0860910b498cc8effb5b62b5642d0d9bbd39d
2017-04-21 18:18:19 +00:00
Seigo Nonaka
daa8dfc690 Cache the Typeface based on the FontRequest.
Bug: 37471729
Test: FontsContractE2ETest
Change-Id: Ifb1bd2b50077471404f5f1dffc01e7697d7042e6
2017-04-21 09:11:10 -07:00
Hyunyoung Song
2d63567164 Merge "Support fraction type for inset* for InsetDrawable. b/36024318" into oc-dev am: ab7a2879eb
am: a457ce7ce8

Change-Id: I9dab39e4f2ee254925bcf2bdba592e8769016cc9
2017-04-21 15:38:14 +00:00
TreeHugger Robot
ab7a2879eb Merge "Support fraction type for inset* for InsetDrawable. b/36024318" into oc-dev 2017-04-21 15:14:27 +00:00
Clara Bayarri
506847aa92 Merge "Update Typeface callback docs about error codes" into oc-dev am: 337be5a12f
am: 5d2334fb7c

Change-Id: Ib85820fd4e743102b6697ecb9ac92b5e45aa9c05
2017-04-21 09:55:49 +00:00
TreeHugger Robot
337be5a12f Merge "Update Typeface callback docs about error codes" into oc-dev 2017-04-21 09:44:53 +00:00
Hyunyoung Song
d0dfe3008d Support fraction type for inset* for InsetDrawable.
b/36024318

Test: manually tested on default icons.
Test: $ runtest --path=cts/tests/tests/graphics/src/android/graphics/drawable/cts/InsetDrawableTest.java

adb  shell am instrument -e class 'android.graphics.drawable.cts.InsetDrawableTest' -w 'android.graphics.cts/android.support.test.runner.AndroidJUnitRunner'

android.graphics.drawable.cts.InsetDrawableTest:........................

Time: 0.132

OK (26 tests)

Change-Id: Ie8d24680b6884e65017f07723a371120f5ae610c
2017-04-20 16:23:40 -07:00
Lucas Dupin
b27b47df6b Add transfer mode support to ColorDrawable
Test: runtest --path cts/tests/tests/graphics/src/android/graphics/drawable/cts/ColorDrawableTest.java
Change-Id: Ice87f248e307710315304fc191cb58ee7142e525
2017-04-20 13:57:01 -07:00
Romain Guy
fdd18cf325 Merge "Set the color space as nullptr on native bitmaps when sRGB is requested" into oc-dev am: e53b00c6d1
am: 09071f9bdf

Change-Id: I7229520e46f2ee3f0f49f0971b761b2a4a4358c1
2017-04-20 13:46:24 +00:00
Chris Craik
3eccc9b7fe Merge "Fix compose shader child local matrix mutation" into oc-dev am: 611fae13df
am: 88677af970

Change-Id: I68729ff5415f329feeabb160c0308ecbe3d8fb3f
2017-04-20 13:21:35 +00:00
Seigo Nonaka
d6c8688ca7 Merge "Add comment to Typeface.Builder about file descriptor." into oc-dev am: f3157e1692
am: 39b5ad8411

Change-Id: Ia159ba2bff5cc333e6945d05291002ab8669c612
2017-04-20 12:42:11 +00:00
Clara Bayarri
5706a1b12d Update Typeface callback docs about error codes
As requested by API council, mention that the provider may
return its own error codes within the positive int range.

Bug: 37084803
Test: none
Change-Id: Ia8ee99432cc5025a12d43049e327605095dd2b57
2017-04-20 12:02:57 +01:00
TreeHugger Robot
e53b00c6d1 Merge "Set the color space as nullptr on native bitmaps when sRGB is requested" into oc-dev 2017-04-19 21:09:46 +00:00
TreeHugger Robot
611fae13df Merge "Fix compose shader child local matrix mutation" into oc-dev 2017-04-19 20:41:06 +00:00
TreeHugger Robot
f3157e1692 Merge "Add comment to Typeface.Builder about file descriptor." into oc-dev 2017-04-19 20:08:57 +00:00
Romain Guy
08587d45b1 Set the color space as nullptr on native bitmaps when sRGB is requested
This regression is a fallout from the recent API council feedback
fallout. The default color space used to be always set to null but
it's now the named SRGB instance. This change passes null to native
when the specified color space is known to be sRGB.

Bug: 37496760
Test: runtest managed-provisioning
Change-Id: Ie933c84e429a682a58ee253b57b77bd61b88ee5e
2017-04-19 11:58:05 -07:00