1. 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
  2. 22 Jun, 2016 2 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
  3. 20 Jun, 2016 1 commit
  4. 08 Jun, 2016 1 commit
  5. 03 Jun, 2016 1 commit
  6. 26 May, 2016 1 commit
  7. 23 May, 2016 1 commit
  8. 21 May, 2016 1 commit
  9. 18 May, 2016 1 commit
  10. 16 May, 2016 2 commits
  11. 13 May, 2016 1 commit
  12. 11 May, 2016 1 commit
  13. 10 May, 2016 1 commit
  14. 09 May, 2016 2 commits
  15. 06 May, 2016 1 commit
  16. 04 May, 2016 1 commit
  17. 03 May, 2016 2 commits
  18. 02 May, 2016 2 commits
  19. 29 Apr, 2016 2 commits
    • Ben Lin's avatar
      Add ability to rename a downloaded file. · b0e0dec8
      Ben Lin authored
      Bug: 28359663
      Change-Id: Id74ab041717f553bbd81ab2f69b1b8fa0d4d230d
      b0e0dec8
    • Jeff Sharkey's avatar
      Visible downloads should run while blocked/dozing. · b3597b9d
      Jeff Sharkey authored
      Downloads with visible notifications should behave as if the
      requesting app was running a foreground service.  The easiest way
      to implement this for now is to ignore any BLOCKED network status
      and use the new setWillBeForeground() API so job scheduling ignores
      any active blocked/dozing status.
      
      Bug: 26571724
      Change-Id: I8ea2b2a7cdb5f469adc11b4d897ff55bd8a9db9a
      b3597b9d
  20. 27 Apr, 2016 1 commit
  21. 25 Apr, 2016 1 commit
    • Jeff Sharkey's avatar
      Move DownloadManager to use JobScheduler. · 3a5f5eaf
      Jeff Sharkey authored
      JobScheduler is in a much better position to coordinate tasks across
      the platform to optimize battery and RAM usage.  This change removes
      a bunch of manual scheduling logic by representing each download as
      a separate job with relevant scheduling constraints.  Requested
      network types, retry backoff timing, and newly added charging and
      idle constraints are plumbed through as job parameters.
      
      When a job times out, we halt the download and schedule it to resume
      later.  The majority of downloads should have ETag values to enable
      resuming like this.
      
      Remove local wakelocks, since the platform now acquires and blames
      our jobs on the requesting app.
      
      When an active download is pushing updates to the database, check for
      both paused and cancelled state to quickly halt an ongoing download.
      
      Shift DownloadNotifier to update directly based on a Cursor, since we
      no longer have the overhead of fully-parsed DownloadInfo objects.
      
      Unify a handful of worker threads into a single shared thread.
      
      Remove legacy "large download" activity that was thrown in the face
      of the user; the UX best-practice is to go through notification, and
      update that dialog to let the user override and continue if under
      the hard limit.
      
      Bug: 28098882, 26571724
      Change-Id: I33ebe59b3c2ea9c89ec526f70b1950c734abc4a7
      3a5f5eaf
  22. 20 Apr, 2016 1 commit
  23. 19 Apr, 2016 2 commits
  24. 08 Apr, 2016 1 commit
  25. 07 Apr, 2016 2 commits
  26. 04 Apr, 2016 1 commit
  27. 31 Mar, 2016 1 commit
    • Jeff Sharkey's avatar
      Avoid flashing download notifications. · 08fa91ba
      Jeff Sharkey authored
      When service starts, use new API to read the current set of
      notification tags from the system instead of clearing and starting
      from scratch.
      
      Bug: 27634130
      Change-Id: I049fe5e445a62a52042d7638c2cb50417977435f
      08fa91ba
  28. 24 Mar, 2016 1 commit
  29. 21 Mar, 2016 1 commit
    • Jeff Sharkey's avatar
      Remove chmod(0644) for finished downloads. · a013d5b1
      Jeff Sharkey authored
      Now that PackageInstaller can read APKs from content:// Uris, we
      don't need to make downloads world-readable.  This is mostly just
      cleanup, since our top-level private data directory is no longer
      o+x, so other apps can't traverse in anyway.
      
      Bug: 5464052
      Change-Id: I45de6a40c28b85c64d5afbc13068fe3ae8341d93
      a013d5b1
  30. 19 Mar, 2016 1 commit
  31. 15 Mar, 2016 1 commit
  32. 10 Mar, 2016 1 commit