History log of /frameworks/base/core/java/android/provider/FontsContract.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
ce8db9911494225fcd99711d7df85a130de5a6ce 14-Dec-2017 Jeff Sharkey <jsharkey@android.com> Add more IntDef prefixes for auto-documenting.

Test: builds, boots
Bug: 70177949
Exempt-From-Owner-Approval: annotation-only changes
Change-Id: I76dde6054e06f52240bd4b1a0f196dcb74623608
/frameworks/base/core/java/android/provider/FontsContract.java
67f9d5070a74a0bf34f0335899a96dedcac26c96 05-Aug-2017 Jeff Sharkey <jsharkey@android.com> Fix broken javadocs.

Bug: 64337634
Test: make -j32 doc-comment-check-docs
Change-Id: I20fdd3dcddef09111d35946c41c596c7689effa6
/frameworks/base/core/java/android/provider/FontsContract.java
0f07dd5b14e76695bbae758e948e00b86935232c 28-Apr-2017 Seigo Nonaka <nona@google.com> 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
/frameworks/base/core/java/android/provider/FontsContract.java
9610c695318c7e0128a22784e5faeba3b25565fb 27-Apr-2017 Seigo Nonaka <nona@google.com> Remove FontsContract.buildTypeface with weight/italic argument.

Passing weight/italic to the family does not make sense.

Bug: 37750436
Test: N/A
Change-Id: I43a624179338c1f98aad36cfd08daa152e83944c
/frameworks/base/core/java/android/provider/FontsContract.java
080b054bddee55428943b821c99887543d1fd290 26-Apr-2017 Seigo Nonaka <nona@google.com> 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
/frameworks/base/core/java/android/provider/FontsContract.java
1c661d1943338f96bda3f0e83e8fa36066b83f53 26-Apr-2017 Seigo Nonaka <nona@google.com> Merge "Load font file from remote provider synchronously." into oc-dev
57dc8328f5fb52c621d53d329fcd982b65dea360 26-Apr-2017 Seigo Nonaka <nona@google.com> Merge "Update FontsContract.requestFonts" into oc-dev
d9de8be233d18ccc881cb647a5de2b32ff3e737c 26-Apr-2017 Seigo Nonaka <nona@google.com> 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
/frameworks/base/core/java/android/provider/FontsContract.java
8ea62b036dd28231cb07beb210d361d9341c618e 26-Apr-2017 Seigo Nonaka <nona@google.com> Update FontsContract.requestFonts

- Change FontsContract.requestFont plural form to meet other method
naming convension.
- Change FontsContract.requestFonts to accept CancellationSignal to
be able to notify to remote.

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

Change-Id: I154f943eb4e7c91bff8afd86be479f72e66e5cb7
/frameworks/base/core/java/android/provider/FontsContract.java
54084b64b1860b652b1c50ba942b4cfc7fb28805 24-Apr-2017 Seigo Nonaka <nona@google.com> 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
/frameworks/base/core/java/android/provider/FontsContract.java
5a09c64345ba35783b5d24ed7c4ca0ea8afbcc0a 20-Apr-2017 Seigo Nonaka <nona@google.com> Remove Typeface.create

Test: Manually done
Bug: 37514611
Bug: 37463988
Bug: 37281200
Change-Id: Ida704af910e0ae195b96803de506fa1e1d66c9f5
/frameworks/base/core/java/android/provider/FontsContract.java
daa8dfc690c4755510ccc15da5ed5bbdd9731fa4 19-Apr-2017 Seigo Nonaka <nona@google.com> Cache the Typeface based on the FontRequest.

Bug: 37471729
Test: FontsContractE2ETest
Change-Id: Ifb1bd2b50077471404f5f1dffc01e7697d7042e6
/frameworks/base/core/java/android/provider/FontsContract.java
337be5a12fd6ef76f78da70cc1e83233788156dd 21-Apr-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Update Typeface callback docs about error codes" into oc-dev
4e45b1491a11edd85213eee1a3323505a1f7ac2e 20-Apr-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Stop fetching font data if the context is restricted." into oc-dev
5706a1b12dd891098fb7bf479623d42979171144 12-Apr-2017 Clara Bayarri <clarabayarri@google.com> 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
/frameworks/base/core/java/android/provider/FontsContract.java
7fea2e264e2e793586bb999ee80897d488e62141 20-Apr-2017 Clara Bayarri <clarabayarri@google.com> Api Council: hide FontsContract.Columns constructor

Bug: 37515256
Test: none
Change-Id: I2a9de7ea30ffa39af5104977f6604ce3bda220fb
/frameworks/base/core/java/android/provider/FontsContract.java
ebecd7e802cd65bfc5cf1d8de1e6ea031580ae79 14-Apr-2017 Seigo Nonaka <nona@google.com> Stop fetching font data if the context is restricted.

Bug: 35763094
Test: android.provider.cts.FontsContractTest passes
Change-Id: I6b1a27c2a4898966b558ff98b0023670da6769dc
/frameworks/base/core/java/android/provider/FontsContract.java
729a515e5ebcf38e3472bb8fee4e9400745c400c 13-Apr-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Introduce setFallbackTypeface" into oc-dev
5b6347a6af668ba47b3fab14cefbe03cc440c3a4 31-Mar-2017 Seigo Nonaka <nona@google.com> Introduce setFallbackTypeface

setFallbackTypeface is returned by Builder.build() method when the
provided font is not loaded due to some reasons.
The fallback family is resolved with width/italic passed to Builder.

Bug: 36794225
Test: android.graphics.cts.TypefaceTest passes
Change-Id: I65e220aca823fd815a52437b11c8e6dc952de8e2
/frameworks/base/core/java/android/provider/FontsContract.java
0b73a4287e8f630c45bf7ef0a7e0b2541d6b4067 12-Apr-2017 Seigo Nonaka <nona@google.com> Introduce FontsContract.requestFont and deprecate Typeface.create

Since background fetch should be synchronized with life cycle of
Activities, so should not create new background thread inside this
method. Not to break existing apps, mark as deprecated and will be
removed from public API untile next release.

New API accepts Handler so that the developer can pass their own thread
.

Test: TBD
Bug: 37253785
Change-Id: I87fdc6a354a829db679253824f42489f25698fa0
/frameworks/base/core/java/android/provider/FontsContract.java
69754bf66dae9d047d5a0ff2c71820aa35b9cc70 05-Apr-2017 Seigo Nonaka <nona@google.com> Introduce FontsContract.fetchFonts and expose URI for watching.

FontsContract.fetchFonts provides a low level font access with fonts
provider.
This CL also includes:
- Introduce new class FontFamilyResult/Font as the inner static class
of FontsContract which are used to for result value of fetchFont..
- Introduce a functionality to FontsContract to be able to create
Typeface from an array of FontResult.
- Expose URI of each file entries to be able to register ContentObserver

Bug: 36494487
Bug: 36085028
Test: android.provider.FontsContract passes
Test: android.graphics.cts.TypefaceTest passes
Test: android.graphics.fonts.cts.FontResultTest passes

Change-Id: Id6f85039d0e86be063ef099d7ec6bfd97e4424c5
/frameworks/base/core/java/android/provider/FontsContract.java
43c20cf6d4bd661d85bed76c78953aa656dbcc62 10-Apr-2017 Seigo Nonaka <nona@google.com> Introduce FILE_ID for TTC fonts and variation fonts.

A single TTC font or variation font can be used for multiple entry
of FontResult. To share the file contents, assign same URI for those.

Bug: 36494487
Test: android.provider.FontsContractTest passes
Change-Id: Ibf24f216179a6481dee1801cd2dfb68c4bb38fac
/frameworks/base/core/java/android/provider/FontsContract.java
fe04aa840e0682e9813e1ac4958772f898eb02ca 02-Apr-2017 Seigo Nonaka <nona@google.com> Pass weight/italic pair instead of style.

Typeface.NORMAL/BOLD/ITALIC/ITALIC_BOLD is used for specifying relative
from current Typeface. For example

Typeface face = Typeface.create("serif");
Typeface thickerFace = Typeface.create(face, Typeface.BOLD);
Typeface moreThickerFace = Typeface.create(tickerFace, Typface.BOLD);

For the purpose of providing font information, we should use weight/italic
value instead of style in Typeface.
The Columns.STYLE field was kept for preventing runtime crash of demo
apps.

Test: Manually
Change-Id: I732e8ee04a66f61321fc0a98dbfb8fdc0a4dd7a4
/frameworks/base/core/java/android/provider/FontsContract.java
fb483cc90c27a9c0fcafa28343a8fd644f8384a4 21-Feb-2017 Clara Bayarri <clarabayarri@google.com> XML Support for non system font providers

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
/frameworks/base/core/java/android/provider/FontsContract.java
ff221613ec1c328489a303491e1aa88850e4a273 15-Mar-2017 Clara Bayarri <clarabayarri@google.com> Provide ApplicationContext to Typeface for font requests

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
/frameworks/base/core/java/android/provider/FontsContract.java
bacf2352ab892724551431551ae973ae3b68db35 10-Feb-2017 Clara Bayarri <clarabayarri@google.com> Allow Font providers to return status codes

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
/frameworks/base/core/java/android/provider/FontsContract.java
3c4be77db95ea716889568bde853be082e764da9 07-Feb-2017 Clara Bayarri <clarabayarri@google.com> Support non-system Font Providers

To do this, the developer must specify the set of certificate
hashes that represent the authority's app. This allows us to
verify that the authority we find is indeed the one intended
by the developer.

Bug: 35025705
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
CTS attached to topic
Change-Id: I605f9a93bbca8705936ead08efb4a5b4fdcc4882
/frameworks/base/core/java/android/provider/FontsContract.java
b0812a30499376e09e2deb5995e998c629f24985 20-Oct-2016 Clara Bayarri <clarabayarri@google.com> Introduce Fonts Content Provider

This change exposes to developers the ability to request fonts
from a provider via Typeface.

Until further security is implemented, only system apps can
provide fonts.

Test: See topic for CTS change
Change-Id: Ic7d5e2648340ee561f4d4c2d73a673748d2af076
/frameworks/base/core/java/android/provider/FontsContract.java