From: tobiasKaminsky Date: Fri, 14 Aug 2015 13:39:35 +0000 (+0200) Subject: Merge remote-tracking branch 'upstream/video_thumbnail' into video_thumbnail X-Git-Tag: beta-20151202~1^2~2 X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/commitdiff_plain/c50aa8bc2ad90bad0e1f97a3a7bab461dc05b0d1?hp=a1b24dea37013fec794ecee6a6ef2f3fedefc0a3 Merge remote-tracking branch 'upstream/video_thumbnail' into video_thumbnail --- diff --git a/owncloud-android-library b/owncloud-android-library index dbc8c325..4eb9ce4b 160000 --- a/owncloud-android-library +++ b/owncloud-android-library @@ -1 +1 @@ -Subproject commit dbc8c325d74f3f7e8da8236c5abe77a141ae4019 +Subproject commit 4eb9ce4ba2d9272de561954b3638f5acde8b2ca5 diff --git a/res/drawable-hdpi/view_play.png b/res/drawable-hdpi/view_play.png index 57c9fa54..53717245 100644 Binary files a/res/drawable-hdpi/view_play.png and b/res/drawable-hdpi/view_play.png differ diff --git a/res/drawable-mdpi/view_play.png b/res/drawable-mdpi/view_play.png index c61e948b..77b20272 100644 Binary files a/res/drawable-mdpi/view_play.png and b/res/drawable-mdpi/view_play.png differ diff --git a/res/drawable-xhdpi/view_play.png b/res/drawable-xhdpi/view_play.png index a3c80e73..8482788e 100644 Binary files a/res/drawable-xhdpi/view_play.png and b/res/drawable-xhdpi/view_play.png differ diff --git a/res/drawable-xxhdpi/view_play.png b/res/drawable-xxhdpi/view_play.png index 547ef30a..fea738b9 100644 Binary files a/res/drawable-xxhdpi/view_play.png and b/res/drawable-xxhdpi/view_play.png differ diff --git a/res/drawable-xxxhdpi/view_play.png b/res/drawable-xxxhdpi/view_play.png index be5c062b..3786b4d0 100644 Binary files a/res/drawable-xxxhdpi/view_play.png and b/res/drawable-xxxhdpi/view_play.png differ diff --git a/src/com/owncloud/android/datamodel/ThumbnailsCacheManager.java b/src/com/owncloud/android/datamodel/ThumbnailsCacheManager.java index 07849e18..5806a408 100644 --- a/src/com/owncloud/android/datamodel/ThumbnailsCacheManager.java +++ b/src/com/owncloud/android/datamodel/ThumbnailsCacheManager.java @@ -55,6 +55,7 @@ import com.owncloud.android.lib.resources.status.OwnCloudVersion; import com.owncloud.android.ui.adapter.DiskLruImageCache; import com.owncloud.android.utils.BitmapUtils; import com.owncloud.android.utils.DisplayUtils; +import com.owncloud.android.utils.FileStorageUtils; /** * Manager for concurrent access to thumbnails cache. @@ -188,8 +189,7 @@ public class ThumbnailsCacheManager { thumbnail = doFileInBackground(); String url = ((File) mFile).getAbsolutePath(); - FileNameMap fileNameMap = URLConnection.getFileNameMap(); - String mMimeType = fileNameMap.getContentTypeFor("file://" + url); + String mMimeType = FileStorageUtils.getMimeTypeFromName(url); if (mMimeType != null && mMimeType.startsWith("video/")){ thumbnail = addVideoOverlay(thumbnail); diff --git a/src/com/owncloud/android/ui/adapter/FileListListAdapter.java b/src/com/owncloud/android/ui/adapter/FileListListAdapter.java index 5c0e8e8c..26d77db5 100644 --- a/src/com/owncloud/android/ui/adapter/FileListListAdapter.java +++ b/src/com/owncloud/android/ui/adapter/FileListListAdapter.java @@ -317,15 +317,12 @@ public class FileListListAdapter extends BaseAdapter implements ListAdapter { fileIcon, mStorageManager, mAccount ); if (thumbnail == null) { -// thumbnail = ThumbnailsCacheManager.mDefaultImg; - Integer id = DisplayUtils.getFileTypeIconId(file.getMimetype(), - file.getFileName()); - thumbnail = BitmapFactory.decodeResource(mContext.getResources(), id); + thumbnail = ThumbnailsCacheManager.mDefaultImg; } final ThumbnailsCacheManager.AsyncDrawable asyncDrawable = new ThumbnailsCacheManager.AsyncDrawable( - mContext.getResources(), - thumbnail, + mContext.getResources(), + thumbnail, task ); fileIcon.setImageDrawable(asyncDrawable);