Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d9844674 authored by Sal Savage's avatar Sal Savage Committed by Automerger Merge Worker
Browse files

Merge "Update queue title on locale change" into main am: 2d318a59

parents c5b6d036 2d318a59
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -89,12 +89,17 @@ public class BluetoothMediaBrowserService extends MediaBrowserServiceCompat {
                if (DBG) Log.d(TAG, "Locale has updated");
                if (sBluetoothMediaBrowserService == null) return;
                MediaSessionCompat session = sBluetoothMediaBrowserService.getSession();

                // Update playback state error message under new locale, if applicable
                MediaControllerCompat controller = session.getController();
                PlaybackStateCompat playbackState =
                        controller == null ? null : controller.getPlaybackState();
                if (playbackState != null && playbackState.getErrorMessage() != null) {
                    setErrorPlaybackState();
                }

                // Update queue title under new locale
                session.setQueueTitle(getString(R.string.bluetooth_a2dp_sink_queue_name));
            }
        }
    }