Skip to content

Commit fe8ff6b

Browse files
committed
change workflows:remote travis ci
1 parent dcc90dc commit fe8ff6b

File tree

3 files changed

+14
-18
lines changed

3 files changed

+14
-18
lines changed

.github/workflows/maven.yml

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

android-sdk/storage-sample-app/src/main/java/cn/leancloud/sample/DemoBaseActivity.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,8 @@ public void findAllMethods() {
7878
for (String method : methods) {
7979
displayNames.add(method.substring(4));
8080
}
81+
// add for automation test.
82+
displayNames.add("--END--");
8183
}
8284
public List<String> methodsWithPrefix(final String prefix) {
8385
List<String> methods = new ArrayList<String>();
@@ -258,6 +260,10 @@ private String getMethodSourceCode(String name) {
258260

259261
@Override
260262
protected void onListItemClick(android.widget.ListView l, android.view.View v, int position, long id) {
263+
if (position >= codeSnippetList.size()) {
264+
System.out.println("click -end- element.");
265+
return;
266+
}
261267
Intent intent = new Intent(this, DemoRunActivity.class);
262268
DemoRunActivity.demoActivity = this;
263269
String name = codeSnippetList.get(position);

android-sdk/storage-sample-app/src/main/java/cn/leancloud/sample/DemoGroupActivity.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,8 @@ private List<String> myDemoArray() {
109109
array.add("Other");
110110
array.add("UserAuthData");
111111
array.add("ObjectTransfer");
112+
// add for automation test.
113+
array.add("--END--");
112114
return array;
113115
}
114116

@@ -125,8 +127,13 @@ private void startActivityByName(final String className) {
125127
}
126128
}
127129

128-
protected void onListItemClick(android.widget.ListView l, android.view.View v, int position, long id) {
130+
protected void onListItemClick(android.widget.ListView l, android.view.View v, int position,
131+
long id) {
129132
List<String> array = myDemoArray();
133+
if (position >= array.size() - 1) {
134+
System.out.println("click --END-- element");
135+
return;
136+
}
130137
String name = array.get(position);
131138
String value = getActivityClassName(name);
132139
startActivityByName(value);

0 commit comments

Comments
 (0)