Unverified Commit 34995ba9 authored by Lau Ching Jun's avatar Lau Ching Jun Committed by GitHub

Make AndroidApk nullable in stopApp. (#113353)

parent 6df26052
...@@ -720,7 +720,7 @@ class AndroidDevice extends Device { ...@@ -720,7 +720,7 @@ class AndroidDevice extends Device {
@override @override
Future<bool> stopApp( Future<bool> stopApp(
AndroidApk app, { AndroidApk? app, {
String? userIdentifier, String? userIdentifier,
}) { }) {
if (app == null) { if (app == null) {
......
...@@ -905,7 +905,7 @@ class FakeAndroidDevice extends Fake implements AndroidDevice { ...@@ -905,7 +905,7 @@ class FakeAndroidDevice extends Fake implements AndroidDevice {
ApplicationPackage? stopAppPackage; ApplicationPackage? stopAppPackage;
@override @override
Future<bool> stopApp( Future<bool> stopApp(
ApplicationPackage app, { ApplicationPackage? app, {
String? userIdentifier, String? userIdentifier,
}) async { }) async {
stopAppPackage = app; stopAppPackage = app;
......
...@@ -326,7 +326,7 @@ class FakeAndroidDevice extends Fake implements AndroidDevice { ...@@ -326,7 +326,7 @@ class FakeAndroidDevice extends Fake implements AndroidDevice {
ApplicationPackage? stopAppPackage; ApplicationPackage? stopAppPackage;
@override @override
Future<bool> stopApp( Future<bool> stopApp(
ApplicationPackage app, { ApplicationPackage? app, {
String? userIdentifier, String? userIdentifier,
}) async { }) async {
stopAppPackage = app; stopAppPackage = app;
......
...@@ -454,6 +454,13 @@ Uptime: 441088659 Realtime: 521464097 ...@@ -454,6 +454,13 @@ Uptime: 441088659 Realtime: 521464097
// contains identifier for platform in memory info. // contains identifier for platform in memory info.
expect(json, containsPair('platform', 'Android')); expect(json, containsPair('platform', 'Android'));
}); });
testWithoutContext('AndroidDevice stopApp does nothing if app is not passed', () async {
final AndroidDevice device = setUpAndroidDevice();
expect(await device.stopApp(null), isFalse);
});
} }
AndroidDevice setUpAndroidDevice({ AndroidDevice setUpAndroidDevice({
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment