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

Commit 525240e

Browse files
committed
Fix formatting
1 parent 4315d84 commit 525240e

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

packages/url_launcher/url_launcher/android/src/main/java/io/flutter/plugins/urllauncher/MethodCallHandlerImpl.java

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -92,11 +92,12 @@ private void onLaunch(MethodCall call, Result result, String url) {
9292

9393
if (launchStatus == LaunchStatus.NO_ACTIVITY) {
9494
result.error("NO_ACTIVITY", "Launching a URL requires a foreground activity.", null);
95-
}
96-
else if (launchStatus == LaunchStatus.ACTIVITY_NOT_FOUND){
97-
result.error("ACTIVITY_NOT_FOUND", String.format("No Activity found to handle intent { %s }", url), null);
98-
}
99-
else {
95+
} else if (launchStatus == LaunchStatus.ACTIVITY_NOT_FOUND) {
96+
result.error(
97+
"ACTIVITY_NOT_FOUND",
98+
String.format("No Activity found to handle intent { %s }", url),
99+
null);
100+
} else {
100101
result.success(true);
101102
}
102103
}

packages/url_launcher/url_launcher/android/src/main/java/io/flutter/plugins/urllauncher/UrlLauncher.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ boolean canLaunch(String url) {
4949
* @param enableJavaScript Only used if {@param useWebView} is true. Enables JS in the WebView.
5050
* @param enableDomStorage Only used if {@param useWebView} is true. Enables DOM storage in the
5151
* @return {@link LaunchStatus#NO_ACTIVITY} if there's no available {@code applicationContext}.
52-
* {@link LaunchStatus#ACTIVITY_NOT_FOUND} if there's no activity found to handle {@code launchIntent}.
53-
* {@link LaunchStatus#OK} otherwise.
52+
* {@link LaunchStatus#ACTIVITY_NOT_FOUND} if there's no activity found to handle {@code
53+
* launchIntent}. {@link LaunchStatus#OK} otherwise.
5454
*/
5555
LaunchStatus launch(
5656
String url,
@@ -76,8 +76,7 @@ LaunchStatus launch(
7676

7777
try {
7878
activity.startActivity(launchIntent);
79-
}
80-
catch (ActivityNotFoundException e){
79+
} catch (ActivityNotFoundException e) {
8180
return LaunchStatus.ACTIVITY_NOT_FOUND;
8281
}
8382

0 commit comments

Comments
 (0)