Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1515)

Unified Diff: base/android/java/src/org/chromium/base/AnimationFrameTimeHistogram.java

Issue 974103002: Address NewApi lint warnings in base. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: JavaHandlerThread.stop() now works on all devices Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | base/android/java/src/org/chromium/base/JavaHandlerThread.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/android/java/src/org/chromium/base/AnimationFrameTimeHistogram.java
diff --git a/base/android/java/src/org/chromium/base/AnimationFrameTimeHistogram.java b/base/android/java/src/org/chromium/base/AnimationFrameTimeHistogram.java
index ad5cdd815bfcf81fe85952085f4f1656b04f185a..d4b0d98d19dd7bbca94a975489d1367539f0574c 100644
--- a/base/android/java/src/org/chromium/base/AnimationFrameTimeHistogram.java
+++ b/base/android/java/src/org/chromium/base/AnimationFrameTimeHistogram.java
@@ -9,6 +9,8 @@ import android.animation.Animator.AnimatorListener;
import android.animation.AnimatorListenerAdapter;
import android.animation.TimeAnimator;
import android.animation.TimeAnimator.TimeListener;
+import android.annotation.TargetApi;
+import android.os.Build;
import android.util.Log;
/**
@@ -80,6 +82,9 @@ public class AnimationFrameTimeHistogram {
/**
* Record Android animation frame rate and return the result.
*/
+ // Note: TimeAnimator was added to the Android public API in level 16, but has actually been
+ // available since level 14. So, it's safe to use TimeAnimator here, even on ICS.
+ @TargetApi(Build.VERSION_CODES.JELLY_BEAN)
private static class Recorder implements TimeListener {
// TODO(kkimlabs): If we can use in the future, migrate to Choreographer for minimal
// workload.
« no previous file with comments | « no previous file | base/android/java/src/org/chromium/base/JavaHandlerThread.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698