Added to RoundedColorDrawable
Summary: Lint is complaining that the API has been added in Honeycomb. We're already doing the correct checks when we use it but we should also add the corresponding `TargetApi` annotation.
@@ -11,6 +11,7 @@ package com.facebook.drawee.drawable;
import java.util.Arrays;
+import android.annotation.TargetApi;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.ColorFilter;
@@ -20,6 +21,7 @@ import android.graphics.Rect;
import android.graphics.RectF;
import android.graphics.drawable.ColorDrawable;
import android.graphics.drawable.Drawable;
+import android.os.Build;
import com.facebook.common.internal.Preconditions;
import com.facebook.common.internal.VisibleForTesting;
@@ -52,6 +54,7 @@ public class RoundedColorDrawable extends Drawable implements Rounded {
* @param colorDrawable color drawable to extract the color from
* @return a new RoundedColorDrawable
*/
+ @TargetApi(Build.VERSION_CODES.HONEYCOMB)
public static RoundedColorDrawable fromColorDrawable(ColorDrawable colorDrawable) {
return new RoundedColorDrawable(colorDrawable.getColor());
}
