This commit is contained in:
gituser-vibes 2026-06-24 14:54:29 -07:00 committed by GitHub
commit 1ce4af137d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -82,7 +82,16 @@ Future<void> main(List<String> rawArgs) async {
// force High Refresh Rate on some Android devices (like One Plus)
if (kIsAndroid) {
try {
await FlutterDisplayMode.setHighRefreshRate();
} catch (e, stack) {
// When the app is cold-started headless (e.g. by Android Auto's
// MediaBrowserService) there is no attached Activity, so this throws
// PlatformException(noActivity). Refresh-rate tuning is non-essential
// and must not abort bootstrap otherwise runApp() never runs and the
// audio handler is never registered, hanging media browsers forever.
AppLogger.reportError(e, stack);
}
}
if (kIsAndroid || kIsDesktop) {
await NewPipeExtractor.init();