|
|
@@ -290,6 +290,12 @@ public class addGroupFunction implements moneyContract.View , getCommonValueCon
|
|
|
//SystemClock.sleep(3000);
|
|
|
|
|
|
}
|
|
|
+ if (event.getClassName().equals("com.tencent.mm.ui.contact.SelectContactUI")) { //大群群员列表
|
|
|
+ LogUtils.d("点击到了加号"); // 应该如何避免呢
|
|
|
+ mService.performGlobalAction(GLOBAL_ACTION_BACK);
|
|
|
+ return;
|
|
|
+
|
|
|
+ }
|
|
|
if (event.getClassName().equals("com.tencent.mm.plugin.profile.ui.ContactInfoUI")) {
|
|
|
//群友信息界面
|
|
|
|
|
|
@@ -622,6 +628,7 @@ public class addGroupFunction implements moneyContract.View , getCommonValueCon
|
|
|
|
|
|
}
|
|
|
|
|
|
+ needToScrollUpTimes = needToScrollUpTimes > (mCurrentRoomSize / 30 + 1) ? (mCurrentRoomSize / 30 + 1) : needToScrollUpTimes;
|
|
|
for (int i = 1; i < needToScrollUpTimes; i++){
|
|
|
gridView.performAction(AccessibilityNodeInfo.ACTION_SCROLL_FORWARD);
|
|
|
LogUtils.e( " 向上滑动页面 第 " + i + " 次");
|
|
|
@@ -641,7 +648,7 @@ public class addGroupFunction implements moneyContract.View , getCommonValueCon
|
|
|
}
|
|
|
}
|
|
|
addcount++;
|
|
|
- if (addcount + nullNameCount > AutoReplyService.enableFriendsCounts) {
|
|
|
+ if (addcount > AutoReplyService.enableFriendsCounts) {
|
|
|
LogUtils.d(TAG + " 已经不能再添加好友了,当前可添加好友数量为 : " + AutoReplyService.enableFriendsCounts);
|
|
|
mService.performGlobalAction(GLOBAL_ACTION_BACK);//大于预定人员数直接后退
|
|
|
addcount = 0;
|
|
|
@@ -652,7 +659,7 @@ public class addGroupFunction implements moneyContract.View , getCommonValueCon
|
|
|
LogUtils.e(TAG + " addBigGroupFriends: 当前索引为 : " + bigChatRoomMemberIndex
|
|
|
+ " 存储的人数为 : " + bigChatRoomMemberNameList.size());
|
|
|
|
|
|
- if (bigChatRoomMemberNameList.size() == mCurrentRoomSize) {
|
|
|
+ if (bigChatRoomMemberNameList.size() + nullNameCount >= mCurrentRoomSize) {
|
|
|
nullNameCount = 0;
|
|
|
needToScrollUpTimes = 0;
|
|
|
LogUtils.e(TAG + " addBigGroupFriends: 已经加完所有群成员了,返回到群聊页面 ");
|
|
|
@@ -680,18 +687,21 @@ public class addGroupFunction implements moneyContract.View , getCommonValueCon
|
|
|
nullNameCount++;
|
|
|
LogUtils.d(TAG + " 没有群昵称的群成员个数为 :" + nullNameCount);
|
|
|
}
|
|
|
- SystemClock.sleep(1000);
|
|
|
+
|
|
|
+
|
|
|
if (nullNameCount + bigChatRoomMemberNameList.size() < mCurrentRoomSize) {
|
|
|
- if (null != child) {
|
|
|
+ if (null != name) {
|
|
|
AccessibilityHelper.performClick(child);
|
|
|
}else {
|
|
|
- LogUtils.e("当前位置没有图标 或 当前位置为加号图标 ");
|
|
|
+ LogUtils.e("当前位置群成员没有昵称 ");
|
|
|
+ addBigGroupFriends();
|
|
|
+ // return;
|
|
|
}
|
|
|
+ bigChatRoomMemberIndex++;
|
|
|
}else {
|
|
|
LogUtils.e("已经加载完整个群了");
|
|
|
-
|
|
|
+ mService.performGlobalAction(GLOBAL_ACTION_BACK);
|
|
|
}
|
|
|
- bigChatRoomMemberIndex++;
|
|
|
}
|
|
|
else {
|
|
|
//找下一个该点的
|
|
|
@@ -784,7 +794,7 @@ public class addGroupFunction implements moneyContract.View , getCommonValueCon
|
|
|
LogUtils.e(TAG + " searchBigChatRoomMembersInfo: find 免打扰");
|
|
|
rootlist.performAction(AccessibilityNodeInfo.ACTION_SCROLL_FORWARD);//增加下滑保证一定能找到
|
|
|
SystemClock.sleep(1000);
|
|
|
-
|
|
|
+ searchBigChatRoomMembersInfo();
|
|
|
}
|
|
|
|
|
|
//在加完好友后点击消息免打扰
|
|
|
@@ -798,7 +808,8 @@ public class addGroupFunction implements moneyContract.View , getCommonValueCon
|
|
|
AccessibilityNodeInfo exit = AccessibilityHelper.findNodeInfosById(root, msgNoDisturb);//消息免打扰右侧开关ID
|
|
|
if (exit != null) {
|
|
|
// forceClick(exit);
|
|
|
- LogUtils.e(TAG + " 启用 消息免打扰 当前已注释");
|
|
|
+ AccessibilityHelper.performClick(exit);
|
|
|
+ LogUtils.e(TAG + " 启用 消息免打扰");
|
|
|
}
|
|
|
|
|
|
/**
|