mirror of
https://github.com/samsonjs/media.git
synced 2026-04-14 12:45:47 +00:00
Demo: Move DownloadService calls to new method in SampleChooserActivity
This allows the whole startDownloadService() method to be opted into the unstable media3 API in a follow-up change. PiperOrigin-RevId: 437228776
This commit is contained in:
parent
f42d09cf15
commit
9c2ee5a224
1 changed files with 4 additions and 1 deletions
|
|
@ -116,8 +116,11 @@ public class SampleChooserActivity extends AppCompatActivity
|
|||
useExtensionRenderers = DemoUtil.useExtensionRenderers();
|
||||
downloadTracker = DemoUtil.getDownloadTracker(/* context= */ this);
|
||||
loadSample();
|
||||
startDownloadService();
|
||||
}
|
||||
|
||||
// Start the download service if it should be running but it's not currently.
|
||||
/** Start the download service if it should be running but it's not currently. */
|
||||
private void startDownloadService() {
|
||||
// Starting the service in the foreground causes notification flicker if there is no scheduled
|
||||
// action. Starting it in the background throws an exception if the app is in the background too
|
||||
// (e.g. if device screen is locked).
|
||||
|
|
|
|||
Loading…
Reference in a new issue