From 400ae2bc3b9914b92a2b5dc6ae2e7848f0f0bc71 Mon Sep 17 00:00:00 2001 From: cpfeiffer Date: Fri, 20 May 2016 21:49:25 +0200 Subject: [PATCH] Fix lint warnings using @TargetApi --- .../nodomain/freeyourgadget/gadgetbridge/GBApplication.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/GBApplication.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/GBApplication.java index e1aa01a27..6e5043fa8 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/GBApplication.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/GBApplication.java @@ -1,5 +1,6 @@ package nodomain.freeyourgadget.gadgetbridge; +import android.annotation.TargetApi; import android.app.Application; import android.app.NotificationManager; import android.app.NotificationManager.Policy; @@ -289,6 +290,7 @@ public class GBApplication extends Application { } } + @TargetApi(Build.VERSION_CODES.M) public static boolean isPriorityNumber(int priorityType, String number) { NotificationManager.Policy notificationPolicy = notificationManager.getNotificationPolicy(); if(priorityType == Policy.PRIORITY_CATEGORY_MESSAGES) { @@ -303,6 +305,7 @@ public class GBApplication extends Application { return false; } + @TargetApi(Build.VERSION_CODES.M) public static int getGrantedInterruptionFilter() { if (prefs.getBoolean("notification_filter", false) && GBApplication.isRunningMarshmallowOrLater()) { if (notificationManager.isNotificationPolicyAccessGranted()) {