Skip to content

feat(lyrics): show the current line on the lock screen - #1774

Merged
A-EDev merged 8 commits into
mainfrom
feat/session-lyrics
Nov 6, 2026
Merged

A-EDev merged 8 commits into
mainfrom
feat/session-lyrics

Conversation

@A-EDev

@A-EDev A-EDev commented Nov 5, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Adds a Lyrics on lock screen switch under Player & playback › Music, off by default.
  • While on, the music session reports the current synced line as the title and "Song - Artist" as the artist. HyperOS's shade and lock screen read only those keys, so a separate display title doesn't reach them. Flow's own queue, widget, resume and Discord keep the real song.
  • A line over about 24 characters shows in balanced parts, one after the other, because media cards cut the title off. Parts follow word timings when the provider has them, and a line sung too fast to read in parts stays whole.
  • A Lock screen lyrics timing slider appears under the switch, from 2 s earlier to 2 s later in 0.2 s steps, on the shared centred Material track. It only moves the session line, on top of any offset set for the song in the lyrics sheet.
  • The line waits for each next lyric instead of polling, follows the sync offset and any chosen or edited lyrics, and reuses the lyrics fetch the service already makes.

Related issue

Closes #1742

Change type

  • Bug fix
  • Feature
  • Refactor or maintenance
  • Build, packaging, or CI
  • Documentation

Validation

  • ./gradlew :app:assembleGithubDebug: passed
  • ./gradlew :app:testGithubDebugUnitTest: passed, 5076 tests, 0 failed, 2 skipped
  • ./gradlew ktlintCheck :app:compileFossDebugKotlin: passed
  • I manually tested the affected behavior on an Android device or emulator.

Checked on the emulator with dumpsys media_session, dumpsys notification and screenshots: title and artist follow the lines, the real song returns with the screen off and resumes with it on, pausing holds the line, and Flow's own player keeps the song's name. Long lines were checked on the emulator: "A full commitment's what I'm thinkin' of" shows as two parts in step with the song. On the phone, screenshots show parts of long lines on the lock screen ("Never gonna run") and the shade ("too blind to see"), and the session title moved through the parts in step with the song. Control Center was not rechecked with the split. The timing slider was checked on the emulator only: with the song paused, the earlier end moved the session title to the next line and the later end to the previous line, the centre restored it, and the slider appears only with the switch on.

Surface Shows the lyric line Tested on
Stock Android media card Yes Emulator
HyperOS lock screen Yes, long lines show in parts Phone
HyperOS notification shade Yes, long lines show in parts Phone
HyperOS Control Center Yes Phone

Test device and Android version: Xiaomi 2311DRK48G, HyperOS 3, Android 16; Android emulator, API 37

Screenshots or recordings

Risk and compatibility

  • New preference key lyrics_on_lock_screen, default off. With it off, the session state is unchanged.

  • Other apps reading now playing see the lyric as the title, so scrobblers may record lyric lines as songs. The setting's summary says so and it is off by default.

  • Bluetooth car displays may treat each line as a track change. Not tested.

  • Each new line updates the session metadata and the notification once. Updates stop with the screen off unless a car is connected. Android Auto is untested.

  • This raises the rate of MediaSession.setMetadata calls, the path behind the [Bug]: cannot use a recycled source in createBitmap #1017 and [Bug]: IllegalArgumentException in Bitmap.java:942 #1231 recycled bitmap crash. No ROM with that crash has been tested.

  • Media3MusicService is over the file size ceiling. It grows by 2 net lines here, with the logic in new files, because the player path shouldn't be restructured as cleanup.

  • DevicePreferencesSplitTest counts keys, so it needs its count adjusted if another PR adding keys merges first.

  • The change does not introduce secrets, private data, or unexpected telemetry.

  • New user-facing text uses Android string resources.

  • Dependency and lockfile changes are intentional and limited to this PR.

  • Room schema changes include the required version bump and migration, or this PR does not change the Room schema.

  • Breaking changes and upgrade steps are clearly documented.

Copilot AI balanced review requested due to automatic review settings November 5, 2026 22:55

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@github-actions github-actions Bot added documentation Improvements or additions to documentation player Video and audio playback ui Compose UI, theming, or Material 3 surfaces labels Nov 5, 2026
@A-EDev
A-EDev merged commit 367296b into main Nov 6, 2026
9 checks passed
@A-EDev
A-EDev deleted the feat/session-lyrics branch November 6, 2026 13:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation player Video and audio playback ui Compose UI, theming, or Material 3 surfaces

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: MediaSession Lyrics on Lockscreen

2 participants