Externalized a string.

This commit is contained in:
Felix Ableitner 2013-10-11 05:42:11 +02:00
parent c28e53767d
commit 9dea15f707
2 changed files with 5 additions and 1 deletions

View file

@ -11,5 +11,6 @@
<string name="next">Next</string> <string name="next">Next</string>
<string name="select_renderer">Please select a renderer</string> <string name="select_renderer">Please select a renderer</string>
<string name="album_art">Album Art</string> <string name="album_art">Album Art</string>
<string name="route_description">DLNA Playback</string>
</resources> </resources>

View file

@ -57,6 +57,8 @@ import android.support.v7.media.MediaRouter.ControlRequestCallback;
import android.util.Pair; import android.util.Pair;
import android.util.SparseArray; import android.util.SparseArray;
import com.github.nutomic.controldlna.R;
/** /**
* Allows playing to a DLNA renderer from a remote app. * Allows playing to a DLNA renderer from a remote app.
* *
@ -221,7 +223,8 @@ final class Provider extends MediaRouteProvider {
MediaRouteDescriptor routeDescriptor = new MediaRouteDescriptor.Builder( MediaRouteDescriptor routeDescriptor = new MediaRouteDescriptor.Builder(
d.getValue().id, d.getValue().id,
d.getValue().name) d.getValue().name)
.setDescription("DLNA Playback") .setDescription(getContext().getResources()
.getString(R.string.route_description))
.addControlFilters(CONTROL_FILTERS) .addControlFilters(CONTROL_FILTERS)
.setPlaybackType(MediaRouter.RouteInfo.PLAYBACK_TYPE_REMOTE) .setPlaybackType(MediaRouter.RouteInfo.PLAYBACK_TYPE_REMOTE)
.setVolumeHandling(MediaRouter.RouteInfo.PLAYBACK_VOLUME_VARIABLE) .setVolumeHandling(MediaRouter.RouteInfo.PLAYBACK_VOLUME_VARIABLE)