diff options
author | Thomas Martitz <kugel@rockbox.org> | 2011-03-16 11:38:49 +0000 |
---|---|---|
committer | Thomas Martitz <kugel@rockbox.org> | 2011-03-16 11:38:49 +0000 |
commit | efa9f13500d1672d0b631520e92e08f3ff61e45c (patch) | |
tree | 2c0bbb7d3fd1ef94a1ce8d1032df4679d7e9ccc3 | |
parent | a0c664850c7524ce829b31c9ddb81fe9c6fd3d3a (diff) | |
download | rockbox-efa9f13500d1672d0b631520e92e08f3ff61e45c.tar.gz rockbox-efa9f13500d1672d0b631520e92e08f3ff61e45c.zip |
Android: Fix widget albumart display on pre-2.2 devices.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29600 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | android/src/org/rockbox/widgets/RockboxWidgetProvider.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/android/src/org/rockbox/widgets/RockboxWidgetProvider.java b/android/src/org/rockbox/widgets/RockboxWidgetProvider.java index beeb81c13b..377f8fdb18 100644 --- a/android/src/org/rockbox/widgets/RockboxWidgetProvider.java +++ b/android/src/org/rockbox/widgets/RockboxWidgetProvider.java | |||
@@ -166,8 +166,11 @@ public class RockboxWidgetProvider extends AppWidgetProvider | |||
166 | CharSequence album = args.getCharSequenceExtra("album"); | 166 | CharSequence album = args.getCharSequenceExtra("album"); |
167 | views.setTextViewText(R.id.infoDisplay, title+"\n"+artist+"\n"+album); | 167 | views.setTextViewText(R.id.infoDisplay, title+"\n"+artist+"\n"+album); |
168 | CharSequence albumart = args.getCharSequenceExtra("albumart"); | 168 | CharSequence albumart = args.getCharSequenceExtra("albumart"); |
169 | /* Uri.fromFile() is buggy in <2.2 | ||
170 | * http://stackoverflow.com/questions/3004713/get-content-uri-from-file-path-in-android */ | ||
169 | if (albumart != null) | 171 | if (albumart != null) |
170 | views.setImageViewUri(R.id.logo, Uri.fromFile(new File(albumart.toString()))); | 172 | views.setImageViewUri(R.id.logo, Uri.parse( |
173 | new File(albumart.toString()).toString())); | ||
171 | else | 174 | else |
172 | views.setImageViewResource(R.id.logo, R.drawable.rockbox); | 175 | views.setImageViewResource(R.id.logo, R.drawable.rockbox); |
173 | } | 176 | } |