summaryrefslogtreecommitdiff
path: root/core/java/android/util/TimeUtils.java
diff options
context:
space:
mode:
authorMathew Inwood <mathewi@google.com>2018-12-20 15:30:45 +0000
committerMathew Inwood <mathewi@google.com>2018-12-28 14:26:35 +0000
commit55418eada51d4f5e6532ae9517af66c50ea495c4 (patch)
treeb93b0483b4ba377e1b4b79d344932fdf78d17de5 /core/java/android/util/TimeUtils.java
parentcfc6518c48d1648bb33a0f6633132a726a9bc7f9 (diff)
Limit access to suspected false positives.
Members modified herein are suspected to be false positives: i.e. things that were added to the greylist in P, but subsequent data analysis suggests that they are not, in fact, used after all. Add a maxTargetSdk=P to these APIs. This is lower-risk that simply removing these things from the greylist, as none of out data sources are perfect nor complete. For APIs that are not supported yet by annotations, move them to hiddenapi-greylist-max-p.txt instead which has the same effect. Exempted-From-Owner-Approval: Automatic changes to the codebase affecting only @UnsupportedAppUsage annotations, themselves added without requiring owners approval earlier. Bug: 115609023 Test: m Change-Id: Ia937d8c41512e7f1b6e7f67b9104c1878b5cc3a0 Merged-In: I020a9c09672ebcae64c5357abc4993e07e744687
Diffstat (limited to 'core/java/android/util/TimeUtils.java')
-rw-r--r--core/java/android/util/TimeUtils.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/core/java/android/util/TimeUtils.java b/core/java/android/util/TimeUtils.java
index 57d55bf31375..91bc3eb5f83a 100644
--- a/core/java/android/util/TimeUtils.java
+++ b/core/java/android/util/TimeUtils.java
@@ -19,6 +19,7 @@ package android.util;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.UnsupportedAppUsage;
+import android.os.Build;
import android.os.SystemClock;
import libcore.timezone.CountryTimeZones;
@@ -289,7 +290,7 @@ public class TimeUtils {
}
/** @hide Just for debugging; not internationalized. */
- @UnsupportedAppUsage
+ @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P, trackingBug = 115609023)
public static void formatDuration(long duration, PrintWriter pw, int fieldLen) {
synchronized (sFormatSync) {
int len = formatDurationLocked(duration, fieldLen);
@@ -306,7 +307,7 @@ public class TimeUtils {
}
/** @hide Just for debugging; not internationalized. */
- @UnsupportedAppUsage
+ @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P, trackingBug = 115609023)
public static void formatDuration(long duration, PrintWriter pw) {
formatDuration(duration, pw, 0);
}