Skip to main content

Variable: MAX_STOP_FOREGROUND_TIMEOUT_MS

const MAX_STOP_FOREGROUND_TIMEOUT_MS: 600000 = 600_000;

Defined in: packages/media-session/src/validate.ts:556

media3's MediaSessionService.DEFAULT_FOREGROUND_SERVICE_TIMEOUT_MS, which is both the default and the maximum: the setter runs the argument through Util.constrainValue(v, 0, DEFAULT_FOREGROUND_SERVICE_TIMEOUT_MS), so a larger value is clamped down rather than honoured (media3 1.11.0, confirmed by javap on the shipped AAR: ConstantValue: long 600000l).

Exported so an app can say "half of media3's default" without hard-coding ten minutes, and so a test can assert the ceiling.