From 97b1d50f825f56e7e24dade8489b6c2acf598eb2 Mon Sep 17 00:00:00 2001 From: Haoyu Zhang Date: Wed, 6 Feb 2019 13:51:58 -0800 Subject: [PATCH] Add maxTargetSDK equals P for UnsupportedAppUsage of sCached We figured out this non-SDK API is mainly used for a previous memory workaround. Since the bug was fixed, this API is not allowed to access. Bug: 123768439 Test: N/A Change-Id: Ib04bf7e630aee0896c8432aa9c5b794440ea7a2d --- core/java/android/text/TextLine.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/java/android/text/TextLine.java b/core/java/android/text/TextLine.java index 949328fd3a990..915a18e59226c 100644 --- a/core/java/android/text/TextLine.java +++ b/core/java/android/text/TextLine.java @@ -94,7 +94,8 @@ public class TextLine { private final DecorationInfo mDecorationInfo = new DecorationInfo(); private final ArrayList mDecorations = new ArrayList<>(); - @UnsupportedAppUsage + /** Not allowed to access. If it's for memory leak workaround, it was already fixed M. */ + @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P) private static final TextLine[] sCached = new TextLine[3]; /**