Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Conversation

blasten
Copy link

@blasten blasten commented May 14, 2020

Adds the screenshots for the Android view. It's expected that the screenshots don't render the Android view since the code hasn't been implemented yet.

I refactored the scenario test app a bit, so that it's possible to pass additional configuration data over the channel.

@blasten blasten force-pushed the android_view_screenshots branch 4 times, most recently from 1a35526 to 8f10c51 Compare May 14, 2020 01:51
@blasten blasten marked this pull request as ready for review May 14, 2020 01:53
@auto-assign auto-assign bot requested a review from gaaclarke May 14, 2020 01:54
@blasten blasten force-pushed the android_view_screenshots branch from 8f10c51 to a28af3b Compare May 14, 2020 01:58
@blasten blasten requested a review from cyanglaz May 14, 2020 01:59
@blasten blasten force-pushed the android_view_screenshots branch from a28af3b to 3d30523 Compare May 14, 2020 02:24
Copy link
Contributor

@cyanglaz cyanglaz left a comment

Choose a reason for hiding this comment

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

LGTM on the testing code. I'll defer the scenario refactoring to @dnfield who I believe was the original author of the main.dart

@blasten blasten requested a review from dnfield May 14, 2020 03:13
callback(Uint8List.fromList(utf8.encode(timelineData)).buffer.asByteData());
break;
default:
print('Unimplemented channel: $name.');
Copy link
Contributor

Choose a reason for hiding this comment

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

throw for same reason

Copy link
Contributor

Choose a reason for hiding this comment

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

Err, actually, why not just pass this down to onPlatformMessage of the scenario that's running?

Copy link
Contributor

Choose a reason for hiding this comment

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

getCurrentScenario()?.onPlatformMessage(....)

Copy link
Author

Choose a reason for hiding this comment

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

This is an unimplemented channel. I think throwing should be fine. If this case occurs, then some mistake was made in the platform test.

Copy link
Contributor

Choose a reason for hiding this comment

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

But how will a scenario that wants to set up a custom channel do so now?

Copy link
Contributor

Choose a reason for hiding this comment

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

If we want to do this, we should remove the onPlatformMessage from the scenario base class.

Copy link
Author

Choose a reason for hiding this comment

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

oh gotcha. That makes sense. It should continue to call currentScenario?.onPlatformMessage(..).

Copy link
Contributor

@dnfield dnfield left a comment

Choose a reason for hiding this comment

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

Overall looks good, I think we really should throw if we can't figure out what to do with a message though.

@blasten blasten requested a review from dnfield May 14, 2020 18:12
Copy link
Contributor

@dnfield dnfield left a comment

Choose a reason for hiding this comment

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

LGTM

@blasten blasten merged commit 5d24587 into flutter:master May 15, 2020
@blasten blasten deleted the android_view_screenshots branch May 15, 2020 20:03
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request May 16, 2020
wandyers pushed a commit to wandyers/engine that referenced this pull request May 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants