Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reland: "Adding app lifecycle notification for macOS and Linux, add hidden state." (#40542) #42418

Merged
merged 2 commits into from May 30, 2023

Conversation

gspencergoog
Copy link
Contributor

@gspencergoog gspencergoog commented May 30, 2023

Description

This reverts commit 57e491a to re-land #40542 to fix the lint warning which caused the original PR to be reverted (the lint warnings were turned on after the original was landed, which is why it wasn't caught earlier).

…hidden` state." (flutter#42384)

This reverts commit 57e491a to fix the lint warnings.
@gspencergoog gspencergoog changed the title Reland: "Adding app lifecycle notification for macOS and Linux, add hidden state." (#42384) Reland: "Adding app lifecycle notification for macOS and Linux, add hidden state." (#40542) May 30, 2023
Copy link
Member

@cbracken cbracken left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM stamp from a Japanese personal seal

@gspencergoog gspencergoog added the autosubmit Merge PR when tree becomes green via auto submit App label May 30, 2023
@auto-submit auto-submit bot merged commit 81839ac into flutter:main May 30, 2023
29 checks passed
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request May 30, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request May 30, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request May 30, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request May 30, 2023
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request May 30, 2023
…127890)

flutter/engine@a6d3124...1ba8091

2023-05-30 jhy03261997@gmail.com Handle a11y focus event on Ios and android (flutter/engine#41777)
2023-05-30 matej.knopp@gmail.com Fix unitialized SkRect (flutter/engine#42403)
2023-05-30 reidbaker@google.com Update engine testing to use api 33 for android tests.  (flutter/engine#42351)
2023-05-30 gspencergoog@users.noreply.github.com Reland: "Adding app lifecycle notification for macOS and Linux, add `hidden` state." (#40542) (flutter/engine#42418)
2023-05-30 30870216+gaaclarke@users.noreply.github.com [Impeller] Fixed GlyphAtlasWithLotsOfdUniqueGlyphSize (flutter/engine#42423)
2023-05-30 54558023+keyonghan@users.noreply.github.com Remove legacy xcode properties/dependencies (flutter/engine#42368)
2023-05-30 skia-flutter-autoroll@skia.org Roll Skia from bab82f14da1a to fed417995ba9 (7 revisions) (flutter/engine#42424)
2023-05-30 30870216+gaaclarke@users.noreply.github.com [Impeller] removed vulkan unit test csv (flutter/engine#42354)
2023-05-30 skia-flutter-autoroll@skia.org Roll Skia from d22106cc40a0 to bab82f14da1a (7 revisions) (flutter/engine#42420)

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 jonahwilliams@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose

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/+doc/main/autoroll/README.md
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Jun 8, 2023
#123274)

## Description

This adds `AppLifecycleListener`, a class for listening to changes in the application lifecycle, and responding to requests to exit the application.

It depends on changes in the Engine that add new lifecycle states: flutter/engine#42418

Here's a diagram for the lifecycle states. I'll add a similar diagram to the documentation for these classes.

![Application Lifecycle Diagram](https://github.com/flutter/flutter/assets/8867023/f6937002-cb93-4ab9-a221-25de2c45cf0e)

## Related Issues
 - #30735

## Tests
- Added tests for new lifecycle value, as well as for the `AppLifecycleListener` itself.
0xZOne added a commit to 0xZOne/flutter_boost that referenced this pull request Jan 6, 2024
Fix the following exception:

══╡ EXCEPTION CAUGHT BY SERVICES LIBRARY ╞══════════════════════════════════════════════════════════
The following assertion was thrown during a platform message callback:
Invalid lifecycle state transition generated from AppLifecycleState.resumed to
AppLifecycleState.detached (generated [AppLifecycleState.detached])
'package:flutter/src/services/binding.dart':
Failed assertion: line 296 pos 12: '(){
      AppLifecycleState? starting = previousState;
      for (final AppLifecycleState ending in stateChanges) {
        if (!_debugVerifyLifecycleChange(starting, ending)) {
          return false;
        }
        starting = ending;
      }
      return true;
    }()'

Either the assertion indicates an error in the framework itself, or we should provide substantially
more information in this error message to help you determine and fix the underlying cause.
In either case, please report this assertion by filing a bug on GitHub:
  https://github.com/flutter/flutter/issues/new?template=2_bug.yml

When the exception was thrown, this was the stack:
(elided 4 frames from class _AssertionError and dart:async)
════════════════════════════════════════════════════════════════════════════════════════════════════

See also: flutter/engine#42418
0xZOne added a commit to alibaba/flutter_boost that referenced this pull request Jan 6, 2024
Fix the following exception:

══╡ EXCEPTION CAUGHT BY SERVICES LIBRARY ╞══════════════════════════════════════════════════════════
The following assertion was thrown during a platform message callback:
Invalid lifecycle state transition generated from AppLifecycleState.resumed to
AppLifecycleState.detached (generated [AppLifecycleState.detached])
'package:flutter/src/services/binding.dart':
Failed assertion: line 296 pos 12: '(){
      AppLifecycleState? starting = previousState;
      for (final AppLifecycleState ending in stateChanges) {
        if (!_debugVerifyLifecycleChange(starting, ending)) {
          return false;
        }
        starting = ending;
      }
      return true;
    }()'

Either the assertion indicates an error in the framework itself, or we should provide substantially
more information in this error message to help you determine and fix the underlying cause.
In either case, please report this assertion by filing a bug on GitHub:
  https://github.com/flutter/flutter/issues/new?template=2_bug.yml

When the exception was thrown, this was the stack:
(elided 4 frames from class _AssertionError and dart:async)
════════════════════════════════════════════════════════════════════════════════════════════════════

See also: flutter/engine#42418
@@ -805,55 +805,75 @@ - (nonnull NSView*)createWithViewIdentifier:(int64_t)viewId arguments:(nullable
EXPECT_TRUE(announced);
}

TEST_F(FlutterEngineTest, RunWithEntrypointUpdatesDisplayConfig) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Presumably, it wasn't the intention of this PR to remove this test and the next one? Probably just a bad merge?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Huh. No, definitely not intended.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
autosubmit Merge PR when tree becomes green via auto submit App platform-android platform-linux platform-macos platform-web Code specifically for the web engine platform-windows
Projects
None yet
3 participants