Closed Bug 717231 Opened 13 years ago Closed 13 years ago

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

Categories

(Firefox for Android Graveyard :: General, defect)

ARM
Android
defect
Not set
normal

Tracking

(firefox11 fixed, firefox12 verified)

VERIFIED FIXED
Firefox 12
Tracking Status
firefox11 --- fixed
firefox12 --- verified

People

(Reporter: aaronmt, Assigned: mfinkle)

References

Details

(Keywords: reproducible)

Attachments

(1 file)

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
Attached patch patchSplinter Review
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)
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
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 12
Verified on Nightly (12.0a1)
Samsung Nexus S (Android 4.0.3)
20120113052739
http://hg.mozilla.org/mozilla-central/rev/790cd9bba7f5
Status: RESOLVED → VERIFIED
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 on attachment 587774 [details] [diff] [review]
patch

[Triage Comment]
Mobile only - approved for Aurora.
Attachment #587774 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: