YAACC - UPNP Client and Server
Loading...
Searching...
No Matches
de.yaacc.browser.MiniPlayerPresenter Class Reference

The Android-free decisions behind the mini-player rows: what the play/pause button does, and how the strings that come from LAN devices (track title, receiver and player names) are cleaned before they are set on a TextView. More...

Collaboration diagram for de.yaacc.browser.MiniPlayerPresenter:
Collaboration graph

Classes

enum  TransportAction
 What the combined play/pause button does when pressed. More...
 

Static Public Member Functions

static TransportAction toggleAction (boolean playing)
 The play/pause button pauses a playing session and starts any other one.
 
static String title (String title, String fallback)
 The track title, or fallback (the player's name) when the title is missing or blank.
 
static String receiverLabel (String resolvedReceiverName, String playerName)
 The receiver's name as resolved from the registry, or the player's own name when the device is not known (any more).
 

Detailed Description

The Android-free decisions behind the mini-player rows: what the play/pause button does, and how the strings that come from LAN devices (track title, receiver and player names) are cleaned before they are set on a TextView.

Deliberately has no android.* imports so it can be unit-tested on the plain JVM. The cleaning is not an HTML or format-string defence (the views only ever use setText); it removes what could make a one-line label misleading: control characters, line breaks and the bidirectional controls that can reorder the text around them.

Member Function Documentation

◆ receiverLabel()

static String de.yaacc.browser.MiniPlayerPresenter.receiverLabel ( String resolvedReceiverName,
String playerName )
static

The receiver's name as resolved from the registry, or the player's own name when the device is not known (any more).

Cleaned; never null.

◆ title()

static String de.yaacc.browser.MiniPlayerPresenter.title ( String title,
String fallback )
static

The track title, or fallback (the player's name) when the title is missing or blank.

Both are cleaned; never null.

Referenced by de.yaacc.browser.MiniPlayerPresenter.title().

Here is the call graph for this function:
Here is the caller graph for this function:

The documentation for this class was generated from the following file: