diff --git a/api/current.txt b/api/current.txt index 15937e78c18a1..342bb0910bd44 100644 --- a/api/current.txt +++ b/api/current.txt @@ -16594,8 +16594,8 @@ package android.media.tv { method public java.lang.String getParentId(); method public android.content.pm.ServiceInfo getServiceInfo(); method public int getType(); - method public android.graphics.drawable.Drawable loadIcon(android.content.pm.PackageManager); - method public java.lang.CharSequence loadLabel(android.content.pm.PackageManager); + method public android.graphics.drawable.Drawable loadIcon(android.content.Context); + method public java.lang.CharSequence loadLabel(android.content.Context); method public void writeToParcel(android.os.Parcel, int); field public static final java.lang.String EXTRA_INPUT_ID = "inputId"; field public static final int TYPE_HDMI = 1; // 0x1 diff --git a/media/java/android/media/tv/TvInputInfo.java b/media/java/android/media/tv/TvInputInfo.java index 8cd2f9b10cbb5..a5e63619c67cf 100644 --- a/media/java/android/media/tv/TvInputInfo.java +++ b/media/java/android/media/tv/TvInputInfo.java @@ -279,24 +279,24 @@ public final class TvInputInfo implements Parcelable { /** * Loads the user-displayed label for this TV input service. * - * @param pm Supplies a PackageManager used to load the TV input's resources. + * @param context Supplies a {@link Context} used to load the label. * @return a CharSequence containing the TV input's label. If the TV input does not have * a label, its name is returned. */ - public CharSequence loadLabel(PackageManager pm) { - return mService.loadLabel(pm); + public CharSequence loadLabel(Context context) { + return mService.loadLabel(context.getPackageManager()); } /** * Loads the user-displayed icon for this TV input service. * - * @param pm Supplies a PackageManager used to load the TV input's resources. + * @param context Supplies a {@link Context} used to load the icon. * @return a Drawable containing the TV input's icon. If the TV input does not have * an icon, application icon is returned. If it's unavailable too, system default is * returned. */ - public Drawable loadIcon(PackageManager pm) { - return mService.serviceInfo.loadIcon(pm); + public Drawable loadIcon(Context context) { + return mService.serviceInfo.loadIcon(context.getPackageManager()); } @Override