-
Notifications
You must be signed in to change notification settings - Fork 6k
Started setting our debug background task id to invalid #12999
Conversation
I don't have an iOS 13 device so I couldn't test it. I tested it on iOS 11 and it works. I've based the change off the research I did in this comment: flutter/flutter#41095 (comment) |
@@ -143,7 +144,10 @@ - (void)handleDidEnterBackground:(NSNotification*)notification { | |||
_debugBackgroundTask = [application | |||
beginBackgroundTaskWithName:@"Flutter debug task" | |||
expirationHandler:^{ | |||
[application endBackgroundTask:_debugBackgroundTask]; | |||
if (_debugBackgroundTask != UIBackgroundTaskInvalid) { | |||
[application endBackgroundTask:_debugBackgroundTask]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this need to be done in dealloc as well (add-to-app where this delegate may actually be deallocated)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think so. The background task has a retain on the FlutterPluginAppLifeCycleDelegate so it can't be dealloced while it is running.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This didn't fix the original issue. The original issue seems to be a bug in iOS 13 (see issue for more detains). I'm going to keep this change since I think it is still a positive change. |
git@github.com:flutter/engine.git/compare/c635d70c7266...21b8224 git log c635d70..21b8224 --no-merges --oneline 2019-10-08 gspencergoog@users.noreply.github.com Send AccessibilityEvent.TYPE_VIEW_FOCUSED when input focus is set. (flutter/engine#12746) 2019-10-08 dnfield@google.com Fix for a11y crash on iOS (flutter/engine#12990) 2019-10-08 katelovett@google.com Link Semantics Typo (flutter/engine#13009) 2019-10-08 ferhat@gmail.com [web] Add support for path transform (flutter/engine#12794) 2019-10-08 jason-simmons@users.noreply.github.com Auto-formatter fixes for BUILD.gn files (flutter/engine#13005) 2019-10-08 bkonyi@google.com Unblock SIGPROF on flutter_tester start (flutter/engine#12813) 2019-10-08 mouad.debbar@gmail.com [web] Update the url when route is replaced (flutter/engine#13003) 2019-10-08 katelovett@google.com Missing link flag (flutter/engine#13001) 2019-10-08 30870216+gaaclarke@users.noreply.github.com Started setting our debug background task id to invalid after completion. (flutter/engine#12999) 2019-10-08 ychris@google.com Add `onUnregistered` callback in 'Texture' and 'FlutterTexture' (flutter/engine#12695) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Please CC chinmaygarde@google.com on the revert to ensure that a human is aware of the problem. To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+/master/autoroll/README.md
git@github.com:flutter/engine.git/compare/c635d70c7266...21b8224 git log c635d70..21b8224 --no-merges --oneline 2019-10-08 gspencergoog@users.noreply.github.com Send AccessibilityEvent.TYPE_VIEW_FOCUSED when input focus is set. (flutter/engine#12746) 2019-10-08 dnfield@google.com Fix for a11y crash on iOS (flutter/engine#12990) 2019-10-08 katelovett@google.com Link Semantics Typo (flutter/engine#13009) 2019-10-08 ferhat@gmail.com [web] Add support for path transform (flutter/engine#12794) 2019-10-08 jason-simmons@users.noreply.github.com Auto-formatter fixes for BUILD.gn files (flutter/engine#13005) 2019-10-08 bkonyi@google.com Unblock SIGPROF on flutter_tester start (flutter/engine#12813) 2019-10-08 mouad.debbar@gmail.com [web] Update the url when route is replaced (flutter/engine#13003) 2019-10-08 katelovett@google.com Missing link flag (flutter/engine#13001) 2019-10-08 30870216+gaaclarke@users.noreply.github.com Started setting our debug background task id to invalid after completion. (flutter/engine#12999) 2019-10-08 ychris@google.com Add `onUnregistered` callback in 'Texture' and 'FlutterTexture' (flutter/engine#12695) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Please CC chinmaygarde@google.com on the revert to ensure that a human is aware of the problem. To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+/master/autoroll/README.md
after completion
Relevant Issue: flutter/flutter#41095