mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 20:33:53 +01:00
Fix for 'download' on media detail page on Honeycomb
DownloadManager.Request.VISIBILITY_VISIBLE_NOTIFY_COMPLETED is documented as appearing in 3.0 (api 11) but causes a crash on a GoogleTV 2 (Honeycomb-based) device. Skipping it for Honeycomb as we do for Gingerbread; your media goes into the 'Downloads' directory and can be found there, but there's no notification on completion. GitHub: https://github.com/wikimedia/apps-android-commons/pull/24 Change-Id: I4b5b0c0ffc0d9bfa8d1ff524d531022ba8f3f9f8
This commit is contained in:
parent
1b6d74f7ca
commit
35736733c3
1 changed files with 4 additions and 1 deletions
|
|
@ -181,7 +181,10 @@ public class MediaDetailPagerFragment extends SherlockFragment implements ViewPa
|
|||
|
||||
// On HC/ICS/JB we can leave the download notification up when complete.
|
||||
// This allows folks to open the file directly in gallery viewer.
|
||||
req.setNotificationVisibility(DownloadManager.Request.VISIBILITY_VISIBLE_NOTIFY_COMPLETED);
|
||||
// But for some reason it fails on Honeycomb (Google TV). Sigh.
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) {
|
||||
req.setNotificationVisibility(DownloadManager.Request.VISIBILITY_VISIBLE_NOTIFY_COMPLETED);
|
||||
}
|
||||
}
|
||||
|
||||
final DownloadManager manager = (DownloadManager)getActivity().getSystemService(Context.DOWNLOAD_SERVICE);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue