am d81f1075: Merge "TIF: Change the parameter of TvInputInfo.loadLabel/Icon" into lmp-dev

* commit 'd81f1075c0aa5623a3fd64150e8ca5f6d04907c8':
  TIF: Change the parameter of TvInputInfo.loadLabel/Icon
This commit is contained in:
Youngsang Cho
2014-07-18 03:34:53 +00:00
committed by Android Git Automerger
2 changed files with 8 additions and 8 deletions

View File

@@ -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

View File

@@ -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