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

Commit 2d318a59 authored by Sal Savage's avatar Sal Savage Committed by Gerrit Code Review
Browse files

Merge "Update queue title on locale change" into main

parents af3574c8 4de128dd
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));
            }
        }
    }