mirror of
https://github.com/KRTirtho/spotube.git
synced 2026-08-05 19:59:51 +00:00
Merge f9e1794860 into 69a310c78f
This commit is contained in:
commit
1ce4af137d
@ -82,7 +82,16 @@ Future<void> main(List<String> rawArgs) async {
|
||||
|
||||
// force High Refresh Rate on some Android devices (like One Plus)
|
||||
if (kIsAndroid) {
|
||||
await FlutterDisplayMode.setHighRefreshRate();
|
||||
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();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user