Skip to content

Commit 5e3e39d

Browse files
Issue fixes
1 parent 0017758 commit 5e3e39d

File tree

2 files changed

+12
-10
lines changed

2 files changed

+12
-10
lines changed

docs/The-starting-of-an-Android-app.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,9 +119,9 @@ StartsActivity startsActivity = new StartsActivity() {
119119
}
120120
};
121121

122-
Activity activity = new Activity("app package goes here", "app activity goes here");
123-
activity.setWaitAppPackage("app wait package goes here");
124-
activity.setWaitAppActivity("app wait activity goes here");
122+
Activity activity = new Activity("app package goes here", "app activity goes here")
123+
.setWaitAppPackage("app wait package goes here");
124+
.setWaitAppActivity("app wait activity goes here");
125125
StartsActivity startsActivity.startActivity(activity);
126126
```
127127

src/test/java/io/appium/java_client/android/IntentTest.java

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -50,15 +50,17 @@ public class IntentTest {
5050

5151

5252
@Test public void startActivityWithIntent() throws Exception {
53-
assertTrue(((Predicate<AndroidDriver>) driver -> {
54-
final Activity activity = new Activity("com.android.mms", ".ui.ComposeMessageActivity");
55-
activity.setIntentAction("android.intent.action.SEND");
56-
activity.setIntentCategory("android.intent.category.DEFAULT");
57-
activity.setIntentFlags("0x4000000");
58-
activity.setOptionalIntentArguments("-d \"TestIntent\" -t \"text/plain\"");
53+
Predicate<AndroidDriver> predicate = driver -> {
54+
Activity activity = new Activity("com.android.mms",
55+
".ui.ComposeMessageActivity")
56+
.setIntentAction("android.intent.action.SEND")
57+
.setIntentCategory("android.intent.category.DEFAULT")
58+
.setIntentFlags("0x4000000")
59+
.setOptionalIntentArguments("-d \"TestIntent\" -t \"text/plain\"");
5960
driver.startActivity(activity);
6061
return true;
61-
}).test(driver));
62+
};
63+
assertTrue(predicate.test(driver));
6264

6365
}
6466

0 commit comments

Comments
 (0)