From 3a032856e7adc7bbccf165e8c0eeb86a38bdc57b Mon Sep 17 00:00:00 2001 From: Daniel Sandler Date: Wed, 11 Nov 2009 10:57:22 -0800 Subject: Fix http://b/2248037 . If there's no author information, just show the title in the picker list. --- .../android/wallpaper/livepicker/LiveWallpaperListActivity.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/com/android/wallpaper/livepicker/LiveWallpaperListActivity.java b/src/com/android/wallpaper/livepicker/LiveWallpaperListActivity.java index 99a22fe..06ca937 100644 --- a/src/com/android/wallpaper/livepicker/LiveWallpaperListActivity.java +++ b/src/com/android/wallpaper/livepicker/LiveWallpaperListActivity.java @@ -220,8 +220,13 @@ public class LiveWallpaperListActivity extends ListActivity implements AdapterVi WallpaperInfo info = mWallpaperInfos.get(position); holder.thumbnail.setImageDrawable(mThumbnails.get(position)); - holder.titleAuthor.setText(getString(R.string.wallpaper_title_and_author, - info.loadLabel(mPackageManager), info.loadAuthor(mPackageManager))); + try { + CharSequence author = info.loadAuthor(mPackageManager); + holder.titleAuthor.setText(getString(R.string.wallpaper_title_and_author, + info.loadLabel(mPackageManager), author)); + } catch (Resources.NotFoundException e) { + holder.titleAuthor.setText(info.loadLabel(mPackageManager)); + } holder.description.setText(Html.fromHtml( info.loadDescription(mPackageManager).toString())); -- cgit v1.2.3