Android: Store HomeScreenChannel's appLinkIntentUri as Uri

Cleanup of some code touched by the previous commit.
This commit is contained in:
JosJuice 2021-06-22 15:10:50 +02:00
parent cbc4989095
commit 0cfd36495b
3 changed files with 8 additions and 11 deletions

View File

@ -1,21 +1,18 @@
package org.dolphinemu.dolphinemu.model;
import android.net.Uri;
/**
* Represents a home screen channel for Android TV api 26+
*/
public class HomeScreenChannel
{
private long channelId;
private String name;
private String description;
private String appLinkIntentUri;
private Uri appLinkIntentUri;
public HomeScreenChannel()
{
}
public HomeScreenChannel(String name, String description, String appLinkIntentUri)
public HomeScreenChannel(String name, String description, Uri appLinkIntentUri)
{
this.name = name;
this.description = description;
@ -52,12 +49,12 @@ public class HomeScreenChannel
this.description = description;
}
public String getAppLinkIntentUri()
public Uri getAppLinkIntentUri()
{
return appLinkIntentUri;
}
public void setAppLinkIntentUri(String appLinkIntentUri)
public void setAppLinkIntentUri(Uri appLinkIntentUri)
{
this.appLinkIntentUri = appLinkIntentUri;
}

View File

@ -111,7 +111,7 @@ public class SyncChannelJobService extends JobService
}
// Create the channel since it has not been added to the TV Provider.
Uri appLinkIntentUri = Uri.parse(subscription.getAppLinkIntentUri());
Uri appLinkIntentUri = subscription.getAppLinkIntentUri();
Channel.Builder builder = new Channel.Builder();
builder.setType(TvContractCompat.Channels.TYPE_PREVIEW)

View File

@ -264,7 +264,7 @@ public class TvUtil
subs.add(new HomeScreenChannel(
context.getString(platform.getHeaderName()),
context.getString(platform.getHeaderName()),
AppLinkHelper.buildBrowseUri(platform).toString()));
AppLinkHelper.buildBrowseUri(platform)));
}
return subs;
}