summaryrefslogtreecommitdiffstats
path: root/media/java/android
diff options
context:
space:
mode:
authorYoungsang Cho <youngsang@google.com>2014-07-17 15:24:22 -0700
committerYoungsang Cho <youngsang@google.com>2014-07-17 17:49:29 -0700
commitabebf6df876ec147872c090f86c04bfd5b69d686 (patch)
tree69ca294274027e2833e5c9389521311dfbe480ae /media/java/android
parent2bb7e341684ee875bece9fc3c5e03326ae0367d1 (diff)
downloadframeworks_base-abebf6df876ec147872c090f86c04bfd5b69d686.zip
frameworks_base-abebf6df876ec147872c090f86c04bfd5b69d686.tar.gz
frameworks_base-abebf6df876ec147872c090f86c04bfd5b69d686.tar.bz2
TIF: Change the parameter of TvInputInfo.loadLabel/Icon
Labels and icons will be extracted from URI in the future. To acheive it, we need Context rather than PackageManager. Bug: 16166859 Change-Id: I20f0506fba5876a6cf21b70e44bb3a2265f723d7
Diffstat (limited to 'media/java/android')
-rw-r--r--media/java/android/media/tv/TvInputInfo.java12
1 files changed, 6 insertions, 6 deletions
diff --git a/media/java/android/media/tv/TvInputInfo.java b/media/java/android/media/tv/TvInputInfo.java
index 5624f3e..08dd049 100644
--- a/media/java/android/media/tv/TvInputInfo.java
+++ b/media/java/android/media/tv/TvInputInfo.java
@@ -219,24 +219,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