atom
This commit is contained in:
@@ -202,7 +202,7 @@ public class AblService extends AccessibilityService {
|
||||
} else if (str.contains("设置抖音号")) {
|
||||
LiveEventBus.get("runningstate").post("0");
|
||||
}
|
||||
|
||||
AblViewUtil.Close();
|
||||
break;
|
||||
}
|
||||
default:
|
||||
@@ -212,11 +212,13 @@ public class AblService extends AccessibilityService {
|
||||
|
||||
public void scroll2PositionClick(AccessibilityService service, String text) {
|
||||
try {
|
||||
Thread.sleep(5000); //隔200 ms 滚动一次
|
||||
Thread.sleep(5000);
|
||||
//隔200 ms 滚动一次
|
||||
} catch (InterruptedException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2) { //必须android4.3以上的版本
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2) {
|
||||
//必须android4.3以上的版本
|
||||
getdouyindsf();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -99,11 +99,15 @@ public class AblViewUtil {
|
||||
parent.findAccessibilityNodeInfosByViewId(id);
|
||||
if (accessibilityNodeInfos != null &&
|
||||
!accessibilityNodeInfos.isEmpty()) {
|
||||
if (anisCallBack != null) anisCallBack.succ(accessibilityNodeInfos);
|
||||
if (anisCallBack != null) {
|
||||
anisCallBack.succ(accessibilityNodeInfos);
|
||||
}
|
||||
return accessibilityNodeInfos;
|
||||
}
|
||||
}
|
||||
if (anisCallBack != null) anisCallBack.fail();
|
||||
if (anisCallBack != null) {
|
||||
anisCallBack.fail();
|
||||
}
|
||||
return new ArrayList<>();
|
||||
}
|
||||
|
||||
@@ -190,12 +194,16 @@ public class AblViewUtil {
|
||||
AblService.getInstance().dispatchGesture(gestureDescription, new AccessibilityService.GestureResultCallback() {
|
||||
@Override
|
||||
public void onCompleted(GestureDescription gestureDescription) {
|
||||
if (callback != null) callback.succ(gestureDescription);
|
||||
if (callback != null) {
|
||||
callback.succ(gestureDescription);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCancelled(GestureDescription gestureDescription) {
|
||||
if (callback != null) callback.fail(gestureDescription);
|
||||
if (callback != null) {
|
||||
callback.fail(gestureDescription);
|
||||
}
|
||||
}
|
||||
}, null);
|
||||
}
|
||||
@@ -614,6 +622,10 @@ public class AblViewUtil {
|
||||
if (isContainText("检测到更新")){
|
||||
findAndPerformActionTextView("以后再说");
|
||||
}
|
||||
if (isContainText("发现通讯录朋友")){
|
||||
findAndPerformActionTextView("暂时不要");
|
||||
}
|
||||
Log.e("_____-------","弹窗解决");
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -109,7 +109,6 @@ public class DakaActivity extends BaseActivity {
|
||||
headerAndFooterAdapter.addFooterView(footerView, 0);
|
||||
mRecyclerView.setAdapter(headerAndFooterAdapter);
|
||||
}
|
||||
|
||||
private View getFooterView(int type, View.OnClickListener listener) {
|
||||
View view = getLayoutInflater().inflate(R.layout.footer_prilet_view, (ViewGroup) mRecyclerView.getParent(), false);
|
||||
if (type == 1) {
|
||||
|
||||
@@ -34,7 +34,7 @@ public class AblStep1 extends BaseAblStep {
|
||||
break;
|
||||
case AblSteps.STEP_261:
|
||||
ChangLiang.ishuodong = "T";
|
||||
AblViewUtil.Close();
|
||||
//AblViewUtil.Close();
|
||||
AblViewUtil.mySleep(5);
|
||||
AblService instance = AblService.getInstance();
|
||||
myClick();
|
||||
|
||||
@@ -127,7 +127,7 @@ public class TestAblStep6 extends BaseAblStep {
|
||||
AblViewUtil.mySleep(1);
|
||||
AccessibilityNodeInfo chilrecy = getrecy();
|
||||
Log.e("TIAOSHI###", "向上滑动");
|
||||
chilrecy.performAction(AccessibilityNodeInfo.ACTION_SCROLL_FORWARD); //触发容器元素的滚动事件
|
||||
chilrecy.performAction(AccessibilityNodeInfo.ACTION_SCROLL_FORWARD);//触发容器元素的滚动事件
|
||||
AblViewUtil.mySleep(1);
|
||||
AblStepHandler.sendMsg(AblSteps.STEP_13);
|
||||
}
|
||||
@@ -173,6 +173,7 @@ public class TestAblStep6 extends BaseAblStep {
|
||||
AccessibilityNodeInfo child = root.getChild(i);
|
||||
// Log.e("TIAOSHI###", "----oneNode:" + child.getClassName() + ":" + child.getText() + ":" + child.getContentDescription());
|
||||
// nodeZuobiao(child);
|
||||
|
||||
for (int y = 0; y < child.getChildCount(); y++) {
|
||||
AccessibilityNodeInfo child1 = child.getChild(y);
|
||||
// Log.e("TIAOSHI###", "----twoNode:" + child1.getClassName() + ":" + child1.getText() + ":" + child1.getContentDescription());
|
||||
@@ -326,7 +327,7 @@ public class TestAblStep6 extends BaseAblStep {
|
||||
}
|
||||
if (child.getText().toString().equals("互相关注")) {
|
||||
AblViewUtil.mySleep(1);
|
||||
// clickcommontwo(child, "互相关注");
|
||||
//clickcommontwo(child, "互相关注");
|
||||
Rect rect = new Rect();
|
||||
child.getBoundsInScreen(rect);
|
||||
if (rect.top <= 2100) {
|
||||
|
||||
Reference in New Issue
Block a user