From 10a88921a4c17c59129d445312c629ee9eb4c96e Mon Sep 17 00:00:00 2001 From: Siyamed Sinir Date: Thu, 4 Feb 2021 19:46:58 -0800 Subject: [PATCH] Log warning for downloadable fonts Framework implementation of downloadable fonts is deprecated. Added a warning log for the usage of sync font loading on framework. Test: N/A Bug: 178589784 Change-Id: Ibb395c817c6d656ee0593712c0d6f9360e7213c1 --- core/java/android/provider/FontsContract.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/java/android/provider/FontsContract.java b/core/java/android/provider/FontsContract.java index faa90d93719f2..86b20c4248695 100644 --- a/core/java/android/provider/FontsContract.java +++ b/core/java/android/provider/FontsContract.java @@ -350,6 +350,9 @@ public class FontsContract { return cachedTypeface; } + Log.w(TAG, "Platform version of downloadable fonts is deprecated. Please use" + + " androidx version instead."); + synchronized (sLock) { // It is possible that Font is loaded during the thread sleep time // re-check the cache to avoid re-loading the font