1. 27 Sep, 2016 2 commits
    • Jeff Sharkey's avatar
      Enforce calling identity before clearing. · fad29235
      Jeff Sharkey authored
      Fix merge conflict into nyc-release
      When opening a downloaded file, enforce that the caller can actually
      see the requested download before clearing their identity to read
      internal columns.
      
      However, this means that we can no longer return the "my_downloads"
      paths: if those Uris were shared beyond the app that requested the
      download, access would be denied.  Instead, we need to switch to
      using "all_downloads" Uris so that permission grants can be issued
      to third-party viewer apps.
      
      Since an app requesting a download doesn't normally have permission
      to "all_downloads" paths, we issue narrow grants toward the owner of
      each download, both at device boot and when new downloads are
      started.
      
      Bug: 30537115, 30945409
      Change-Id: If944aada020878a91c363963728d0da9f6fae3ea
      (cherry picked from commit 243e6294)
      (cherry picked from commit 1db23ffb)
      fad29235
    • gitbuildkicker's avatar
  2. 26 Sep, 2016 1 commit
    • Jeff Sharkey's avatar
      Enforce calling identity before clearing. · 1db23ffb
      Jeff Sharkey authored
      Fix merge conflict into nyc-release
      When opening a downloaded file, enforce that the caller can actually
      see the requested download before clearing their identity to read
      internal columns.
      
      However, this means that we can no longer return the "my_downloads"
      paths: if those Uris were shared beyond the app that requested the
      download, access would be denied.  Instead, we need to switch to
      using "all_downloads" Uris so that permission grants can be issued
      to third-party viewer apps.
      
      Since an app requesting a download doesn't normally have permission
      to "all_downloads" paths, we issue narrow grants toward the owner of
      each download, both at device boot and when new downloads are
      started.
      
      Bug: 30537115, 30945409
      Change-Id: If944aada020878a91c363963728d0da9f6fae3ea
      (cherry picked from commit 243e6294)
      1db23ffb
  3. 29 Jun, 2016 1 commit
  4. 28 Jun, 2016 2 commits
    • Jeff Sharkey's avatar
      Clear identity when deleting scanned entry. · 01dee865
      Jeff Sharkey authored
      When deleting a file from DownloadManager, we also reach over and
      clean up any scanned MediaStore entries.  However, DownloadManager
      clients may not hold the WRITE_EXTERNAL_STORAGE permission, such as
      when they downloaded a file into their package-specific directories.
      
      The safest fix for now is to clear the calling identity and always
      clean up the MediaStore entries ourselves, since DownloadProvider
      always holds the required storage permission.
      
      Bug: 29777504
      Change-Id: Iea8f5696410010807b118bb56e5b897c53f0e1fe
      01dee865
    • The Android Automerger's avatar
  5. 25 Jun, 2016 1 commit
    • Jeff Sharkey's avatar
      Make scanning decisions based on latest data. · 3a4a3e7c
      Jeff Sharkey authored
      When deciding to kick off a media scan of a newly-downloaded file,
      use the latest values from InfoDelta, instead of stale values from
      the last database read, which may lead us to skip the scan.
      
      Bug: 29234780
      Change-Id: I7ffbcdd1edb9965999b7f5f100f57a9c2933f3a5
      3a4a3e7c
  6. 23 Jun, 2016 1 commit
  7. 22 Jun, 2016 3 commits
    • Jeff Sharkey's avatar
      Re-schedule downloads queued for unmetered. · b5ca499c
      Jeff Sharkey authored
      When a download is stopped due to a metered network, we should
      reschedule the job just like any other network failure.  If a
      download requires an unmetered network, treat WAITING_FOR_NETWORK as
      QUEUED_FOR_WIFI so we show a meaningful notification.
      
      Bug: 29440531
      Change-Id: I31e6535c575fd32e2982ef840ae501acf1db3927
      b5ca499c
    • Jeff Sharkey's avatar
      Update notifications when no jobs are scheduled. · 07c50f1e
      Jeff Sharkey authored
      When inserting an already-completed download, we don't schedule a
      job, leaving notifications stale until the next real download comes
      along.  This change kicks off a notification update pass in these
      cases to ensure we reflect the internal state.
      
      Bug: 29548026
      Change-Id: I6ff87d69d83c265738d5e035197204bbb63cfa81
      07c50f1e
    • The Android Automerger's avatar
  8. 20 Jun, 2016 1 commit
  9. 09 Jun, 2016 1 commit
  10. 08 Jun, 2016 1 commit
  11. 06 Jun, 2016 1 commit
  12. 03 Jun, 2016 1 commit
  13. 29 May, 2016 1 commit
  14. 26 May, 2016 1 commit
  15. 24 May, 2016 1 commit
  16. 23 May, 2016 2 commits
  17. 21 May, 2016 1 commit
  18. 19 May, 2016 1 commit
  19. 18 May, 2016 2 commits
  20. 16 May, 2016 2 commits
  21. 15 May, 2016 1 commit
  22. 13 May, 2016 1 commit
  23. 11 May, 2016 2 commits
  24. 10 May, 2016 1 commit
  25. 09 May, 2016 3 commits
    • Jeff Sharkey's avatar
      Scan completed downloads when requested. · 01c7b5df
      Jeff Sharkey authored
      The recent JobScheduler rewrite means we no longer spin up a service
      when insterting an already-completed download.  However, the calling
      app may have requested the download to be scanned, so kick off a
      scan request for them.
      
      Bug: 28659693
      Change-Id: I497e10995ba04f1522fe8d7e547ebea6e305f6e9
      01c7b5df
    • Jeff Sharkey's avatar
      Scan completed downloads when requested. · 053674aa
      Jeff Sharkey authored
      The recent JobScheduler rewrite means we no longer spin up a service
      when insterting an already-completed download.  However, the calling
      app may have requested the download to be scanned, so kick off a
      scan request for them.
      
      Bug: 28659693
      Change-Id: I497e10995ba04f1522fe8d7e547ebea6e305f6e9
      053674aa
    • Tomasz Mikolajewski's avatar
      Allow viewing content:// Uris from Downloads. · 6bef271b
      Tomasz Mikolajewski authored
      Bug: 28476442
      Change-Id: I12a35a2c35c16ddf899637dfb85c30006c169fd7
      6bef271b
  26. 08 May, 2016 1 commit
  27. 06 May, 2016 1 commit
  28. 04 May, 2016 2 commits
  29. 03 May, 2016 1 commit