mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-11 00:29:11 +01:00
Revert "Partially revert "Android: Clean up hardcoded platform names""
This reverts commit 98bdf3b1ceae94a35e3f47158966967d1c947d99.
This commit is contained in:
parent
2b36587af7
commit
1d772176a2
@ -87,7 +87,7 @@ public class SyncChannelJobService extends JobService
|
||||
}
|
||||
else
|
||||
{
|
||||
subscriptions = TvUtil.createUniversalSubscriptions();
|
||||
subscriptions = TvUtil.createUniversalSubscriptions(context);
|
||||
for (HomeScreenChannel subscription : subscriptions)
|
||||
{
|
||||
long channelId = createChannel(subscription);
|
||||
|
@ -98,7 +98,8 @@ public class SyncProgramsJobService extends JobService
|
||||
Channel channel = TvUtil.getChannelById(context, channelId);
|
||||
for (Platform platform : Platform.values())
|
||||
{
|
||||
if (channel != null && channel.getDisplayName().equals(platform.getIdString()))
|
||||
if (channel != null &&
|
||||
channel.getAppLinkIntentUri().equals(AppLinkHelper.buildBrowseUri(platform)))
|
||||
{
|
||||
getGamesByPlatform(platform);
|
||||
syncPrograms(channelId);
|
||||
|
@ -254,21 +254,19 @@ public class TvUtil
|
||||
/**
|
||||
* Generates all subscriptions for homescreen channels.
|
||||
*/
|
||||
public static List<HomeScreenChannel> createUniversalSubscriptions()
|
||||
public static List<HomeScreenChannel> createUniversalSubscriptions(Context context)
|
||||
{
|
||||
return new ArrayList<>(createPlatformSubscriptions());
|
||||
return new ArrayList<>(createPlatformSubscriptions(context));
|
||||
}
|
||||
|
||||
private static List<HomeScreenChannel> createPlatformSubscriptions()
|
||||
private static List<HomeScreenChannel> createPlatformSubscriptions(Context context)
|
||||
{
|
||||
List<HomeScreenChannel> subs = new ArrayList<>();
|
||||
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(
|
||||
platform.getIdString(),
|
||||
platform.getIdString(),
|
||||
context.getString(platform.getHeaderName()),
|
||||
context.getString(platform.getHeaderName()),
|
||||
AppLinkHelper.buildBrowseUri(platform)));
|
||||
}
|
||||
return subs;
|
||||
|
Loading…
x
Reference in New Issue
Block a user