Skip to content

Commit 6552a1c

Browse files
committed
Merge branch 'master' into add_zoom_to_android_webview
* master: [ci.yaml] Main branch support (flutter#4440) [video_player] Initialize player when size and duration become available (flutter#4438) [webview_flutter] Implement zoom enabled for ios and android (flutter#4417) Partial revert of "upgraded usage of BinaryMessenger (flutter#4451)" (flutter#4453)
2 parents 7fd7879 + 34caa5f commit 6552a1c

File tree

15 files changed

+72
-179
lines changed

15 files changed

+72
-179
lines changed

.ci.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@
44
# for every commit.
55
#
66
# More information at:
7-
# * https://github.com/flutter/cocoon/blob/master/CI_YAML.md
7+
# * https://github.com/flutter/cocoon/blob/main/CI_YAML.md
88
enabled_branches:
9+
- main
910
- master
1011

1112
platform_properties:

.cirrus.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -197,10 +197,6 @@ task:
197197
- export CIRRUS_CHANGE_MESSAGE=""
198198
- export CIRRUS_COMMIT_MESSAGE=""
199199
- ./script/tool_runner.sh lint-android # must come after build-examples
200-
stable_channel_conditional_script:
201-
- if [[ "$CHANNEL" == "stable" ]]; then
202-
- dart ./ci/stable_conditional.dart
203-
- fi
204200
native_unit_test_script:
205201
# Unsetting CIRRUS_CHANGE_MESSAGE and CIRRUS_COMMIT_MESSAGE as they
206202
# might include non-ASCII characters which makes Gradle crash.

ci/stable_conditional.dart

Lines changed: 0 additions & 67 deletions
This file was deleted.

packages/android_intent/android/src/test/java/io/flutter/plugins/androidintent/MethodCallHandlerImplTest.java

Lines changed: 5 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,7 @@ public void startListening_registersChannel() {
5555
methodCallHandler.startListening(messenger);
5656

5757
verify(messenger, times(1))
58-
// FLUTTER_STABLE_CONDITIONAL_IF_NOT_STABLE
59-
.setMessageHandler(eq(CHANNEL_NAME), any(BinaryMessageHandler.class), eq(null));
60-
// FLUTTER_STABLE_CONDITIONAL_ELSE
61-
// .setMessageHandler(eq(CHANNEL_NAME), any(BinaryMessageHandler.class));
62-
// FLUTTER_STABLE_CONDITIONAL_ENDIF
58+
.setMessageHandler(eq(CHANNEL_NAME), any(BinaryMessageHandler.class));
6359
}
6460

6561
@Test
@@ -71,15 +67,9 @@ public void startListening_unregistersExistingChannel() {
7167
methodCallHandler.startListening(secondMessenger);
7268

7369
// Unregisters the first and then registers the second.
74-
// FLUTTER_STABLE_CONDITIONAL_IF_NOT_STABLE
75-
verify(firstMessenger, times(1)).setMessageHandler(CHANNEL_NAME, null, null);
70+
verify(firstMessenger, times(1)).setMessageHandler(CHANNEL_NAME, null);
7671
verify(secondMessenger, times(1))
77-
.setMessageHandler(eq(CHANNEL_NAME), any(BinaryMessageHandler.class), eq(null));
78-
// FLUTTER_STABLE_CONDITIONAL_ELSE
79-
// verify(firstMessenger, times(1)).setMessageHandler(CHANNEL_NAME, null);
80-
// verify(secondMessenger, times(1))
81-
// .setMessageHandler(eq(CHANNEL_NAME), any(BinaryMessageHandler.class));
82-
// FLUTTER_STABLE_CONDITIONAL_ENDIF
72+
.setMessageHandler(eq(CHANNEL_NAME), any(BinaryMessageHandler.class));
8373
}
8474

8575
@Test
@@ -89,11 +79,7 @@ public void stopListening_unregistersExistingChannel() {
8979

9080
methodCallHandler.stopListening();
9181

92-
// FLUTTER_STABLE_CONDITIONAL_IF_NOT_STABLE
93-
verify(messenger, times(1)).setMessageHandler(CHANNEL_NAME, null, null);
94-
// FLUTTER_STABLE_CONDITIONAL_ELSE
95-
// verify(messenger, times(1)).setMessageHandler(CHANNEL_NAME, null);
96-
// FLUTTER_STABLE_CONDITIONAL_ENDIF
82+
verify(messenger, times(1)).setMessageHandler(CHANNEL_NAME, null);
9783
}
9884

9985
@Test
@@ -102,11 +88,7 @@ public void stopListening_doesNothingWhenUnset() {
10288

10389
methodCallHandler.stopListening();
10490

105-
// FLUTTER_STABLE_CONDITIONAL_IF_NOT_STABLE
106-
verify(messenger, never()).setMessageHandler(CHANNEL_NAME, null, null);
107-
// FLUTTER_STABLE_CONDITIONAL_ELSE
108-
// verify(messenger, never()).setMessageHandler(CHANNEL_NAME, null);
109-
// FLUTTER_STABLE_CONDITIONAL_ENDIF
91+
verify(messenger, never()).setMessageHandler(CHANNEL_NAME, null);
11092
}
11193

11294
@Test

packages/camera/camera/android/src/test/java/io/flutter/plugins/camera/DartMessengerTest.java

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212

1313
import android.os.Handler;
1414
import androidx.annotation.NonNull;
15-
import androidx.annotation.Nullable;
1615
import io.flutter.embedding.engine.systemchannels.PlatformChannel;
1716
import io.flutter.plugin.common.BinaryMessenger;
1817
import io.flutter.plugin.common.MethodCall;
@@ -32,15 +31,6 @@ public class DartMessengerTest {
3231
private static class FakeBinaryMessenger implements BinaryMessenger {
3332
private final List<ByteBuffer> sentMessages = new ArrayList<>();
3433

35-
// TODO(aaclarke): Remove when https://github.com/flutter/engine/pull/29147 is on stable.
36-
// FLUTTER_STABLE_CONDITIONAL_IF_NOT_STABLE
37-
@Override
38-
public BinaryMessenger.TaskQueue makeBackgroundTaskQueue() {
39-
return null;
40-
}
41-
// FLUTTER_STABLE_CONDITIONAL_ELSE
42-
// FLUTTER_STABLE_CONDITIONAL_ENDIF
43-
4434
@Override
4535
public void send(@NonNull String channel, ByteBuffer message) {
4636
sentMessages.add(message);
@@ -51,17 +41,8 @@ public void send(@NonNull String channel, ByteBuffer message, BinaryReply callba
5141
send(channel, message);
5242
}
5343

54-
// TODO(aaclarke): Remove when https://github.com/flutter/engine/pull/29147 is on stable.
55-
// FLUTTER_STABLE_CONDITIONAL_IF_NOT_STABLE
5644
@Override
57-
public void setMessageHandler(
58-
@NonNull String channel,
59-
BinaryMessageHandler handler,
60-
@Nullable BinaryMessenger.TaskQueue taskQueue) {}
61-
// FLUTTER_STABLE_CONDITIONAL_ELSE
62-
// @Override
63-
// public void setMessageHandler(@NonNull String channel, BinaryMessageHandler handler) {}
64-
// FLUTTER_STABLE_CONDITIONAL_ENDIF
45+
public void setMessageHandler(@NonNull String channel, BinaryMessageHandler handler) {}
6546

6647
List<ByteBuffer> getMessages() {
6748
return new ArrayList<>(sentMessages);

packages/quick_actions/quick_actions/android/src/test/java/io/flutter/plugins/quickactions/QuickActionsTest.java

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,6 @@ public class QuickActionsTest {
3333
private static class TestBinaryMessenger implements BinaryMessenger {
3434
public MethodCall lastMethodCall;
3535

36-
// TODO(aaclarke): Remove when https://github.com/flutter/engine/pull/29147 is on stable.
37-
// FLUTTER_STABLE_CONDITIONAL_IF_NOT_STABLE
38-
@Override
39-
public BinaryMessenger.TaskQueue makeBackgroundTaskQueue() {
40-
return null;
41-
}
42-
// FLUTTER_STABLE_CONDITIONAL_ELSE
43-
// FLUTTER_STABLE_CONDITIONAL_ENDIF
44-
4536
@Override
4637
public void send(@NonNull String channel, @Nullable ByteBuffer message) {
4738
send(channel, message, null);
@@ -58,21 +49,10 @@ public void send(
5849
}
5950
}
6051

61-
// TODO(aaclarke): Remove when https://github.com/flutter/engine/pull/29147 is on stable.
62-
// FLUTTER_STABLE_CONDITIONAL_IF_NOT_STABLE
6352
@Override
64-
public void setMessageHandler(
65-
@NonNull String channel,
66-
@Nullable BinaryMessageHandler handler,
67-
@Nullable BinaryMessenger.TaskQueue taskQueue) {
53+
public void setMessageHandler(@NonNull String channel, @Nullable BinaryMessageHandler handler) {
6854
// Do nothing.
6955
}
70-
// FLUTTER_STABLE_CONDITIONAL_ELSE
71-
// @Override
72-
// public void setMessageHandler(
73-
// @NonNull String channel,
74-
// @Nullable BinaryMessageHandler handler) {}
75-
// FLUTTER_STABLE_CONDITIONAL_ENDIF
7656
}
7757

7858
static final int SUPPORTED_BUILD = 25;

packages/url_launcher/url_launcher/android/src/test/java/io/flutter/plugins/urllauncher/MethodCallHandlerImplTest.java

Lines changed: 5 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,7 @@ public void startListening_registersChannel() {
4444
methodCallHandler.startListening(messenger);
4545

4646
verify(messenger, times(1))
47-
// FLUTTER_STABLE_CONDITIONAL_IF_NOT_STABLE
48-
.setMessageHandler(eq(CHANNEL_NAME), any(BinaryMessageHandler.class), eq(null));
49-
// FLUTTER_STABLE_CONDITIONAL_ELSE
50-
// .setMessageHandler(eq(CHANNEL_NAME), any(BinaryMessageHandler.class));
51-
// FLUTTER_STABLE_CONDITIONAL_ENDIF
47+
.setMessageHandler(eq(CHANNEL_NAME), any(BinaryMessageHandler.class));
5248
}
5349

5450
@Test
@@ -60,15 +56,9 @@ public void startListening_unregistersExistingChannel() {
6056
methodCallHandler.startListening(secondMessenger);
6157

6258
// Unregisters the first and then registers the second.
63-
// FLUTTER_STABLE_CONDITIONAL_IF_NOT_STABLE
64-
verify(firstMessenger, times(1)).setMessageHandler(CHANNEL_NAME, null, null);
59+
verify(firstMessenger, times(1)).setMessageHandler(CHANNEL_NAME, null);
6560
verify(secondMessenger, times(1))
66-
.setMessageHandler(eq(CHANNEL_NAME), any(BinaryMessageHandler.class), eq(null));
67-
// FLUTTER_STABLE_CONDITIONAL_ELSE
68-
// verify(firstMessenger, times(1)).setMessageHandler(CHANNEL_NAME, null);
69-
// verify(secondMessenger, times(1))
70-
// .setMessageHandler(eq(CHANNEL_NAME), any(BinaryMessageHandler.class));
71-
// FLUTTER_STABLE_CONDITIONAL_ENDIF
61+
.setMessageHandler(eq(CHANNEL_NAME), any(BinaryMessageHandler.class));
7262
}
7363

7464
@Test
@@ -78,11 +68,7 @@ public void stopListening_unregistersExistingChannel() {
7868

7969
methodCallHandler.stopListening();
8070

81-
// FLUTTER_STABLE_CONDITIONAL_IF_NOT_STABLE
82-
verify(messenger, times(1)).setMessageHandler(CHANNEL_NAME, null, null);
83-
// FLUTTER_STABLE_CONDITIONAL_ELSE
84-
// verify(messenger, times(1)).setMessageHandler(CHANNEL_NAME, null);
85-
// FLUTTER_STABLE_CONDITIONAL_ENDIF
71+
verify(messenger, times(1)).setMessageHandler(CHANNEL_NAME, null);
8672
}
8773

8874
@Test
@@ -91,11 +77,7 @@ public void stopListening_doesNothingWhenUnset() {
9177

9278
methodCallHandler.stopListening();
9379

94-
// FLUTTER_STABLE_CONDITIONAL_IF_NOT_STABLE
95-
verify(messenger, never()).setMessageHandler(CHANNEL_NAME, null, null);
96-
// FLUTTER_STABLE_CONDITIONAL_ELSE
97-
// verify(messenger, never()).setMessageHandler(CHANNEL_NAME, null);
98-
// FLUTTER_STABLE_CONDITIONAL_ENDIF
80+
verify(messenger, never()).setMessageHandler(CHANNEL_NAME, null);
9981
}
10082

10183
@Test

packages/video_player/video_player/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 2.2.6
2+
3+
* Initialize player when size and duration become available on iOS
4+
15
## 2.2.5
26

37
* Support to closed caption WebVTT format added.

packages/video_player/video_player/example/ios/Runner.xcodeproj/project.pbxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
archiveVersion = 1;
44
classes = {
55
};
6-
objectVersion = 46;
6+
objectVersion = 50;
77
objects = {
88

99
/* Begin PBXBuildFile section */
@@ -269,7 +269,7 @@
269269
97C146E61CF9000F007C117D /* Project object */ = {
270270
isa = PBXProject;
271271
attributes = {
272-
LastUpgradeCheck = 1100;
272+
LastUpgradeCheck = 1300;
273273
ORGANIZATIONNAME = "The Flutter Authors";
274274
TargetAttributes = {
275275
97C146ED1CF9000F007C117D = {

packages/video_player/video_player/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "1100"
3+
LastUpgradeVersion = "1300"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"

packages/video_player/video_player/example/ios/RunnerUITests/VideoPlayerUITests.m

Lines changed: 26 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,33 +18,46 @@ - (void)setUp {
1818
[self.app launch];
1919
}
2020

21-
- (void)testTabs {
21+
- (void)testPlayVideo {
2222
XCUIApplication* app = self.app;
2323

2424
XCUIElement* remoteTab = [app.otherElements
2525
elementMatchingPredicate:[NSPredicate predicateWithFormat:@"selected == YES"]];
26-
if (![remoteTab waitForExistenceWithTimeout:30.0]) {
27-
os_log_error(OS_LOG_DEFAULT, "%@", app.debugDescription);
28-
XCTFail(@"Failed due to not able to find selected Remote tab");
29-
}
26+
XCTAssertTrue([remoteTab waitForExistenceWithTimeout:30.0]);
3027
XCTAssertTrue([remoteTab.label containsString:@"Remote"]);
3128

29+
XCUIElement* playButton = app.staticTexts[@"Play"];
30+
XCTAssertTrue([playButton waitForExistenceWithTimeout:30.0]);
31+
[playButton tap];
32+
33+
XCUIElement* chirpClosedCaption = app.staticTexts[@"[ Birds chirping ]"];
34+
XCTAssertTrue([chirpClosedCaption waitForExistenceWithTimeout:30.0]);
35+
36+
XCUIElement* buzzClosedCaption = app.staticTexts[@"[ Buzzing ]"];
37+
XCTAssertTrue([buzzClosedCaption waitForExistenceWithTimeout:30.0]);
38+
39+
XCUIElement* playbackSpeed1x = app.staticTexts[@"Playback speed\n1.0x"];
40+
XCTAssertTrue([playbackSpeed1x waitForExistenceWithTimeout:30.0]);
41+
[playbackSpeed1x tap];
42+
43+
XCUIElement* playbackSpeed5xButton = app.buttons[@"5.0x"];
44+
XCTAssertTrue([playbackSpeed5xButton waitForExistenceWithTimeout:30.0]);
45+
[playbackSpeed5xButton tap];
46+
47+
XCUIElement* playbackSpeed5x = app.staticTexts[@"Playback speed\n5.0x"];
48+
XCTAssertTrue([playbackSpeed5x waitForExistenceWithTimeout:30.0]);
49+
50+
// Cycle through tabs.
3251
for (NSString* tabName in @[ @"Asset", @"List example" ]) {
3352
NSPredicate* predicate = [NSPredicate predicateWithFormat:@"label BEGINSWITH %@", tabName];
3453
XCUIElement* unselectedTab = [app.staticTexts elementMatchingPredicate:predicate];
35-
if (![unselectedTab waitForExistenceWithTimeout:30.0]) {
36-
os_log_error(OS_LOG_DEFAULT, "%@", app.debugDescription);
37-
XCTFail(@"Failed due to not able to find unselected %@ tab", tabName);
38-
}
54+
XCTAssertTrue([unselectedTab waitForExistenceWithTimeout:30.0]);
3955
XCTAssertFalse(unselectedTab.isSelected);
4056
[unselectedTab tap];
4157

4258
XCUIElement* selectedTab = [app.otherElements
4359
elementMatchingPredicate:[NSPredicate predicateWithFormat:@"label BEGINSWITH %@", tabName]];
44-
if (![selectedTab waitForExistenceWithTimeout:30.0]) {
45-
os_log_error(OS_LOG_DEFAULT, "%@", app.debugDescription);
46-
XCTFail(@"Failed due to not able to find selected %@ tab", tabName);
47-
}
60+
XCTAssertTrue([selectedTab waitForExistenceWithTimeout:30.0]);
4861
XCTAssertTrue(selectedTab.isSelected);
4962
}
5063
}

packages/video_player/video_player/example/lib/main.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,7 @@ class _ControlsOverlay extends StatelessWidget {
298298
Icons.play_arrow,
299299
color: Colors.white,
300300
size: 100.0,
301+
semanticLabel: 'Play',
301302
),
302303
),
303304
),

0 commit comments

Comments
 (0)