Merge pull request #9841 from JosJuice/revert-9835
Partially revert "Android: Clean up some hardcoded strings"
This commit is contained in:
commit
be0163b7ad
|
@ -87,7 +87,7 @@ public class SyncChannelJobService extends JobService
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
subscriptions = TvUtil.createUniversalSubscriptions(context);
|
subscriptions = TvUtil.createUniversalSubscriptions();
|
||||||
for (HomeScreenChannel subscription : subscriptions)
|
for (HomeScreenChannel subscription : subscriptions)
|
||||||
{
|
{
|
||||||
long channelId = createChannel(subscription);
|
long channelId = createChannel(subscription);
|
||||||
|
|
|
@ -98,8 +98,7 @@ public class SyncProgramsJobService extends JobService
|
||||||
Channel channel = TvUtil.getChannelById(context, channelId);
|
Channel channel = TvUtil.getChannelById(context, channelId);
|
||||||
for (Platform platform : Platform.values())
|
for (Platform platform : Platform.values())
|
||||||
{
|
{
|
||||||
if (channel != null &&
|
if (channel != null && channel.getDisplayName().equals(platform.getIdString()))
|
||||||
channel.getAppLinkIntentUri().equals(AppLinkHelper.buildBrowseUri(platform)))
|
|
||||||
{
|
{
|
||||||
getGamesByPlatform(platform);
|
getGamesByPlatform(platform);
|
||||||
syncPrograms(channelId);
|
syncPrograms(channelId);
|
||||||
|
|
|
@ -253,19 +253,21 @@ public class TvUtil
|
||||||
/**
|
/**
|
||||||
* Generates all subscriptions for homescreen channels.
|
* Generates all subscriptions for homescreen channels.
|
||||||
*/
|
*/
|
||||||
public static List<HomeScreenChannel> createUniversalSubscriptions(Context context)
|
public static List<HomeScreenChannel> createUniversalSubscriptions()
|
||||||
{
|
{
|
||||||
return new ArrayList<>(createPlatformSubscriptions(context));
|
return new ArrayList<>(createPlatformSubscriptions());
|
||||||
}
|
}
|
||||||
|
|
||||||
private static List<HomeScreenChannel> createPlatformSubscriptions(Context context)
|
private static List<HomeScreenChannel> createPlatformSubscriptions()
|
||||||
{
|
{
|
||||||
List<HomeScreenChannel> subs = new ArrayList<>();
|
List<HomeScreenChannel> subs = new ArrayList<>();
|
||||||
for (Platform platform : Platform.values())
|
for (Platform platform : Platform.values())
|
||||||
{
|
{
|
||||||
|
// TODO: Replace the getIdString calls with getHeaderName to get localized names.
|
||||||
|
// This would require SyncProgramsJobService to stop using the display name as a key
|
||||||
subs.add(new HomeScreenChannel(
|
subs.add(new HomeScreenChannel(
|
||||||
context.getString(platform.getHeaderName()),
|
platform.getIdString(),
|
||||||
context.getString(platform.getHeaderName()),
|
platform.getIdString(),
|
||||||
AppLinkHelper.buildBrowseUri(platform)));
|
AppLinkHelper.buildBrowseUri(platform)));
|
||||||
}
|
}
|
||||||
return subs;
|
return subs;
|
||||||
|
|
Loading…
Reference in New Issue