The default bug view has changed. See this FAQ.

Downloads are not added to the Download Manager (stock ICS 4.0.3)

VERIFIED FIXED in Firefox 11

Status

()

Firefox for Android
General
VERIFIED FIXED
5 years ago
5 years ago

People

(Reporter: aaronmt, Assigned: mfinkle)

Tracking

({reproducible})

Trunk
Firefox 12
ARM
Android
reproducible
Points:
---

Firefox Tracking Flags

(firefox11 fixed, firefox12 verified)

Details

Attachments

(1 attachment)

(Reporter)

Description

5 years ago
I/GeckoAppShell( 1200): GeckoAppShell.alertsProgressListener_OnCancel('download:///mnt/sdcard/Download/Firefox%209.0b6.dmg')
I/GeckoApp( 1200): Got message: Downloads:Done
D/dalvikvm(  220): GC_FOR_ALLOC freed 423K, 11% free 10677K/11975K, paused 34ms
E/DatabaseUtils(  312): Writing exception to parcel
E/DatabaseUtils(  312): java.lang.SecurityException: Invalid value for visibility: 2
E/DatabaseUtils(  312): 	at com.android.providers.downloads.DownloadProvider.enforceAllowedValues(DownloadProvider.java:795)
E/DatabaseUtils(  312): 	at com.android.providers.downloads.DownloadProvider.checkInsertPermissions(DownloadProvider.java:740)
E/DatabaseUtils(  312): 	at com.android.providers.downloads.DownloadProvider.insert(DownloadProvider.java:472)
E/DatabaseUtils(  312): 	at android.content.ContentProvider$Transport.insert(ContentProvider.java:189)
E/DatabaseUtils(  312): 	at android.content.ContentProviderNative.onTransact(ContentProviderNative.java:152)
E/DatabaseUtils(  312): 	at android.os.Binder.execTransact(Binder.java:338)
E/DatabaseUtils(  312): 	at dalvik.system.NativeStart.run(Native Method)
E/GeckoApp( 1200): Exception handling message "Downloads:Done":
E/GeckoApp( 1200): java.lang.SecurityException: Invalid value for visibility: 2
E/GeckoApp( 1200): 	at android.os.Parcel.readException(Parcel.java:1327)
E/GeckoApp( 1200): 	at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:181)
E/GeckoApp( 1200): 	at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:135)
E/GeckoApp( 1200): 	at android.content.ContentProviderProxy.insert(ContentProviderNative.java:415)
E/GeckoApp( 1200): 	at android.content.ContentResolver.insert(ContentResolver.java:730)
E/GeckoApp( 1200): 	at android.app.DownloadManager.addCompletedDownload(DownloadManager.java:1150)
E/GeckoApp( 1200): 	at org.mozilla.gecko.GeckoApp.handleDownloadDone(GeckoApp.java:1314)
E/GeckoApp( 1200): 	at org.mozilla.gecko.GeckoApp.handleMessage(GeckoApp.java:982)
E/GeckoApp( 1200): 	at org.mozilla.gecko.GeckoAppShell.handleGeckoMessage(GeckoAppShell.java:1586)
E/GeckoApp( 1200): 	at org.mozilla.gecko.GeckoAppShell.nativeRun(Native Method)
E/GeckoApp( 1200): 	at org.mozilla.gecko.GeckoAppShell.nativeRun(Native Method)
E/GeckoApp( 1200): 	at org.mozilla.gecko.GeckoAppShell.runGecko(GeckoAppShell.java:453)
E/GeckoApp( 1200): 	at org.mozilla.gecko.GeckoThread.run(GeckoThread.java:107)

STR:

1. Download something
2. Settings -> Downloads 

ER: Seeing the download 
AR: "No Downloads..."

--
Samsung Nexus S (Android 4.0.3)
20120111031049
http://hg.mozilla.org/mozilla-central/rev/e79ef0ffcb09
(Assignee)

Updated

5 years ago
Duplicate of this bug: 717257
Created attachment 587774 [details] [diff] [review]
patch

Works fin with this patch:
* Adds a permission to allow downloads without system notifications.Needed to avoid the SecurityException since we do not want addCompletedDownload to use an Android notification. We already use our own system notification.
* Uses a setTimeout(..., 0) to allow the local file to settle and we can get a real filesize.
* Adds a real mimeinfo when downloading the PDF

The new permission does not seem to appear in the list of user facing perms, but I think we'd want this even if it did.
Assignee: nobody → mark.finkle
Attachment #587774 - Flags: review?(mbrubeck)
(Assignee)

Updated

5 years ago
Summary: Downloads are not added to the Download Manager (stock ICS 4.0.3) - E/GeckoApp( 1200): java.lang.SecurityException: Invalid value for visibility: 2 → Downloads are not added to the Download Manager (stock ICS 4.0.3)
Attachment #587774 - Flags: review?(mbrubeck) → review+
https://hg.mozilla.org/mozilla-central/rev/67fe34d2c8af
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 12
(Reporter)

Comment 4

5 years ago
Verified on Nightly (12.0a1)
Samsung Nexus S (Android 4.0.3)
20120113052739
http://hg.mozilla.org/mozilla-central/rev/790cd9bba7f5
Status: RESOLVED → VERIFIED
status-firefox12: affected → verified
(Reporter)

Comment 5

5 years ago
Aurora nom?
Comment on attachment 587774 [details] [diff] [review]
patch

[Approval Request Comment]
Needed to support adding downloads (and save to pdf) to the android download manager. Low risk.
Attachment #587774 - Flags: approval-mozilla-aurora?

Comment 7

5 years ago
Comment on attachment 587774 [details] [diff] [review]
patch

[Triage Comment]
Mobile only - approved for Aurora.
Attachment #587774 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
https://hg.mozilla.org/releases/mozilla-aurora/rev/bf7dad68779e
status-firefox11: affected → fixed
You need to log in before you can comment on or make changes to this bug.