Merge branch 'master' into db-refactoring
This commit is contained in:
commit
0267ddb356
|
@ -1,5 +1,6 @@
|
||||||
package nodomain.freeyourgadget.gadgetbridge;
|
package nodomain.freeyourgadget.gadgetbridge;
|
||||||
|
|
||||||
|
import android.annotation.TargetApi;
|
||||||
import android.app.Application;
|
import android.app.Application;
|
||||||
import android.app.NotificationManager;
|
import android.app.NotificationManager;
|
||||||
import android.app.NotificationManager.Policy;
|
import android.app.NotificationManager.Policy;
|
||||||
|
@ -302,6 +303,7 @@ public class GBApplication extends Application {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TargetApi(Build.VERSION_CODES.M)
|
||||||
public static boolean isPriorityNumber(int priorityType, String number) {
|
public static boolean isPriorityNumber(int priorityType, String number) {
|
||||||
NotificationManager.Policy notificationPolicy = notificationManager.getNotificationPolicy();
|
NotificationManager.Policy notificationPolicy = notificationManager.getNotificationPolicy();
|
||||||
if(priorityType == Policy.PRIORITY_CATEGORY_MESSAGES) {
|
if(priorityType == Policy.PRIORITY_CATEGORY_MESSAGES) {
|
||||||
|
@ -316,6 +318,7 @@ public class GBApplication extends Application {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TargetApi(Build.VERSION_CODES.M)
|
||||||
public static int getGrantedInterruptionFilter() {
|
public static int getGrantedInterruptionFilter() {
|
||||||
if (prefs.getBoolean("notification_filter", false) && GBApplication.isRunningMarshmallowOrLater()) {
|
if (prefs.getBoolean("notification_filter", false) && GBApplication.isRunningMarshmallowOrLater()) {
|
||||||
if (notificationManager.isNotificationPolicyAccessGranted()) {
|
if (notificationManager.isNotificationPolicyAccessGranted()) {
|
||||||
|
|
Loading…
Reference in New Issue