Skip to content

Commit 3768607

Browse files
committed
修改
1 parent a1d9004 commit 3768607

File tree

4 files changed

+20
-11
lines changed

4 files changed

+20
-11
lines changed

.idea/modules.xml

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/vcs.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/build.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ dependencies {
2828
compile 'com.google.code.gson:gson:2.8.0'
2929
compile 'com.android.support:appcompat-v7:25.1.1'
3030
compile 'com.tencent.bugly:crashreport:latest.release'
31-
compile 'com.android.support.constraint:constraint-layout:1.0.0-alpha6'
3231
compile 'com.github.CymChad:BaseRecyclerViewAdapterHelper:2.9.4'
3332
compile 'com.android.support:recyclerview-v7:25.1.1'
3433
testCompile 'junit:junit:4.12'

app/src/main/java/com/libo/testwechat/AutoReplyService.java

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,11 @@ public void onAccessibilityEvent(final AccessibilityEvent event) {
5555
&& text.toString().contains("期")
5656
&& text.toString().contains("----")) {
5757
//提交开奖结果
58-
end(text.toString());
5958
hasAction = true;
6059
count++;
6160
if (count == 2)
6261
openWechatByNotification(event);
62+
end(text.toString());
6363

6464
} else if (text.toString().contains("在线")
6565
&& text.toString().contains("总分")
@@ -244,10 +244,9 @@ public String findLastChatMessage() {
244244
for (int i = list.size() - 1; i > -1; i--) {
245245
AccessibilityNodeInfo lastNode = list.get(i);
246246
String str = lastNode.getText().toString();
247-
if (str.contains("总分")
248-
&& str.contains("在线")
249-
&& str.contains("欢迎你")) {
250-
return str;
247+
if (str.contains("总分") && str.contains("在线") && str.contains("欢迎你")) {
248+
returnStr = str;
249+
break;
251250
}
252251
}
253252
}
@@ -296,7 +295,10 @@ public void postBill(String billName) {
296295
}
297296
String lastMessage = findLastChatMessage();
298297
System.out.println("======lastMsg====" + lastMessage);
299-
if (TextUtils.isEmpty(lastMessage)) return;
298+
if (TextUtils.isEmpty(lastMessage)) {
299+
back2MeRightNow();
300+
return;
301+
}
300302
final String bill = Utils.findBill(billName, lastMessage);
301303
System.out.println("=======bill====" + bill);
302304
Apis.getInstance().postBill(uid, bill, new MyCallback() {
@@ -361,16 +363,16 @@ public void end(String msg) {
361363
Apis.getInstance().end(uid, phase, last, new MyCallback() {
362364
@Override
363365
public void responeData(String body, JSONObject json) {
364-
hasAction = false;
365-
back2Me();
366+
// hasAction = false;
367+
// back2Me();
366368
}
367369

368370
@Override
369371
public void responeDataFail(int responseStatus, String errMsg) {
370-
hasAction = false;
372+
// hasAction = false;
371373
if (responseStatus == 400) {
372374
}
373-
back2Me();
375+
// back2Me();
374376
}
375377
});
376378
}

0 commit comments

Comments
 (0)