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:
dkanada 2020-06-18 12:29:08 +09:00 committed by GitHub
commit 76e39f88b7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2,6 +2,7 @@ package com.dkanada.gramophone.util;
import android.content.Context;
import android.content.SharedPreferences;
import android.os.Build;
import android.preference.PreferenceManager;
import androidx.annotation.StyleRes;
@ -146,7 +147,8 @@ public final class PreferenceUtil {
}
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) {