1. 01 May, 2020 11 commits
    • DownloadManagerTest: Remove method chaining · 413b7a94
      - Assertion chaining is generally discouraged. For example, because it's harder
        to determine which assertion failed given a line number.
      - Also removed chaining of the form obj.actionX().assertY(), because it's easy
        for someone editing the test to accidentally delete actionX() when deleting
        assertY(), where-as actionX() may often be important for subsequent assertions.
      
      PiperOrigin-RevId: 308820503
      olly committed
    • DownloadManagerTest: Improve thread interactions · 37d9e2f4
      - Remove assertReleased and replace it with a proper condition variable
        that's opened when Downloader.download or Download.remove finish. As
        far as I can tell assertReleased was basically implementing "sleep for
        10 seconds after the Downloader starts". Note fixing this properly
        also makes the tests run much faster!
      - Use ConditionVariable instead of CountDownLatch(1).
      - Use AtomicInteger instead of volatile int because it's clearer and
        allows removal of explanatory comments.
      
      PiperOrigin-RevId: 308819204
      olly committed
    • Replace IMA ad tag fakes with mocks · 5c216977
      The mocking setup is quite messy/unclear compared to the fakes, but it seems
      worth switching over because IMA API changes have already required changes
      to fakes in the past, and there are more API changes in the version we are
      about to upgrade to. This change should generally remove the need to keep
      the fakes up-to-date.
      
      PiperOrigin-RevId: 308819176
      andrewlewis committed
    • ConditionVariable: Fix block(long) to correctly handle large timeouts · 1c34029e
      PiperOrigin-RevId: 308815613
      olly committed
    • ConditionVariable: Improve documentation and allow clock injection · be07b3ca
      - Improve documentation explaining the benefits of ExoPlayer's ConditionVariable
        over the one that the platform provides
      - Allow Clock injection
      - Create TestUtil method for obtaining a ConditionVariable whose block(long)
        method times out correctly when used in a Robolectric test
      - Add basic unit tests for ConditionVariable
      
      PiperOrigin-RevId: 308812698
      olly committed
    • Create opt-in to throw when Player is accessed on wrong thread. · c9ff3ef6
      This allows users to verify their own usage before the default
      value is changed to an opt-out.
      
      issue:#4463
      PiperOrigin-RevId: 308808722
      tonihei committed
    • av1_extension: Add a heuristic to determine default thread count · de7c2c36
      Android scheduler has performance issues when a device has a
      combiation of big/medium/little cores. Add a heuristic to set the
      default number of threads used for deocding to the number of
      "performance" (i.e. big) cores.
      
      PiperOrigin-RevId: 308683989
      vigneshv committed
    • Add loadTaskId to LoadEventInfo · b5112492
      To be used by the LoadErrorHandlingPolicy.
      
      PiperOrigin-RevId: 308657905
      aquilescanta committed
    • SegmentDownloader: Pull manifest loading up to base class. · 0ba397cd
      This will make it a bit easier to push manifest loads to an Executor.
      
      Issue: #5978
      PiperOrigin-RevId: 308608155
      olly committed
    • Add CacheDataSourceFactory getters · 2e1024f0
      A previous change added these getters to CacheDataSource, but it can
      also be useful to retrieve these components directly from the factory.
      This is useful for tasks where we're going to need to build multiple
      CacheDataSource instances (e.g., to make requests in parallel), and
      also need to operate directly on the same components. It's a bit more
      natural to retrieve them from the factory than from an arbitrary
      CacheDataSource in this case, since it can avoid unnatural code where
      you create a CacheDataSource instance earlier than you would otherwise
      just to use its getters, and/or create one just to use its getters and
      then throw it away.
      
      PiperOrigin-RevId: 308606020
      olly committed
    • DownloadManagerTest: Remove spurious tests and start to simplify · 86fb3dfe
      PiperOrigin-RevId: 308597964
      olly committed
  2. 27 Apr, 2020 29 commits