From a8ff111a31cafb8b8d9353d422b91873aab8bba3 Mon Sep 17 00:00:00 2001 From: massyas Date: Sun, 13 Sep 2020 23:44:48 +0200 Subject: [PATCH 01/30] Fix wrong french translation --- app/src/main/res/values-fr/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml index 5c576865e..50909e1e1 100644 --- a/app/src/main/res/values-fr/strings.xml +++ b/app/src/main/res/values-fr/strings.xml @@ -8,7 +8,7 @@ Jouer Jouer au hasard Suivant - Précédent + Jouer en dernier Mettre en cache Mettre en cache permanent Supprimer From e9b82d2c36cd4f546c30b5964d762972f920042a Mon Sep 17 00:00:00 2001 From: avm99963 Date: Tue, 15 Sep 2020 20:29:42 +0200 Subject: [PATCH 02/30] Add the option to display MediaStyle notifications Android now has the capability of displaying MediaStyle notifications which are better aligned with the Material Design standards and blend better into the OS than custom notifications. This commit adds an option in the Playback section to show notifications using the MediaStyle style. --- .../dsub/service/DownloadService.java | 10 +- .../daneren2005/dsub/util/Constants.java | 1 + .../daneren2005/dsub/util/Notifications.java | 178 ++++++++++++------ .../drawable/ic_baseline_fast_forward_32.xml | 5 + .../drawable/ic_baseline_fast_rewind_32.xml | 5 + .../res/drawable/ic_baseline_pause_48.xml | 5 + .../res/drawable/ic_baseline_pause_64.xml | 5 + .../drawable/ic_baseline_play_arrow_48.xml | 5 + .../drawable/ic_baseline_play_arrow_64.xml | 5 + .../res/drawable/ic_baseline_skip_next_32.xml | 5 + .../drawable/ic_baseline_skip_previous_32.xml | 5 + app/src/main/res/values-es/strings.xml | 2 + app/src/main/res/values/strings.xml | 2 + app/src/main/res/xml/settings_playback.xml | 6 + 14 files changed, 180 insertions(+), 59 deletions(-) create mode 100644 app/src/main/res/drawable/ic_baseline_fast_forward_32.xml create mode 100644 app/src/main/res/drawable/ic_baseline_fast_rewind_32.xml create mode 100644 app/src/main/res/drawable/ic_baseline_pause_48.xml create mode 100644 app/src/main/res/drawable/ic_baseline_pause_64.xml create mode 100644 app/src/main/res/drawable/ic_baseline_play_arrow_48.xml create mode 100644 app/src/main/res/drawable/ic_baseline_play_arrow_64.xml create mode 100644 app/src/main/res/drawable/ic_baseline_skip_next_32.xml create mode 100644 app/src/main/res/drawable/ic_baseline_skip_previous_32.xml diff --git a/app/src/main/java/github/daneren2005/dsub/service/DownloadService.java b/app/src/main/java/github/daneren2005/dsub/service/DownloadService.java index e90969007..5c077b1ea 100644 --- a/app/src/main/java/github/daneren2005/dsub/service/DownloadService.java +++ b/app/src/main/java/github/daneren2005/dsub/service/DownloadService.java @@ -1519,12 +1519,14 @@ public synchronized void setPlayerState(final PlayerState playerState) { Util.requestAudioFocus(this, audioManager); } + SharedPreferences prefs = Util.getPreferences(this); + boolean usingMediaStyleNotification = prefs.getBoolean(Constants.PREFERENCES_KEY_MEDIA_STYLE_NOTIFICATION, false) && Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP; + if (show) { - Notifications.showPlayingNotification(this, this, handler, currentPlaying.getSong()); + Notifications.showPlayingNotification(this, this, handler, currentPlaying.getSong(), usingMediaStyleNotification); } else if (pause) { - SharedPreferences prefs = Util.getPreferences(this); - if(prefs.getBoolean(Constants.PREFERENCES_KEY_PERSISTENT_NOTIFICATION, false)) { - Notifications.showPlayingNotification(this, this, handler, currentPlaying.getSong()); + if (prefs.getBoolean(Constants.PREFERENCES_KEY_PERSISTENT_NOTIFICATION, false) || usingMediaStyleNotification) { + Notifications.showPlayingNotification(this, this, handler, currentPlaying.getSong(), usingMediaStyleNotification); } else { Notifications.hidePlayingNotification(this, this, handler); } diff --git a/app/src/main/java/github/daneren2005/dsub/util/Constants.java b/app/src/main/java/github/daneren2005/dsub/util/Constants.java index 017ba2f37..933f531f7 100644 --- a/app/src/main/java/github/daneren2005/dsub/util/Constants.java +++ b/app/src/main/java/github/daneren2005/dsub/util/Constants.java @@ -117,6 +117,7 @@ public final class Constants { public static final String PREFERENCES_EQUALIZER_ON = "equalizerOn"; public static final String PREFERENCES_EQUALIZER_SETTINGS = "equalizerSettings"; public static final String PREFERENCES_KEY_PERSISTENT_NOTIFICATION = "persistentNotification"; + public static final String PREFERENCES_KEY_MEDIA_STYLE_NOTIFICATION = "mediaStyleNotification"; public static final String PREFERENCES_KEY_GAPLESS_PLAYBACK = "gaplessPlayback"; public static final String PREFERENCES_KEY_REMOVE_PLAYED = "removePlayed"; public static final String PREFERENCES_KEY_KEEP_PLAYED_CNT = "keepPlayedCount"; diff --git a/app/src/main/java/github/daneren2005/dsub/util/Notifications.java b/app/src/main/java/github/daneren2005/dsub/util/Notifications.java index a8f7add0a..35ab505da 100644 --- a/app/src/main/java/github/daneren2005/dsub/util/Notifications.java +++ b/app/src/main/java/github/daneren2005/dsub/util/Notifications.java @@ -43,6 +43,7 @@ import github.daneren2005.dsub.provider.DSubWidgetProvider; import github.daneren2005.dsub.service.DownloadFile; import github.daneren2005.dsub.service.DownloadService; +import github.daneren2005.dsub.util.compat.RemoteControlClientLP; import github.daneren2005.dsub.view.UpdateView; public final class Notifications { @@ -65,43 +66,89 @@ public final class Notifications { private final static Pair NOTIFICATION_TEXT_COLORS = new Pair(); - public static void showPlayingNotification(final Context context, final DownloadService downloadService, final Handler handler, MusicDirectory.Entry song) { + public static void showPlayingNotification(final Context context, final DownloadService downloadService, final Handler handler, MusicDirectory.Entry song, boolean usingMediaStyleNotification) { if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { getPlayingNotificationChannel(context); } - // Set the icon, scrolling text and timestamp - final Notification notification = new NotificationCompat.Builder(context) - .setSmallIcon(R.drawable.stat_notify_playing) - .setTicker(song.getTitle()) - .setWhen(System.currentTimeMillis()) - .setChannelId("now-playing-channel") - .build(); + final Notification notification; final boolean playing = downloadService.getPlayerState() == PlayerState.STARTED; - if(playing) { - notification.flags |= Notification.FLAG_NO_CLEAR | Notification.FLAG_ONGOING_EVENT; - } + boolean remote = downloadService.isRemoteEnabled(); boolean isSingle = downloadService.isCurrentPlayingSingle(); boolean shouldFastForward = downloadService.shouldFastForward(); - if (Build.VERSION.SDK_INT>= Build.VERSION_CODES.JELLY_BEAN){ - RemoteViews expandedContentView = new RemoteViews(context.getPackageName(), R.layout.notification_expanded); - setupViews(expandedContentView ,context, song, true, playing, remote, isSingle, shouldFastForward); - notification.bigContentView = expandedContentView; - notification.priority = Notification.PRIORITY_HIGH; - } - if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { - notification.visibility = Notification.VISIBILITY_PUBLIC; - if(Util.getPreferences(context).getBoolean(Constants.PREFERENCES_KEY_HEADS_UP_NOTIFICATION, false) && !UpdateView.hasActiveActivity()) { - notification.vibrate = new long[0]; + if (usingMediaStyleNotification) { + RemoteControlClientLP remoteControlClient = (RemoteControlClientLP) downloadService.getRemoteControlClient(); + + android.support.v4.media.app.NotificationCompat.MediaStyle mediaStyle = new android.support.v4.media.app.NotificationCompat.MediaStyle() + .setMediaSession(remoteControlClient.getMediaSession().getSessionToken()); + + if (isSingle) { + mediaStyle.setShowActionsInCompactView(1); + } else { + mediaStyle.setShowActionsInCompactView(0, 2, 4); + } + + NotificationCompat.Builder notificationBuilder = new NotificationCompat.Builder(context, "now-playing-channel") + .setSmallIcon(R.drawable.stat_notify_playing) + .setStyle(mediaStyle); + + PendingIntent prevIntent = null; + PendingIntent nextIntent = null; + if (!isSingle) { + prevIntent = getMediaPendingIntent("KEYCODE_MEDIA_PREVIOUS", context); + nextIntent = getMediaPendingIntent("KEYCODE_MEDIA_NEXT", context); + } + + PendingIntent rewindIntent = getMediaPendingIntent("KEYCODE_MEDIA_REWIND", context); + PendingIntent playIntent = getMediaPendingIntent(playing ? "KEYCODE_MEDIA_PLAY_PAUSE" : "KEYCODE_MEDIA_START", context); + PendingIntent forwardIntent = getMediaPendingIntent("KEYCODE_MEDIA_FAST_FORWARD", context); + + if (!isSingle) { + notificationBuilder.addAction(R.drawable.ic_baseline_skip_previous_32, "Previous", prevIntent); + } + + notificationBuilder.addAction(R.drawable.ic_baseline_fast_rewind_32, "Rewind", rewindIntent); + notificationBuilder.addAction(playing ? R.drawable.ic_baseline_pause_48 : R.drawable.ic_baseline_play_arrow_48, playing ? "Pause" : "Play", playIntent); + notificationBuilder.addAction(R.drawable.ic_baseline_fast_forward_32, "Forward", forwardIntent); + + if (!isSingle) { + notificationBuilder.addAction(R.drawable.ic_baseline_skip_next_32, "Next", nextIntent); + } + + notification = notificationBuilder.build(); + } else { + // Set the icon, scrolling text and timestamp + notification = new NotificationCompat.Builder(context, "now-playing-channel") + .setSmallIcon(R.drawable.stat_notify_playing) + .setTicker(song.getTitle()) + .setWhen(System.currentTimeMillis()) + .build(); + + if(playing) { + notification.flags |= Notification.FLAG_NO_CLEAR | Notification.FLAG_ONGOING_EVENT; + } + + if (Build.VERSION.SDK_INT>= Build.VERSION_CODES.JELLY_BEAN){ + RemoteViews expandedContentView = new RemoteViews(context.getPackageName(), R.layout.notification_expanded); + setupViews(expandedContentView, context, song, true, playing, remote, isSingle, shouldFastForward); + notification.bigContentView = expandedContentView; + notification.priority = Notification.PRIORITY_HIGH; + } + if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { + notification.visibility = Notification.VISIBILITY_PUBLIC; + + if(Util.getPreferences(context).getBoolean(Constants.PREFERENCES_KEY_HEADS_UP_NOTIFICATION, false) && !UpdateView.hasActiveActivity()) { + notification.vibrate = new long[0]; + } } - } - RemoteViews smallContentView = new RemoteViews(context.getPackageName(), R.layout.notification); - setupViews(smallContentView, context, song, false, playing, remote, isSingle, shouldFastForward); - notification.contentView = smallContentView; + RemoteViews smallContentView = new RemoteViews(context.getPackageName(), R.layout.notification); + setupViews(smallContentView, context, song, false, playing, remote, isSingle, shouldFastForward); + notification.contentView = smallContentView; + } Intent notificationIntent = new Intent(context, SubsonicFragmentActivity.class); notificationIntent.putExtra(Constants.INTENT_EXTRA_NAME_DOWNLOAD, true); @@ -154,10 +201,52 @@ public void run() { DSubWidgetProvider.notifyInstances(context, downloadService, playing); } + private static PendingIntent getMediaPendingIntent(String action, Context context) { + Intent intent = new Intent(action); + intent.setComponent(new ComponentName(context, DownloadService.class)); + + int keyCode = 0; + switch (action) { + case "KEYCODE_MEDIA_PREVIOUS": + keyCode = KeyEvent.KEYCODE_MEDIA_PREVIOUS; + break; + + case "KEYCODE_MEDIA_REWIND": + keyCode = KeyEvent.KEYCODE_MEDIA_REWIND; + break; + + case "KEYCODE_MEDIA_PLAY_PAUSE": + keyCode = KeyEvent.KEYCODE_MEDIA_PLAY_PAUSE; + break; + + case "KEYCODE_MEDIA_START": + keyCode = KeyEvent.KEYCODE_MEDIA_PLAY; + break; + + case "KEYCODE_MEDIA_NEXT": + keyCode = KeyEvent.KEYCODE_MEDIA_NEXT; + break; + + case "KEYCODE_MEDIA_FAST_FORWARD": + keyCode = KeyEvent.KEYCODE_MEDIA_FAST_FORWARD; + break; + + case "KEYCODE_MEDIA_STOP": + keyCode = KeyEvent.KEYCODE_MEDIA_STOP; + break; + } + + if (keyCode != 0) { + intent.putExtra(Intent.EXTRA_KEY_EVENT, new KeyEvent(KeyEvent.ACTION_UP, keyCode)); + } + + return PendingIntent.getService(context, 0, intent, 0); + } + private static void setupViews(RemoteViews rv, Context context, MusicDirectory.Entry song, boolean expanded, boolean playing, boolean remote, boolean isSingleFile, boolean shouldFastForward) { // Use the same text for the ticker and the expanded notification String title = song.getTitle(); - String arist = song.getArtist(); + String artist = song.getArtist(); String album = song.getAlbum(); // Set the album art. @@ -181,7 +270,7 @@ private static void setupViews(RemoteViews rv, Context context, MusicDirectory.E // set the text for the notifications rv.setTextViewText(R.id.notification_title, title); - rv.setTextViewText(R.id.notification_artist, arist); + rv.setTextViewText(R.id.notification_artist, artist); rv.setTextViewText(R.id.notification_album, album); boolean persistent = Util.getPreferences(context).getBoolean(Constants.PREFERENCES_KEY_PERSISTENT_NOTIFICATION, false); @@ -276,53 +365,32 @@ private static void setupViews(RemoteViews rv, Context context, MusicDirectory.E PendingIntent pendingIntent; if(previous > 0) { - Intent prevIntent = new Intent("KEYCODE_MEDIA_PREVIOUS"); - prevIntent.setComponent(new ComponentName(context, DownloadService.class)); - prevIntent.putExtra(Intent.EXTRA_KEY_EVENT, new KeyEvent(KeyEvent.ACTION_UP, KeyEvent.KEYCODE_MEDIA_PREVIOUS)); - pendingIntent = PendingIntent.getService(context, 0, prevIntent, 0); + pendingIntent = getMediaPendingIntent("KEYCODE_MEDIA_PREVIOUS", context); rv.setOnClickPendingIntent(previous, pendingIntent); } if(rewind > 0) { - Intent rewindIntent = new Intent("KEYCODE_MEDIA_REWIND"); - rewindIntent.setComponent(new ComponentName(context, DownloadService.class)); - rewindIntent.putExtra(Intent.EXTRA_KEY_EVENT, new KeyEvent(KeyEvent.ACTION_UP, KeyEvent.KEYCODE_MEDIA_REWIND)); - pendingIntent = PendingIntent.getService(context, 0, rewindIntent, 0); + pendingIntent = getMediaPendingIntent("KEYCODE_MEDIA_REWIND", context); rv.setOnClickPendingIntent(rewind, pendingIntent); } if(pause > 0) { if(playing) { - Intent pauseIntent = new Intent("KEYCODE_MEDIA_PLAY_PAUSE"); - pauseIntent.setComponent(new ComponentName(context, DownloadService.class)); - pauseIntent.putExtra(Intent.EXTRA_KEY_EVENT, new KeyEvent(KeyEvent.ACTION_UP, KeyEvent.KEYCODE_MEDIA_PLAY_PAUSE)); - pendingIntent = PendingIntent.getService(context, 0, pauseIntent, 0); + pendingIntent = getMediaPendingIntent("KEYCODE_MEDIA_PLAY_PAUSE", context); rv.setOnClickPendingIntent(pause, pendingIntent); } else { - Intent prevIntent = new Intent("KEYCODE_MEDIA_START"); - prevIntent.setComponent(new ComponentName(context, DownloadService.class)); - prevIntent.putExtra(Intent.EXTRA_KEY_EVENT, new KeyEvent(KeyEvent.ACTION_UP, KeyEvent.KEYCODE_MEDIA_PLAY)); - pendingIntent = PendingIntent.getService(context, 0, prevIntent, 0); + pendingIntent = getMediaPendingIntent("KEYCODE_MEDIA_START", context); rv.setOnClickPendingIntent(pause, pendingIntent); } } if(next > 0) { - Intent nextIntent = new Intent("KEYCODE_MEDIA_NEXT"); - nextIntent.setComponent(new ComponentName(context, DownloadService.class)); - nextIntent.putExtra(Intent.EXTRA_KEY_EVENT, new KeyEvent(KeyEvent.ACTION_UP, KeyEvent.KEYCODE_MEDIA_NEXT)); - pendingIntent = PendingIntent.getService(context, 0, nextIntent, 0); + pendingIntent = getMediaPendingIntent("KEYCODE_MEDIA_NEXT", context); rv.setOnClickPendingIntent(next, pendingIntent); } if(fastForward > 0) { - Intent fastForwardIntent = new Intent("KEYCODE_MEDIA_FAST_FORWARD"); - fastForwardIntent.setComponent(new ComponentName(context, DownloadService.class)); - fastForwardIntent.putExtra(Intent.EXTRA_KEY_EVENT, new KeyEvent(KeyEvent.ACTION_UP, KeyEvent.KEYCODE_MEDIA_FAST_FORWARD)); - pendingIntent = PendingIntent.getService(context, 0, fastForwardIntent, 0); + pendingIntent = getMediaPendingIntent("KEYCODE_MEDIA_FAST_FORWARD", context); rv.setOnClickPendingIntent(fastForward, pendingIntent); } if(close > 0) { - Intent prevIntent = new Intent("KEYCODE_MEDIA_STOP"); - prevIntent.setComponent(new ComponentName(context, DownloadService.class)); - prevIntent.putExtra(Intent.EXTRA_KEY_EVENT, new KeyEvent(KeyEvent.ACTION_UP, KeyEvent.KEYCODE_MEDIA_STOP)); - pendingIntent = PendingIntent.getService(context, 0, prevIntent, 0); + pendingIntent = getMediaPendingIntent("KEYCODE_MEDIA_STOP", context); rv.setOnClickPendingIntent(close, pendingIntent); } } diff --git a/app/src/main/res/drawable/ic_baseline_fast_forward_32.xml b/app/src/main/res/drawable/ic_baseline_fast_forward_32.xml new file mode 100644 index 000000000..2ed771186 --- /dev/null +++ b/app/src/main/res/drawable/ic_baseline_fast_forward_32.xml @@ -0,0 +1,5 @@ + + + diff --git a/app/src/main/res/drawable/ic_baseline_fast_rewind_32.xml b/app/src/main/res/drawable/ic_baseline_fast_rewind_32.xml new file mode 100644 index 000000000..d25463685 --- /dev/null +++ b/app/src/main/res/drawable/ic_baseline_fast_rewind_32.xml @@ -0,0 +1,5 @@ + + + diff --git a/app/src/main/res/drawable/ic_baseline_pause_48.xml b/app/src/main/res/drawable/ic_baseline_pause_48.xml new file mode 100644 index 000000000..8d5e417e9 --- /dev/null +++ b/app/src/main/res/drawable/ic_baseline_pause_48.xml @@ -0,0 +1,5 @@ + + + diff --git a/app/src/main/res/drawable/ic_baseline_pause_64.xml b/app/src/main/res/drawable/ic_baseline_pause_64.xml new file mode 100644 index 000000000..8de9e59e9 --- /dev/null +++ b/app/src/main/res/drawable/ic_baseline_pause_64.xml @@ -0,0 +1,5 @@ + + + diff --git a/app/src/main/res/drawable/ic_baseline_play_arrow_48.xml b/app/src/main/res/drawable/ic_baseline_play_arrow_48.xml new file mode 100644 index 000000000..c775d2c09 --- /dev/null +++ b/app/src/main/res/drawable/ic_baseline_play_arrow_48.xml @@ -0,0 +1,5 @@ + + + diff --git a/app/src/main/res/drawable/ic_baseline_play_arrow_64.xml b/app/src/main/res/drawable/ic_baseline_play_arrow_64.xml new file mode 100644 index 000000000..f42648b89 --- /dev/null +++ b/app/src/main/res/drawable/ic_baseline_play_arrow_64.xml @@ -0,0 +1,5 @@ + + + diff --git a/app/src/main/res/drawable/ic_baseline_skip_next_32.xml b/app/src/main/res/drawable/ic_baseline_skip_next_32.xml new file mode 100644 index 000000000..23a02ee02 --- /dev/null +++ b/app/src/main/res/drawable/ic_baseline_skip_next_32.xml @@ -0,0 +1,5 @@ + + + diff --git a/app/src/main/res/drawable/ic_baseline_skip_previous_32.xml b/app/src/main/res/drawable/ic_baseline_skip_previous_32.xml new file mode 100644 index 000000000..e01d66665 --- /dev/null +++ b/app/src/main/res/drawable/ic_baseline_skip_previous_32.xml @@ -0,0 +1,5 @@ + + + diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml index a5273a508..9076cf783 100644 --- a/app/src/main/res/values-es/strings.xml +++ b/app/src/main/res/values-es/strings.xml @@ -403,6 +403,8 @@ Tags de pistas Abrir en pestaña Abrir directamente a esta pestaña + Notificaciones nativas multimedia de Android (5.0+) + Mostrar las notificaciones de reproducción como notificaciones de estilo multimedia nativas (solo en Android Lollipop y superior) Expira: %s Nunca expira diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index be1a7bfff..17e96487c 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -495,6 +495,8 @@ If you are having battery drain problems on Android 7.0 try turning this off Rewind Interval Fast Forward Interval + Native Android media notification (5.0+) + Show playing notifications as native media style notifications (Android Lollipop+ only) Shuffle By Start Year: diff --git a/app/src/main/res/xml/settings_playback.xml b/app/src/main/res/xml/settings_playback.xml index fb3501f0c..f2e76b4c0 100644 --- a/app/src/main/res/xml/settings_playback.xml +++ b/app/src/main/res/xml/settings_playback.xml @@ -46,6 +46,12 @@ android:key="headsUpNotification" android:defaultValue="false"/> + + Date: Mon, 21 Sep 2020 20:05:33 -0700 Subject: [PATCH 03/30] Add releases to ignore list --- .gitignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 4838c7c33..8dc679d0d 100644 --- a/.gitignore +++ b/.gitignore @@ -13,4 +13,5 @@ proguard_logs/ .gradle/* /build/ local.properties -*Thumbs.db \ No newline at end of file +*Thumbs.db +app/google/release \ No newline at end of file From ed4e42af3f276a5bc9d8f248cb5dc29ea255b6aa Mon Sep 17 00:00:00 2001 From: Scott Jackson Date: Mon, 21 Sep 2020 20:05:53 -0700 Subject: [PATCH 04/30] Fix error with referencing white in vector drawables --- app/build.gradle | 1 + 1 file changed, 1 insertion(+) diff --git a/app/build.gradle b/app/build.gradle index 78351890a..1edbc5e27 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -11,6 +11,7 @@ android { versionName '5.5.0' setProperty("archivesBaseName", "DSub $versionName") resConfigs "de", "es", "fr", "hu", "nl", "pt-rPT", "ru", "sv" + vectorDrawables.useSupportLibrary = true } buildTypes { release { From 788dc19ed7297eef4221423b4d077b30bc0f727e Mon Sep 17 00:00:00 2001 From: Scott Jackson Date: Mon, 21 Sep 2020 20:07:46 -0700 Subject: [PATCH 05/30] Change media notification to default to system style --- .../java/github/daneren2005/dsub/service/DownloadService.java | 2 +- app/src/main/res/xml/settings_playback.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/github/daneren2005/dsub/service/DownloadService.java b/app/src/main/java/github/daneren2005/dsub/service/DownloadService.java index 5c077b1ea..e86899b1c 100644 --- a/app/src/main/java/github/daneren2005/dsub/service/DownloadService.java +++ b/app/src/main/java/github/daneren2005/dsub/service/DownloadService.java @@ -1520,7 +1520,7 @@ public synchronized void setPlayerState(final PlayerState playerState) { } SharedPreferences prefs = Util.getPreferences(this); - boolean usingMediaStyleNotification = prefs.getBoolean(Constants.PREFERENCES_KEY_MEDIA_STYLE_NOTIFICATION, false) && Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP; + boolean usingMediaStyleNotification = prefs.getBoolean(Constants.PREFERENCES_KEY_MEDIA_STYLE_NOTIFICATION, true) && Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP; if (show) { Notifications.showPlayingNotification(this, this, handler, currentPlaying.getSong(), usingMediaStyleNotification); diff --git a/app/src/main/res/xml/settings_playback.xml b/app/src/main/res/xml/settings_playback.xml index f2e76b4c0..fd6a7dda5 100644 --- a/app/src/main/res/xml/settings_playback.xml +++ b/app/src/main/res/xml/settings_playback.xml @@ -50,7 +50,7 @@ android:title="@string/settings.media_style_notification" android:summary="@string/settings.media_style_notification_summary" android:key="mediaStyleNotification" - android:defaultValue="false"/> + android:defaultValue="true"/> Date: Mon, 21 Sep 2020 20:19:44 -0700 Subject: [PATCH 06/30] Fix new media style not respecting persistent notification preference --- .../java/github/daneren2005/dsub/service/DownloadService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/github/daneren2005/dsub/service/DownloadService.java b/app/src/main/java/github/daneren2005/dsub/service/DownloadService.java index e86899b1c..aa9fcc669 100644 --- a/app/src/main/java/github/daneren2005/dsub/service/DownloadService.java +++ b/app/src/main/java/github/daneren2005/dsub/service/DownloadService.java @@ -1525,7 +1525,7 @@ public synchronized void setPlayerState(final PlayerState playerState) { if (show) { Notifications.showPlayingNotification(this, this, handler, currentPlaying.getSong(), usingMediaStyleNotification); } else if (pause) { - if (prefs.getBoolean(Constants.PREFERENCES_KEY_PERSISTENT_NOTIFICATION, false) || usingMediaStyleNotification) { + if (prefs.getBoolean(Constants.PREFERENCES_KEY_PERSISTENT_NOTIFICATION, false)) { Notifications.showPlayingNotification(this, this, handler, currentPlaying.getSong(), usingMediaStyleNotification); } else { Notifications.hidePlayingNotification(this, this, handler); From 6bb874598c5e4bfa905ef0c7023af641ced914ce Mon Sep 17 00:00:00 2001 From: Scott Jackson Date: Mon, 21 Sep 2020 20:57:45 -0700 Subject: [PATCH 07/30] Fix shut up google notification playing when pressing play from new notification --- .../java/github/daneren2005/dsub/service/DownloadService.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/github/daneren2005/dsub/service/DownloadService.java b/app/src/main/java/github/daneren2005/dsub/service/DownloadService.java index aa9fcc669..77bc25169 100644 --- a/app/src/main/java/github/daneren2005/dsub/service/DownloadService.java +++ b/app/src/main/java/github/daneren2005/dsub/service/DownloadService.java @@ -310,7 +310,9 @@ public boolean onError(MediaPlayer mediaPlayer, int what, int more) { public int onStartCommand(Intent intent, int flags, int startId) { super.onStartCommand(intent, flags, startId); lifecycleSupport.onStart(intent); - if(Build.VERSION.SDK_INT >= 26 && !this.isForeground()) { + + String action = intent.getAction(); + if(Build.VERSION.SDK_INT >= 26 && !this.isForeground() && !"KEYCODE_MEDIA_START".equals(action)) { Notifications.shutGoogleUpNotification(this); } return START_NOT_STICKY; From 7aff3fa37b186b40d2ac73508b01628b212be8eb Mon Sep 17 00:00:00 2001 From: Scott Jackson Date: Mon, 21 Sep 2020 21:02:16 -0700 Subject: [PATCH 08/30] Remove @ validation from network settings Was a PR to completely remove space and @ validation (https://github.com/daneren2005/Subsonic/pull/985), but I can see people easily pressing space without meaning to and not being able to see what is wrong. If someone makes a good reason for it to be needed I will remove it, but for now just removing @ so people can do basic auth. --- .../github/daneren2005/dsub/fragments/SettingsFragment.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/github/daneren2005/dsub/fragments/SettingsFragment.java b/app/src/main/java/github/daneren2005/dsub/fragments/SettingsFragment.java index 674ce98a4..326cebb47 100644 --- a/app/src/main/java/github/daneren2005/dsub/fragments/SettingsFragment.java +++ b/app/src/main/java/github/daneren2005/dsub/fragments/SettingsFragment.java @@ -803,7 +803,7 @@ public boolean onPreferenceChange(Preference preference, Object value) { try { String url = (String) value; new URL(url); - if (url.contains(" ") || url.contains("@")) { + if (url.contains(" ")) { throw new Exception(); } } catch (Exception x) { @@ -824,7 +824,7 @@ public boolean onPreferenceChange(Preference preference, Object value) { } new URL(url); - if (url.contains(" ") || url.contains("@")) { + if (url.contains(" ")) { throw new Exception(); } } catch (Exception x) { From 6c1104bad8b11ed57a4012d74bd79a0167801f9f Mon Sep 17 00:00:00 2001 From: Scott Jackson Date: Mon, 21 Sep 2020 21:19:10 -0700 Subject: [PATCH 09/30] Initial move to target version 28 so we can get back on the Play Store --- app/build.gradle | 2 +- app/src/main/AndroidManifest.xml | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 1edbc5e27..926e91d9f 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -6,7 +6,7 @@ android { defaultConfig { applicationId "github.daneren2005.dsub" minSdkVersion 15 - targetSdkVersion 26 + targetSdkVersion 28 versionCode 203 versionName '5.5.0' setProperty("archivesBaseName", "DSub $versionName") diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 527565343..29be4d048 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -24,6 +24,7 @@ + @@ -39,7 +40,8 @@ android:backupAgent="github.daneren2005.dsub.util.SettingsBackupAgent" android:icon="@drawable/launch" android:theme="@style/Theme.DSub.Light" - android:largeHeap="true"> + android:largeHeap="true" + android:usesCleartextTraffic="true"> From 5c569a1fbf3d07fcdc58d695c9d93da6a989a44d Mon Sep 17 00:00:00 2001 From: Scott Jackson Date: Mon, 21 Sep 2020 21:24:49 -0700 Subject: [PATCH 10/30] Create beta release that targets API 28 --- app/build.gradle | 4 ++-- app/src/main/res/xml/changelog.xml | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 926e91d9f..1756cb487 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -7,8 +7,8 @@ android { applicationId "github.daneren2005.dsub" minSdkVersion 15 targetSdkVersion 28 - versionCode 203 - versionName '5.5.0' + versionCode 204 + versionName '5.5.1' setProperty("archivesBaseName", "DSub $versionName") resConfigs "de", "es", "fr", "hu", "nl", "pt-rPT", "ru", "sv" vectorDrawables.useSupportLibrary = true diff --git a/app/src/main/res/xml/changelog.xml b/app/src/main/res/xml/changelog.xml index e8654e6f5..d7875dcd7 100644 --- a/app/src/main/res/xml/changelog.xml +++ b/app/src/main/res/xml/changelog.xml @@ -1,5 +1,10 @@ + + Update to Android 9 target level + Optionally use system default media style notification (on by default) + Fix not being able to use basic server auth with @ in network connection string + Fix saving files being broken on Android 11+ Upgrade to Android 8 target level again From aeabf68e4be9f2240bfb9133b5d9727aada419d0 Mon Sep 17 00:00:00 2001 From: Patrik Johanson Date: Sat, 26 Sep 2020 01:15:30 +0200 Subject: [PATCH 11/30] Adds a checkbox for including Authorization headers to the server settings to fix issues described in daneren2005/Subsonic#870 --- .../dsub/fragments/SettingsFragment.java | 7 +++++++ .../dsub/service/RESTMusicService.java | 15 ++++++++++----- .../github/daneren2005/dsub/util/Constants.java | 1 + .../java/github/daneren2005/dsub/util/Util.java | 5 +++++ app/src/main/res/values/strings.xml | 2 ++ 5 files changed, 25 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/github/daneren2005/dsub/fragments/SettingsFragment.java b/app/src/main/java/github/daneren2005/dsub/fragments/SettingsFragment.java index 326cebb47..1789ad15c 100644 --- a/app/src/main/java/github/daneren2005/dsub/fragments/SettingsFragment.java +++ b/app/src/main/java/github/daneren2005/dsub/fragments/SettingsFragment.java @@ -575,6 +575,12 @@ public void onClick(View v) { serverSyncPreference.setSummary(R.string.settings_server_sync_summary); serverSyncPreference.setTitle(R.string.settings_server_sync); + final CheckBoxPreference serverAuthHeaderPreference = new CheckBoxPreference(context); + serverAuthHeaderPreference.setKey(Constants.PREFERENCES_KEY_SERVER_AUTHHEADER + instance); + serverAuthHeaderPreference.setChecked(Util.isAuthHeaderEnabled(context, instance)); + serverAuthHeaderPreference.setSummary(R.string.settings_server_authheaders_summary); + serverAuthHeaderPreference.setTitle(R.string.settings_server_authheaders); + final Preference serverOpenBrowser = new Preference(context); serverOpenBrowser.setKey(Constants.PREFERENCES_KEY_OPEN_BROWSER); serverOpenBrowser.setPersistent(false); @@ -649,6 +655,7 @@ public boolean onPreferenceClick(Preference preference) { screen.addPreference(serverPasswordPreference); screen.addPreference(serverTagPreference); screen.addPreference(serverSyncPreference); + screen.addPreference(serverAuthHeaderPreference); screen.addPreference(serverTestConnectionPreference); screen.addPreference(serverOpenBrowser); screen.addPreference(serverRemoveServerPreference); diff --git a/app/src/main/java/github/daneren2005/dsub/service/RESTMusicService.java b/app/src/main/java/github/daneren2005/dsub/service/RESTMusicService.java index 100224e8c..8fdafc111 100644 --- a/app/src/main/java/github/daneren2005/dsub/service/RESTMusicService.java +++ b/app/src/main/java/github/daneren2005/dsub/service/RESTMusicService.java @@ -1911,11 +1911,16 @@ private HttpURLConnection getConnectionDirect(Context context, String url, Map= 500) { diff --git a/app/src/main/java/github/daneren2005/dsub/util/Constants.java b/app/src/main/java/github/daneren2005/dsub/util/Constants.java index 933f531f7..9e6708be7 100644 --- a/app/src/main/java/github/daneren2005/dsub/util/Constants.java +++ b/app/src/main/java/github/daneren2005/dsub/util/Constants.java @@ -85,6 +85,7 @@ public final class Constants { public static final String PREFERENCES_KEY_MUSIC_FOLDER_ID = "musicFolderId"; public static final String PREFERENCES_KEY_USERNAME = "username"; public static final String PREFERENCES_KEY_PASSWORD = "password"; + public static final String PREFERENCES_KEY_SERVER_AUTHHEADER = "authHeader"; public static final String PREFERENCES_KEY_ENCRYPTED_PASSWORD = "encryptedPassword"; public static final String PREFERENCES_KEY_INSTALL_TIME = "installTime"; public static final String PREFERENCES_KEY_THEME = "theme"; diff --git a/app/src/main/java/github/daneren2005/dsub/util/Util.java b/app/src/main/java/github/daneren2005/dsub/util/Util.java index b58a81e4d..872e95612 100644 --- a/app/src/main/java/github/daneren2005/dsub/util/Util.java +++ b/app/src/main/java/github/daneren2005/dsub/util/Util.java @@ -460,6 +460,11 @@ public static boolean isSyncEnabled(Context context, int instance) { return prefs.getBoolean(Constants.PREFERENCES_KEY_SERVER_SYNC + instance, true); } + public static boolean isAuthHeaderEnabled(Context context, int instance) { + SharedPreferences prefs = getPreferences(context); + return prefs.getBoolean(Constants.PREFERENCES_KEY_SERVER_AUTHHEADER + instance, true); + } + public static String getParentFromEntry(Context context, MusicDirectory.Entry entry) { if(Util.isTagBrowsing(context)) { if(!entry.isDirectory()) { diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 17e96487c..a3dd6af2b 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -284,6 +284,8 @@ Open in browser Whether or not syncing is enabled for this server Sync Enabled + If this is enabled the request headers will include Authorization: Basic + Authorization Basic headers Music cache Songs to preload (Wifi) Songs to preload (Mobile) From 72bef3c7ae8fd72fdba25d41df7e7c517cf50e8c Mon Sep 17 00:00:00 2001 From: Moritz Maxeiner Date: Mon, 21 Sep 2020 20:03:11 +0200 Subject: [PATCH 12/30] Use applicationId for preferences und offline sync file names --- .../main/java/github/daneren2005/dsub/util/Constants.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/github/daneren2005/dsub/util/Constants.java b/app/src/main/java/github/daneren2005/dsub/util/Constants.java index 9e6708be7..744c24690 100644 --- a/app/src/main/java/github/daneren2005/dsub/util/Constants.java +++ b/app/src/main/java/github/daneren2005/dsub/util/Constants.java @@ -18,6 +18,8 @@ */ package github.daneren2005.dsub.util; +import github.daneren2005.dsub.BuildConfig; + /** * @author Sindre Mehus * @version $Id$ @@ -214,8 +216,8 @@ public final class Constants { public static final String FRAGMENT_POSITION = "fragmentPosition"; // Name of the preferences file. - public static final String PREFERENCES_FILE_NAME = "github.daneren2005.dsub_preferences"; - public static final String OFFLINE_SYNC_NAME = "github.daneren2005.dsub.offline"; + public static final String PREFERENCES_FILE_NAME = BuildConfig.APPLICATION_ID + "_preferences"; + public static final String OFFLINE_SYNC_NAME = BuildConfig.APPLICATION_ID + ".offline"; public static final String OFFLINE_SYNC_DEFAULT = "syncDefaults"; // Account prefs From 45dfb9653cf5fcfe7ca5e3a20437aeee64b9ecb1 Mon Sep 17 00:00:00 2001 From: Moritz Maxeiner Date: Mon, 21 Sep 2020 21:02:22 +0200 Subject: [PATCH 13/30] Derive subsonic account type descriptor from applicationId --- app/build.gradle | 1 + app/src/main/java/github/daneren2005/dsub/util/Constants.java | 2 +- app/src/main/res/xml/authenticator.xml | 2 +- app/src/main/res/xml/mostrecent_syncadapter.xml | 2 +- app/src/main/res/xml/playlists_syncadapter.xml | 2 +- app/src/main/res/xml/podcasts_syncadapter.xml | 2 +- app/src/main/res/xml/starred_syncadapter.xml | 2 +- 7 files changed, 7 insertions(+), 6 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 1edbc5e27..f96f3051a 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -12,6 +12,7 @@ android { setProperty("archivesBaseName", "DSub $versionName") resConfigs "de", "es", "fr", "hu", "nl", "pt-rPT", "ru", "sv" vectorDrawables.useSupportLibrary = true + resValue 'string', 'account_type.subsonic', applicationId + ".subsonic" } buildTypes { release { diff --git a/app/src/main/java/github/daneren2005/dsub/util/Constants.java b/app/src/main/java/github/daneren2005/dsub/util/Constants.java index 744c24690..e62b93f93 100644 --- a/app/src/main/java/github/daneren2005/dsub/util/Constants.java +++ b/app/src/main/java/github/daneren2005/dsub/util/Constants.java @@ -222,7 +222,7 @@ public final class Constants { // Account prefs public static final String SYNC_ACCOUNT_NAME = "Subsonic Account"; - public static final String SYNC_ACCOUNT_TYPE = "subsonic.org"; + public static final String SYNC_ACCOUNT_TYPE = BuildConfig.APPLICATION_ID + ".subsonic"; public static final String SYNC_ACCOUNT_PLAYLIST_AUTHORITY = "github.daneren2005.dsub.playlists.provider"; public static final String SYNC_ACCOUNT_PODCAST_AUTHORITY = "github.daneren2005.dsub.podcasts.provider"; public static final String SYNC_ACCOUNT_STARRED_AUTHORITY = "github.daneren2005.dsub.starred.provider"; diff --git a/app/src/main/res/xml/authenticator.xml b/app/src/main/res/xml/authenticator.xml index 3055240be..23e4621ad 100644 --- a/app/src/main/res/xml/authenticator.xml +++ b/app/src/main/res/xml/authenticator.xml @@ -1,7 +1,7 @@ \ No newline at end of file diff --git a/app/src/main/res/xml/mostrecent_syncadapter.xml b/app/src/main/res/xml/mostrecent_syncadapter.xml index 0195edebb..8c6dada2d 100644 --- a/app/src/main/res/xml/mostrecent_syncadapter.xml +++ b/app/src/main/res/xml/mostrecent_syncadapter.xml @@ -1,7 +1,7 @@ Date: Mon, 21 Sep 2020 22:04:51 +0200 Subject: [PATCH 14/30] Derive provider descriptors from applicationId --- app/build.gradle | 5 +++++ app/src/main/AndroidManifest.xml | 10 +++++----- .../java/github/daneren2005/dsub/util/Constants.java | 8 ++++---- app/src/main/res/xml/mostrecent_syncadapter.xml | 2 +- app/src/main/res/xml/playlists_syncadapter.xml | 2 +- app/src/main/res/xml/podcasts_syncadapter.xml | 2 +- app/src/main/res/xml/searchable.xml | 2 +- app/src/main/res/xml/starred_syncadapter.xml | 2 +- 8 files changed, 19 insertions(+), 14 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index f96f3051a..38401e633 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -13,6 +13,11 @@ android { resConfigs "de", "es", "fr", "hu", "nl", "pt-rPT", "ru", "sv" vectorDrawables.useSupportLibrary = true resValue 'string', 'account_type.subsonic', applicationId + ".subsonic" + resValue 'string', 'provider.search', applicationId + ".provider.DSubSearchProvider" + resValue 'string', 'provider.playlist', applicationId + ".playlists.provider" + resValue 'string', 'provider.podcast', applicationId + ".podcasts.provider" + resValue 'string', 'provider.starred', applicationId + ".starred.provider" + resValue 'string', 'provider.recently_added', applicationId + ".mostrecent.provider" } buildTypes { release { diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 527565343..ffefe19e4 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -214,24 +214,24 @@ + android:authorities="@string/provider.search"/> diff --git a/app/src/main/java/github/daneren2005/dsub/util/Constants.java b/app/src/main/java/github/daneren2005/dsub/util/Constants.java index e62b93f93..0ce58d738 100644 --- a/app/src/main/java/github/daneren2005/dsub/util/Constants.java +++ b/app/src/main/java/github/daneren2005/dsub/util/Constants.java @@ -223,10 +223,10 @@ public final class Constants { // Account prefs public static final String SYNC_ACCOUNT_NAME = "Subsonic Account"; public static final String SYNC_ACCOUNT_TYPE = BuildConfig.APPLICATION_ID + ".subsonic"; - public static final String SYNC_ACCOUNT_PLAYLIST_AUTHORITY = "github.daneren2005.dsub.playlists.provider"; - public static final String SYNC_ACCOUNT_PODCAST_AUTHORITY = "github.daneren2005.dsub.podcasts.provider"; - public static final String SYNC_ACCOUNT_STARRED_AUTHORITY = "github.daneren2005.dsub.starred.provider"; - public static final String SYNC_ACCOUNT_MOST_RECENT_AUTHORITY = "github.daneren2005.dsub.mostrecent.provider"; + public static final String SYNC_ACCOUNT_PLAYLIST_AUTHORITY = BuildConfig.APPLICATION_ID + ".playlists.provider"; + public static final String SYNC_ACCOUNT_PODCAST_AUTHORITY = BuildConfig.APPLICATION_ID + ".podcasts.provider"; + public static final String SYNC_ACCOUNT_STARRED_AUTHORITY = BuildConfig.APPLICATION_ID + ".starred.provider"; + public static final String SYNC_ACCOUNT_MOST_RECENT_AUTHORITY = BuildConfig.APPLICATION_ID + ".mostrecent.provider"; public static final String TASKER_EXTRA_BUNDLE = "com.twofortyfouram.locale.intent.extra.BUNDLE"; diff --git a/app/src/main/res/xml/mostrecent_syncadapter.xml b/app/src/main/res/xml/mostrecent_syncadapter.xml index 8c6dada2d..a01725015 100644 --- a/app/src/main/res/xml/mostrecent_syncadapter.xml +++ b/app/src/main/res/xml/mostrecent_syncadapter.xml @@ -1,6 +1,6 @@ \ No newline at end of file diff --git a/app/src/main/res/xml/starred_syncadapter.xml b/app/src/main/res/xml/starred_syncadapter.xml index f325da26d..1d8550577 100644 --- a/app/src/main/res/xml/starred_syncadapter.xml +++ b/app/src/main/res/xml/starred_syncadapter.xml @@ -1,6 +1,6 @@ Date: Mon, 21 Sep 2020 23:50:15 +0200 Subject: [PATCH 15/30] Don't hardcode the package name --- .../java/github/daneren2005/dsub/activity/SubsonicActivity.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/github/daneren2005/dsub/activity/SubsonicActivity.java b/app/src/main/java/github/daneren2005/dsub/activity/SubsonicActivity.java index 5948064d1..4d8dfb59c 100644 --- a/app/src/main/java/github/daneren2005/dsub/activity/SubsonicActivity.java +++ b/app/src/main/java/github/daneren2005/dsub/activity/SubsonicActivity.java @@ -1248,7 +1248,7 @@ public void uncaughtException(Thread thread, Throwable throwable) { PrintWriter printWriter = null; try { - PackageInfo packageInfo = context.getPackageManager().getPackageInfo("github.daneren2005.dsub", 0); + PackageInfo packageInfo = context.getPackageManager().getPackageInfo(context.getPackageName(), 0); file = new File(Environment.getExternalStorageDirectory(), "dsub-stacktrace.txt"); printWriter = new PrintWriter(file); printWriter.println("Android API level: " + Build.VERSION.SDK); From 9454932b8c230acf88f5ab8b4a9b0cc70a37fa8b Mon Sep 17 00:00:00 2001 From: Moritz Maxeiner Date: Tue, 22 Sep 2020 00:30:15 +0200 Subject: [PATCH 16/30] Don't use relative import for services --- app/src/main/AndroidManifest.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index ffefe19e4..476e4c1d1 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -89,10 +89,10 @@ - - From bf5f8ef21ae6415ae5b7a4ed2525fec1a1dc5420 Mon Sep 17 00:00:00 2001 From: Scott Jackson Date: Fri, 2 Oct 2020 20:15:30 -0700 Subject: [PATCH 17/30] Add some compat info for new media style notification --- .../daneren2005/dsub/util/Notifications.java | 24 +++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/github/daneren2005/dsub/util/Notifications.java b/app/src/main/java/github/daneren2005/dsub/util/Notifications.java index 35ab505da..e1781c479 100644 --- a/app/src/main/java/github/daneren2005/dsub/util/Notifications.java +++ b/app/src/main/java/github/daneren2005/dsub/util/Notifications.java @@ -91,9 +91,29 @@ public static void showPlayingNotification(final Context context, final Download mediaStyle.setShowActionsInCompactView(0, 2, 4); } + String title = song.getTitle(); + String artist = song.getArtist(); + String album = song.getAlbum(); + NotificationCompat.Builder notificationBuilder = new NotificationCompat.Builder(context, "now-playing-channel") - .setSmallIcon(R.drawable.stat_notify_playing) - .setStyle(mediaStyle); + .setSmallIcon(R.drawable.stat_notify_playing) + .setContentTitle(title) + .setContentText(artist + " - " + album) + .setStyle(mediaStyle); + + // Set the album art. + try { + ImageLoader imageLoader = SubsonicActivity.getStaticImageLoader(context); + if(imageLoader != null) { + Bitmap bitmap = imageLoader.getCachedImage(context, song, false); + + if(bitmap != null) { + notificationBuilder.setLargeIcon(bitmap); + } + } + } catch (Exception x) { + Log.w(TAG, "Failed to get notification cover art", x); + } PendingIntent prevIntent = null; PendingIntent nextIntent = null; From 09215909fa1cdecf6de7123c3f51bca08b039658 Mon Sep 17 00:00:00 2001 From: Scott Jackson Date: Fri, 2 Oct 2020 20:35:36 -0700 Subject: [PATCH 18/30] Request location access when opening SSID to make sure it works --- .../github/daneren2005/dsub/fragments/SettingsFragment.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/src/main/java/github/daneren2005/dsub/fragments/SettingsFragment.java b/app/src/main/java/github/daneren2005/dsub/fragments/SettingsFragment.java index 1789ad15c..315593058 100644 --- a/app/src/main/java/github/daneren2005/dsub/fragments/SettingsFragment.java +++ b/app/src/main/java/github/daneren2005/dsub/fragments/SettingsFragment.java @@ -528,6 +528,10 @@ protected void onAddEditTextToDialogView(View dialogView, final EditText editTex super.onAddEditTextToDialogView(dialogView, editText); ViewGroup root = (ViewGroup) ((ViewGroup) dialogView).getChildAt(0); + if(internalSSID == "" && ActivityCompat.checkSelfPermission(context, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED) { + ActivityCompat.requestPermissions(context, new String[]{Manifest.permission.ACCESS_FINE_LOCATION}, SubsonicActivity.PERMISSIONS_REQUEST_LOCATION); + } + Button defaultButton = new Button(getContext()); defaultButton.setText(internalSSIDDisplay); defaultButton.setOnClickListener(new View.OnClickListener() { From 28263023643fc78a10791985209057f4c2fe5028 Mon Sep 17 00:00:00 2001 From: Moritz Maxeiner Date: Thu, 24 Sep 2020 22:24:29 +0200 Subject: [PATCH 19/30] Remove permission reserved for system apps since API version 16 --- app/src/main/AndroidManifest.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 0a2112460..11ae17688 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -16,7 +16,6 @@ - From 674706c39f7f9b82f3ed72e31ac9511ebd1a54a8 Mon Sep 17 00:00:00 2001 From: Moritz Maxeiner Date: Sun, 27 Sep 2020 15:08:41 +0200 Subject: [PATCH 20/30] Replace jetty ArrayQueue with java ArrayQueue --- .../daneren2005/dsub/util/DownloadFileItemHelperCallback.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/github/daneren2005/dsub/util/DownloadFileItemHelperCallback.java b/app/src/main/java/github/daneren2005/dsub/util/DownloadFileItemHelperCallback.java index e1e2dc63c..0e80295a2 100644 --- a/app/src/main/java/github/daneren2005/dsub/util/DownloadFileItemHelperCallback.java +++ b/app/src/main/java/github/daneren2005/dsub/util/DownloadFileItemHelperCallback.java @@ -4,9 +4,9 @@ import android.support.v7.widget.helper.ItemTouchHelper; import android.util.Log; -import org.eclipse.jetty.util.ArrayQueue; import java.util.Queue; +import java.util.ArrayDeque; import github.daneren2005.dsub.adapter.SectionAdapter; import github.daneren2005.dsub.fragments.SubsonicFragment; @@ -22,7 +22,7 @@ public class DownloadFileItemHelperCallback extends ItemTouchHelper.SimpleCallba private boolean mainList; private BackgroundTask pendingTask = null; - private Queue pendingOperations = new ArrayQueue(); + private Queue pendingOperations = new ArrayDeque(); public DownloadFileItemHelperCallback(SubsonicFragment fragment, boolean mainList) { super(ItemTouchHelper.UP | ItemTouchHelper.DOWN, ItemTouchHelper.LEFT | ItemTouchHelper.RIGHT); From 0a2e73291d7eb3cd8cfa5596967e7f744bac6dbd Mon Sep 17 00:00:00 2001 From: Moritz Maxeiner Date: Sat, 3 Oct 2020 10:50:06 +0200 Subject: [PATCH 21/30] Fallback to default media receiver application when Google casting --- .../dsub/service/ChromeCastController.java | 6 ++++-- .../dsub/util/compat/GoogleCompat.java | 16 ++++++++++++---- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/app/src/google/java/github/daneren2005/dsub/service/ChromeCastController.java b/app/src/google/java/github/daneren2005/dsub/service/ChromeCastController.java index b2405705d..2bd4cb593 100644 --- a/app/src/google/java/github/daneren2005/dsub/service/ChromeCastController.java +++ b/app/src/google/java/github/daneren2005/dsub/service/ChromeCastController.java @@ -49,6 +49,8 @@ import github.daneren2005.serverproxy.ServerProxy; import github.daneren2005.serverproxy.WebProxy; +import static github.daneren2005.dsub.util.compat.GoogleCompat.castApplicationId; + /** * Created by owner on 2/9/14. */ @@ -421,14 +423,14 @@ public void onConnectionSuspended(int cause) { void launchApplication() { try { - Cast.CastApi.launchApplication(apiClient, EnvironmentVariables.CAST_APPLICATION_ID, false).setResultCallback(resultCallback); + Cast.CastApi.launchApplication(apiClient, castApplicationId(), false).setResultCallback(resultCallback); } catch (Exception e) { Log.e(TAG, "Failed to launch application", e); } } void reconnectApplication() { try { - Cast.CastApi.joinApplication(apiClient, EnvironmentVariables.CAST_APPLICATION_ID, sessionId).setResultCallback(resultCallback); + Cast.CastApi.joinApplication(apiClient, castApplicationId(), sessionId).setResultCallback(resultCallback); } catch (Exception e) { Log.e(TAG, "Failed to reconnect application", e); } diff --git a/app/src/google/java/github/daneren2005/dsub/util/compat/GoogleCompat.java b/app/src/google/java/github/daneren2005/dsub/util/compat/GoogleCompat.java index 63992b0f9..f8bd4ee77 100644 --- a/app/src/google/java/github/daneren2005/dsub/util/compat/GoogleCompat.java +++ b/app/src/google/java/github/daneren2005/dsub/util/compat/GoogleCompat.java @@ -9,6 +9,7 @@ import com.google.android.gms.common.ConnectionResult; import com.google.android.gms.common.GoogleApiAvailability; import com.google.android.gms.security.ProviderInstaller; +import static com.google.android.gms.cast.CastMediaControlIntent.DEFAULT_MEDIA_RECEIVER_APPLICATION_ID; import github.daneren2005.dsub.service.ChromeCastController; import github.daneren2005.dsub.service.DownloadService; @@ -32,10 +33,17 @@ public static void installProvider(Context context) throws Exception{ ProviderInstaller.installIfNeeded(context); } + public static String castApplicationId() { + if (EnvironmentVariables.CAST_APPLICATION_ID != null) { + return EnvironmentVariables.CAST_APPLICATION_ID; + } else { + return DEFAULT_MEDIA_RECEIVER_APPLICATION_ID; + } + } + public static boolean castAvailable() { - if (EnvironmentVariables.CAST_APPLICATION_ID == null) { - Log.w(TAG, "CAST_APPLICATION_ID not provided"); - return false; + if (castApplicationId() == DEFAULT_MEDIA_RECEIVER_APPLICATION_ID) { + Log.i(TAG, "Using DEFAULT_MEDIA_RECEIVER_APPLICATION_ID for casting"); } try { Class.forName("com.google.android.gms.cast.CastDevice"); @@ -56,6 +64,6 @@ public static RemoteController getController(DownloadService downloadService, Me } public static String getCastControlCategory() { - return CastMediaControlIntent.categoryForCast(EnvironmentVariables.CAST_APPLICATION_ID); + return CastMediaControlIntent.categoryForCast(castApplicationId()); } } From e4ee3faa81288023b9e919a8687cfe1a9e87fa1c Mon Sep 17 00:00:00 2001 From: Scott Jackson Date: Thu, 8 Oct 2020 20:40:57 -0700 Subject: [PATCH 22/30] Change DLNA to default to off since it causes so many issues --- .../github/daneren2005/dsub/fragments/SettingsFragment.java | 2 +- .../github/daneren2005/dsub/util/MediaRouteManager.java | 2 +- app/src/main/res/xml/settings_cast.xml | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/github/daneren2005/dsub/fragments/SettingsFragment.java b/app/src/main/java/github/daneren2005/dsub/fragments/SettingsFragment.java index 315593058..c5463f383 100644 --- a/app/src/main/java/github/daneren2005/dsub/fragments/SettingsFragment.java +++ b/app/src/main/java/github/daneren2005/dsub/fragments/SettingsFragment.java @@ -214,7 +214,7 @@ else if(Constants.PREFERENCES_KEY_SYNC_MOST_RECENT.equals(key)) { if(downloadService != null) { MediaRouteManager mediaRouter = downloadService.getMediaRouter(); - Boolean enabled = sharedPreferences.getBoolean(key, true); + Boolean enabled = sharedPreferences.getBoolean(key, false); if (enabled) { mediaRouter.addDLNAProvider(); } else { diff --git a/app/src/main/java/github/daneren2005/dsub/util/MediaRouteManager.java b/app/src/main/java/github/daneren2005/dsub/util/MediaRouteManager.java index e19cc1567..00e02dab1 100644 --- a/app/src/main/java/github/daneren2005/dsub/util/MediaRouteManager.java +++ b/app/src/main/java/github/daneren2005/dsub/util/MediaRouteManager.java @@ -141,7 +141,7 @@ private void addProviders() { addOnlineProviders(); } - if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH && Util.getPreferences(downloadService).getBoolean(Constants.PREFERENCES_KEY_DLNA_CASTING_ENABLED, true)) { + if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH && Util.getPreferences(downloadService).getBoolean(Constants.PREFERENCES_KEY_DLNA_CASTING_ENABLED, false)) { addDLNAProvider(); } } diff --git a/app/src/main/res/xml/settings_cast.xml b/app/src/main/res/xml/settings_cast.xml index 78bafdd4d..2170d7ed8 100644 --- a/app/src/main/res/xml/settings_cast.xml +++ b/app/src/main/res/xml/settings_cast.xml @@ -33,9 +33,9 @@ android:title="@string/settings.other_title"> + android:summary="@string/settings.casting.dlna_casting_enabled.summary" + android:title="@string/settings.casting.dlna_casting_enabled" /> \ No newline at end of file From 86c012c230b394f04e0d016bb5929438d14794a8 Mon Sep 17 00:00:00 2001 From: Scott Jackson Date: Thu, 8 Oct 2020 21:09:52 -0700 Subject: [PATCH 23/30] Fixed #1021 preload count being max int triggers buffer overflow in getRecentDownloads() --- .../java/github/daneren2005/dsub/service/DownloadService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/github/daneren2005/dsub/service/DownloadService.java b/app/src/main/java/github/daneren2005/dsub/service/DownloadService.java index 77bc25169..67a0f36fe 100644 --- a/app/src/main/java/github/daneren2005/dsub/service/DownloadService.java +++ b/app/src/main/java/github/daneren2005/dsub/service/DownloadService.java @@ -1083,7 +1083,7 @@ public synchronized List getDownloads() { public synchronized List getRecentDownloads() { int from = Math.max(currentPlayingIndex - 10, 0); - int songsToKeep = Math.max(Util.getPreloadCount(this), 20); + int songsToKeep = Math.min(Math.max(Util.getPreloadCount(this), 20), downloadList.size()); int to = Math.min(currentPlayingIndex + songsToKeep, Math.max(downloadList.size() - 1, 0)); List temp = downloadList.subList(from, to); temp.addAll(backgroundDownloadList); From 9bc552b5570c91cb6d81956efb46d75630305b35 Mon Sep 17 00:00:00 2001 From: Scott Jackson Date: Thu, 8 Oct 2020 21:16:33 -0700 Subject: [PATCH 24/30] Release DSub 5.5.1 --- app/build.gradle | 2 +- app/src/main/res/xml/changelog.xml | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index d3030d404..25af81019 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -7,7 +7,7 @@ android { applicationId "github.daneren2005.dsub" minSdkVersion 15 targetSdkVersion 28 - versionCode 204 + versionCode 205 versionName '5.5.1' setProperty("archivesBaseName", "DSub $versionName") resConfigs "de", "es", "fr", "hu", "nl", "pt-rPT", "ru", "sv" diff --git a/app/src/main/res/xml/changelog.xml b/app/src/main/res/xml/changelog.xml index d7875dcd7..8afc22b6c 100644 --- a/app/src/main/res/xml/changelog.xml +++ b/app/src/main/res/xml/changelog.xml @@ -1,9 +1,10 @@ - + Update to Android 9 target level - Optionally use system default media style notification (on by default) - Fix not being able to use basic server auth with @ in network connection string + Optionally use system default media style notification (on by default - thanks avm99963) + Fix not being able to use basic server auth with @ in network connection string via server setting (thanks popeen) + Turned DLNA casting off by default since it causes battery drain I have not been able to fix Fix saving files being broken on Android 11+ From 1c2d783f4bc7ad16b7cd4e323317d10e0b20432a Mon Sep 17 00:00:00 2001 From: Scott Jackson Date: Mon, 12 Oct 2020 20:25:01 -0700 Subject: [PATCH 25/30] Add explanation of why user is prompted for location access --- .../daneren2005/dsub/activity/SubsonicActivity.java | 9 +++++++++ app/src/main/res/values/strings.xml | 1 + 2 files changed, 10 insertions(+) diff --git a/app/src/main/java/github/daneren2005/dsub/activity/SubsonicActivity.java b/app/src/main/java/github/daneren2005/dsub/activity/SubsonicActivity.java index 4d8dfb59c..3b6935eb2 100644 --- a/app/src/main/java/github/daneren2005/dsub/activity/SubsonicActivity.java +++ b/app/src/main/java/github/daneren2005/dsub/activity/SubsonicActivity.java @@ -198,6 +198,15 @@ public void onRequestPermissionsResult(int requestCode, String permissions[], in finish(); } } + case PERMISSIONS_REQUEST_LOCATION: { + // If request is cancelled, the result arrays are empty. + if (grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED) { + + } else { + Util.toast(this, R.string.permission_location_failed); + finish(); + } + } } } diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index a3dd6af2b..2dcee2d6d 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -669,6 +669,7 @@ Home Page DSub cannot function without the ability to write to storage + This apps uses location data to get the WIFI SSID when the app is in use. No location data is collected. No songs From 1efb5b3df99c7a5fc87cb025aa5850f101cbf6ce Mon Sep 17 00:00:00 2001 From: Scott Jackson Date: Mon, 12 Oct 2020 20:54:24 -0700 Subject: [PATCH 26/30] Initial upgrade to target SDK 29 --- app/build.gradle | 2 +- app/src/main/AndroidManifest.xml | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 25af81019..8401ac536 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -6,7 +6,7 @@ android { defaultConfig { applicationId "github.daneren2005.dsub" minSdkVersion 15 - targetSdkVersion 28 + targetSdkVersion 29 versionCode 205 versionName '5.5.1' setProperty("archivesBaseName", "DSub $versionName") diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 11ae17688..2572bbb53 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -22,7 +22,7 @@ - + @@ -91,7 +91,8 @@ + android:label="DSub Playback Service" + android:foregroundServiceType="location"/> From 28cf757952f789896bf8e8b5174947b03942f792 Mon Sep 17 00:00:00 2001 From: Scott Jackson Date: Mon, 12 Oct 2020 20:56:59 -0700 Subject: [PATCH 27/30] Request location permissions on every startup if not given --- .../daneren2005/dsub/activity/SubsonicActivity.java | 13 ++++++++++++- app/src/main/res/values/strings.xml | 2 +- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/github/daneren2005/dsub/activity/SubsonicActivity.java b/app/src/main/java/github/daneren2005/dsub/activity/SubsonicActivity.java index 3b6935eb2..d475be7b5 100644 --- a/app/src/main/java/github/daneren2005/dsub/activity/SubsonicActivity.java +++ b/app/src/main/java/github/daneren2005/dsub/activity/SubsonicActivity.java @@ -18,6 +18,7 @@ */ package github.daneren2005.dsub.activity; +import android.Manifest; import android.app.UiModeManager; import android.content.Context; import android.content.DialogInterface; @@ -184,6 +185,17 @@ public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, Strin if (ContextCompat.checkSelfPermission(this, permission.WRITE_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED) { ActivityCompat.requestPermissions(this, new String[]{ permission.WRITE_EXTERNAL_STORAGE }, PERMISSIONS_REQUEST_WRITE_EXTERNAL_STORAGE); } + + SharedPreferences prefs = Util.getPreferences(this); + int instance = prefs.getInt(Constants.PREFERENCES_KEY_SERVER_INSTANCE, 1); + String expectedSSID = prefs.getString(Constants.PREFERENCES_KEY_SERVER_LOCAL_NETWORK_SSID + instance, ""); + if(!expectedSSID.isEmpty()) { + String currentSSID = Util.getSSID(this); + + if(currentSSID == "" && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED) { + ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.ACCESS_FINE_LOCATION}, SubsonicActivity.PERMISSIONS_REQUEST_LOCATION); + } + } } @Override @@ -204,7 +216,6 @@ public void onRequestPermissionsResult(int requestCode, String permissions[], in } else { Util.toast(this, R.string.permission_location_failed); - finish(); } } } diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 2dcee2d6d..87ebbe071 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -669,7 +669,7 @@ Home Page DSub cannot function without the ability to write to storage - This apps uses location data to get the WIFI SSID when the app is in use. No location data is collected. + This apps uses location data to get the WIFI SSID to match against your local network settings. To get rid of this message, change the local network SSID to blank. No songs From 837c14026379e09a319df79ef39cf6e28fd3d8fd Mon Sep 17 00:00:00 2001 From: t-m-w <7275539+t-m-w@users.noreply.github.com> Date: Tue, 20 Oct 2020 14:44:26 -0700 Subject: [PATCH 28/30] Show mediastyle notification on secure lockscreen Allow mediastyle playback notification to show up properly on lockscreens that hide sensitive notifications. For DSub's non-mediastyle implementation, this is already done on line 162. No need to check for LOLLIPOP+ because usingMediaStyleNotification already requires LOLLIPOP+. --- .../main/java/github/daneren2005/dsub/util/Notifications.java | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/main/java/github/daneren2005/dsub/util/Notifications.java b/app/src/main/java/github/daneren2005/dsub/util/Notifications.java index e1781c479..88bc8138f 100644 --- a/app/src/main/java/github/daneren2005/dsub/util/Notifications.java +++ b/app/src/main/java/github/daneren2005/dsub/util/Notifications.java @@ -99,6 +99,7 @@ public static void showPlayingNotification(final Context context, final Download .setSmallIcon(R.drawable.stat_notify_playing) .setContentTitle(title) .setContentText(artist + " - " + album) + .setVisibility(Notification.VISIBILITY_PUBLIC) .setStyle(mediaStyle); // Set the album art. From f4edc8f502279fa4eb1a52652c3f57b209202ecf Mon Sep 17 00:00:00 2001 From: Scott Jackson Date: Wed, 4 Nov 2020 20:39:18 -0800 Subject: [PATCH 29/30] Fix fullscreen layout not actually be fullscreen anymore --- app/src/main/res/layout/abstract_activity.xml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/src/main/res/layout/abstract_activity.xml b/app/src/main/res/layout/abstract_activity.xml index 56db14393..7ca9b9365 100644 --- a/app/src/main/res/layout/abstract_activity.xml +++ b/app/src/main/res/layout/abstract_activity.xml @@ -4,8 +4,7 @@ xmlns:app="http://schemas.android.com/apk/res-auto" android:id="@+id/drawer_layout" android:layout_width="match_parent" - android:layout_height="match_parent" - android:fitsSystemWindows="true"> + android:layout_height="match_parent"> Date: Thu, 3 Dec 2020 18:50:24 -0800 Subject: [PATCH 30/30] DSub 5.5.2 release --- app/build.gradle | 4 ++-- app/src/main/res/xml/changelog.xml | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 8401ac536..dafc4fbc6 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -7,8 +7,8 @@ android { applicationId "github.daneren2005.dsub" minSdkVersion 15 targetSdkVersion 29 - versionCode 205 - versionName '5.5.1' + versionCode 206 + versionName '5.5.2' setProperty("archivesBaseName", "DSub $versionName") resConfigs "de", "es", "fr", "hu", "nl", "pt-rPT", "ru", "sv" vectorDrawables.useSupportLibrary = true diff --git a/app/src/main/res/xml/changelog.xml b/app/src/main/res/xml/changelog.xml index 8afc22b6c..4be2ae360 100644 --- a/app/src/main/res/xml/changelog.xml +++ b/app/src/main/res/xml/changelog.xml @@ -1,5 +1,11 @@ + + Update to Android 10 target level + Request location permissions if needed for local network check + Show new notification on secure lockscreen + Fix fullscreen not being fullscreen after upgrading to Android 9 target level + Update to Android 9 target level Optionally use system default media style notification (on by default - thanks avm99963)