From 8261a184721c58366bc9f0a00487d585ff45fb27 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Fri, 20 Dec 2019 10:54:25 +0100 Subject: Use RequiresApi instead of TargetApi Signed-off-by: Jason A. Donenfeld --- app/src/main/java/com/wireguard/android/QuickTileService.java | 4 ++-- app/src/main/java/com/wireguard/android/widget/SlashDrawable.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'app/src/main/java/com/wireguard') diff --git a/app/src/main/java/com/wireguard/android/QuickTileService.java b/app/src/main/java/com/wireguard/android/QuickTileService.java index c6a01636..d296a88c 100644 --- a/app/src/main/java/com/wireguard/android/QuickTileService.java +++ b/app/src/main/java/com/wireguard/android/QuickTileService.java @@ -5,7 +5,6 @@ package com.wireguard.android; -import android.annotation.TargetApi; import android.content.Intent; import androidx.databinding.Observable; import androidx.databinding.Observable.OnPropertyChangedCallback; @@ -17,6 +16,7 @@ import android.os.IBinder; import android.service.quicksettings.Tile; import android.service.quicksettings.TileService; import androidx.annotation.Nullable; +import androidx.annotation.RequiresApi; import android.util.Log; import android.widget.Toast; @@ -34,7 +34,7 @@ import java.util.Objects; * forward click events to the application. */ -@TargetApi(Build.VERSION_CODES.N) +@RequiresApi(Build.VERSION_CODES.N) public class QuickTileService extends TileService { private static final String TAG = "WireGuard/" + QuickTileService.class.getSimpleName(); diff --git a/app/src/main/java/com/wireguard/android/widget/SlashDrawable.java b/app/src/main/java/com/wireguard/android/widget/SlashDrawable.java index 9fddbe6f..e020aa81 100644 --- a/app/src/main/java/com/wireguard/android/widget/SlashDrawable.java +++ b/app/src/main/java/com/wireguard/android/widget/SlashDrawable.java @@ -8,7 +8,6 @@ package com.wireguard.android.widget; import android.animation.ObjectAnimator; import android.animation.ValueAnimator; -import android.annotation.TargetApi; import android.content.res.ColorStateList; import android.graphics.Canvas; import android.graphics.ColorFilter; @@ -26,9 +25,10 @@ import android.os.Build; import androidx.annotation.ColorInt; import androidx.annotation.IntRange; import androidx.annotation.Nullable; +import androidx.annotation.RequiresApi; import android.util.FloatProperty; -@TargetApi(Build.VERSION_CODES.N) +@RequiresApi(Build.VERSION_CODES.N) public class SlashDrawable extends Drawable { private static final float CENTER_X = 10.65f; -- cgit v1.2.3