Merge pull request #4 from KristupasSavickas/new-notification-on-android-N-and-above
Use new notification style for Android O and above
This commit is contained in:
commit
76e39f88b7
1 changed files with 3 additions and 1 deletions
|
|
@ -2,6 +2,7 @@ package com.dkanada.gramophone.util;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.SharedPreferences;
|
import android.content.SharedPreferences;
|
||||||
|
import android.os.Build;
|
||||||
import android.preference.PreferenceManager;
|
import android.preference.PreferenceManager;
|
||||||
import androidx.annotation.StyleRes;
|
import androidx.annotation.StyleRes;
|
||||||
|
|
||||||
|
|
@ -146,7 +147,8 @@ public final class PreferenceUtil {
|
||||||
}
|
}
|
||||||
|
|
||||||
public final boolean getClassicNotification() {
|
public final boolean getClassicNotification() {
|
||||||
return mPreferences.getBoolean(CLASSIC_NOTIFICATION, true);
|
return mPreferences.getBoolean(CLASSIC_NOTIFICATION,
|
||||||
|
Build.VERSION.SDK_INT <= Build.VERSION_CODES.O);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setClassicNotification(final boolean value) {
|
public void setClassicNotification(final boolean value) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue