diff --git a/app/src/main/java/net/nullsum/audinaut/activity/SubsonicActivity.java b/app/src/main/java/net/nullsum/audinaut/activity/SubsonicActivity.java index 33fe394..f687a68 100644 --- a/app/src/main/java/net/nullsum/audinaut/activity/SubsonicActivity.java +++ b/app/src/main/java/net/nullsum/audinaut/activity/SubsonicActivity.java @@ -24,6 +24,7 @@ import android.content.SharedPreferences; import android.content.pm.PackageInfo; import android.content.pm.PackageManager; import android.media.AudioManager; +import android.os.Build; import android.os.Bundle; import android.os.Environment; import android.os.Handler; @@ -85,7 +86,13 @@ public class SubsonicActivity extends AppCompatActivity implements OnItemSelecte private static ImageLoader IMAGE_LOADER; static { - AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_AUTO); + // If Android Pie or older, set night mode by system clock + if (Build.VERSION.SDK_INT<29) { + AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_AUTO); + } else { + // Else, for Android 10+, follow system dark mode setting + AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_FOLLOW_SYSTEM); + } } final List backStack = new ArrayList<>(); diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index de4dfa7..25ca90c 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -162,8 +162,8 @@ Light Dark Black - Day/Night - Day/Black Night + Dynamic (Light/Dark) + Dynamic (Light/Black) Fullscreen Hide as many UI elements as Android will allow Display Track #