Commit dc4dbe6a by ibaker Committed by Ian Baker

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
parent 0f5686fe
......@@ -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).
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment