atom
This commit is contained in:
3
.idea/gradle.xml
generated
3
.idea/gradle.xml
generated
@@ -4,7 +4,7 @@
|
|||||||
<component name="GradleSettings">
|
<component name="GradleSettings">
|
||||||
<option name="linkedExternalProjectsSettings">
|
<option name="linkedExternalProjectsSettings">
|
||||||
<GradleProjectSettings>
|
<GradleProjectSettings>
|
||||||
<option name="testRunner" value="GRADLE" />
|
<option name="testRunner" value="PLATFORM" />
|
||||||
<option name="disableWrapperSourceDistributionNotification" value="true" />
|
<option name="disableWrapperSourceDistributionNotification" value="true" />
|
||||||
<option name="distributionType" value="DEFAULT_WRAPPED" />
|
<option name="distributionType" value="DEFAULT_WRAPPED" />
|
||||||
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
||||||
@@ -24,6 +24,7 @@
|
|||||||
</set>
|
</set>
|
||||||
</option>
|
</option>
|
||||||
<option name="resolveModulePerSourceSet" value="false" />
|
<option name="resolveModulePerSourceSet" value="false" />
|
||||||
|
<option name="useQualifiedModuleNames" value="true" />
|
||||||
</GradleProjectSettings>
|
</GradleProjectSettings>
|
||||||
</option>
|
</option>
|
||||||
</component>
|
</component>
|
||||||
|
|||||||
Binary file not shown.
@@ -1 +1 @@
|
|||||||
[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":173,"versionName":"1.7.3","enabled":true,"outputFile":"atom-latest.apk","fullName":"release","baseName":"release"},"path":"atom-latest.apk","properties":{}}]
|
[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":174,"versionName":"1.7.4","enabled":true,"outputFile":"atom-latest.apk","fullName":"release","baseName":"release"},"path":"atom-latest.apk","properties":{}}]
|
||||||
@@ -197,7 +197,7 @@ public class MainActivity extends BaseActivity implements InfoMessage {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//adb shell pm grant com.fisherbone.fuzhu android.permission.WRITE_SECURE_SETTINGS
|
||||||
Settings.Secure.putString(getContentResolver(), Settings.Secure.ENABLED_ACCESSIBILITY_SERVICES, "com.fisherbone.fuzhu/com.fisherbone.fuzhu.abllib.AblService");
|
Settings.Secure.putString(getContentResolver(), Settings.Secure.ENABLED_ACCESSIBILITY_SERVICES, "com.fisherbone.fuzhu/com.fisherbone.fuzhu.abllib.AblService");
|
||||||
Settings.Secure.putString(getContentResolver(), Settings.Secure.ACCESSIBILITY_ENABLED, "1");//1表示开启
|
Settings.Secure.putString(getContentResolver(), Settings.Secure.ACCESSIBILITY_ENABLED, "1");//1表示开启
|
||||||
if (AblUtil.isAccessibilityServiceOpen(MainActivity.this)) {
|
if (AblUtil.isAccessibilityServiceOpen(MainActivity.this)) {
|
||||||
|
|||||||
@@ -12,14 +12,9 @@ import com.fisherbone.fuzhu.BuildConfig;
|
|||||||
*/
|
*/
|
||||||
public class HttpConstants {
|
public class HttpConstants {
|
||||||
|
|
||||||
// public static String URiBase = "http://192.168.1.3";// ATOM本地地址
|
|
||||||
//public static String URiBase = "http://139.186.151.48";// ATOM线上地址
|
|
||||||
|
|
||||||
// public static String URiBase = BuildConfig.release;// ATOM线上地址
|
// public static String URiBase = BuildConfig.release;// ATOM线上地址
|
||||||
public static String URiBase = BuildConfig.debug;// ATOM线上地址
|
public static String URiBase = BuildConfig.debug;// ATOM线上地址
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 扫码提交信息
|
* 扫码提交信息
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -5,11 +5,17 @@ import android.os.Message;
|
|||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.view.accessibility.AccessibilityNodeInfo;
|
import android.view.accessibility.AccessibilityNodeInfo;
|
||||||
|
|
||||||
|
import com.fisherbone.fuzhu.ChangLiang;
|
||||||
import com.fisherbone.fuzhu.abllib.AblService;
|
import com.fisherbone.fuzhu.abllib.AblService;
|
||||||
import com.fisherbone.fuzhu.abllib.AblStepHandler;
|
import com.fisherbone.fuzhu.abllib.AblStepHandler;
|
||||||
import com.fisherbone.fuzhu.abllib.AblSteps;
|
import com.fisherbone.fuzhu.abllib.AblSteps;
|
||||||
import com.fisherbone.fuzhu.abllib.BaseAblStep;
|
import com.fisherbone.fuzhu.abllib.BaseAblStep;
|
||||||
import com.fisherbone.fuzhu.abllib.utils.AblViewUtil;
|
import com.fisherbone.fuzhu.abllib.utils.AblViewUtil;
|
||||||
|
import com.fisherbone.fuzhu.db.DouyinBean;
|
||||||
|
import com.fisherbone.fuzhu.utils.EmojiFilter;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获得作品时间
|
* 获得作品时间
|
||||||
@@ -18,7 +24,6 @@ public class TestAblStep0 extends BaseAblStep {
|
|||||||
private String substring = "1000000";//当前的关注数
|
private String substring = "1000000";//当前的关注数
|
||||||
public String IFCONTIAN = "x";
|
public String IFCONTIAN = "x";
|
||||||
private int liwusubstring;
|
private int liwusubstring;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onStep(int step, Message msg) {
|
public void onStep(int step, Message msg) {
|
||||||
switch (step) {
|
switch (step) {
|
||||||
@@ -30,68 +35,62 @@ public class TestAblStep0 extends BaseAblStep {
|
|||||||
case AblSteps.STEP_2:
|
case AblSteps.STEP_2:
|
||||||
AblViewUtil.mySleep(5);
|
AblViewUtil.mySleep(5);
|
||||||
// getNodeInfoh();
|
// getNodeInfoh();
|
||||||
// getNodeInfoy();
|
// AblStepHandler.sendMsg(AblSteps.STEP_50);
|
||||||
|
|
||||||
//(0,562),(1080,774)
|
getdouyinid();
|
||||||
// isContainText("关注");b
|
|
||||||
|
|
||||||
// boolean b = openTiktok();
|
|
||||||
// Log.e("TIAOSHI###", "成功打开抖音" +b);
|
|
||||||
boolean b1 = ifShouye();
|
|
||||||
Log.e("TIAOSHI###", "是否首页" +b1);
|
|
||||||
// if (b && b1) {
|
|
||||||
// Log.e("TIAOSHI###", "成功打开抖音" );
|
|
||||||
// } else {
|
|
||||||
// Log.e("TIAOSHI###", "没有打开抖音抖音不在首页" );
|
|
||||||
// }
|
|
||||||
default:
|
default:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean openTiktok() {
|
private void getdouyinid() {
|
||||||
boolean ifOpen = false;
|
|
||||||
AccessibilityNodeInfo root = AblService.getInstance().getRootInActiveWindow();
|
AblViewUtil.mySleep(2);
|
||||||
for (int i = 0; i < root.getChildCount(); i++) {
|
//获取抖音号
|
||||||
AccessibilityNodeInfo child = root.getChild(i);
|
getdouyin();
|
||||||
Log.e("TIAOSHI###", "----oneNode:" + child.getClassName() + ":" + child.getText() + ":" + child.getContentDescription());
|
|
||||||
if ("dmt.viewpager.DmtViewPager$d".equals(child.getClassName())) {
|
|
||||||
ifOpen = true;
|
DouyinBean douyinBean = new DouyinBean();
|
||||||
|
douyinBean.setLogin_status("1");
|
||||||
|
douyinBean.setShort_id(ChangLiang.short_id);
|
||||||
|
douyinBean.setShort_name(ChangLiang.short_name);
|
||||||
|
|
||||||
|
AblViewUtil.mySleep(2);
|
||||||
|
AblViewUtil.back();
|
||||||
|
AblViewUtil.mySleep(1);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return ifOpen;
|
private void getdouyin() {
|
||||||
}
|
int num = 0;
|
||||||
public boolean ifShouye() {
|
List<AccessibilityNodeInfo> accessibilityNodeInfos = new ArrayList<>();
|
||||||
boolean flag = false;
|
|
||||||
AccessibilityNodeInfo root = AblService.getInstance().getRootInActiveWindow();
|
AccessibilityNodeInfo root = AblService.getInstance().getRootInActiveWindow();
|
||||||
for (int i = 0; i < root.getChildCount(); i++) {
|
for (int i = 0; i < root.getChildCount(); i++) {
|
||||||
AccessibilityNodeInfo child = root.getChild(i);
|
AccessibilityNodeInfo child = root.getChild(i);
|
||||||
Log.e("TIAOSHI###", "----oneNode:" + child.getClassName() + ":" + child.getText() + ":" + child.getContentDescription());
|
Log.e("TIAOSHI###", "----oneNode:" + child.getClassName() + ":" + child.getText() + ":" + child.getContentDescription());
|
||||||
nodeZuobiao(child);
|
nodeZuobiao(child);
|
||||||
for (int y = 0; y < child.getChildCount(); y++) {
|
Rect rect = new Rect();
|
||||||
AccessibilityNodeInfo child1 = child.getChild(y);
|
child.getBoundsInScreen(rect);
|
||||||
Log.e("TIAOSHI###", "----twoNode:" + child1.getClassName() + ":" + child1.getText() + ":" + child1.getContentDescription());
|
if (rect.top >= 564 && rect.bottom <= 761) {
|
||||||
nodeZuobiao(child1);
|
if ("android.widget.TextView".equals(child.getClassName())) {
|
||||||
|
if (num < 3) {
|
||||||
for (int j = 0; j < child1.getChildCount(); j++) {
|
accessibilityNodeInfos.add(child);
|
||||||
AccessibilityNodeInfo child2 = child1.getChild(j);
|
num = num + 1;
|
||||||
Log.e("TIAOSHI###", "----threeNode:" + child2.getClassName() + ":" + child2.getText() + ":" + child2.getContentDescription());
|
|
||||||
nodeZuobiao(child2);
|
|
||||||
|
|
||||||
if ("android.widget.TextView".equals(child2.getClassName())) {
|
|
||||||
if (child2.getText() != null) {
|
|
||||||
if (child2.getText().toString().equals("首页")) {
|
|
||||||
flag = true;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
AccessibilityNodeInfo accessibilityNodeInfoo = accessibilityNodeInfos.get(1);
|
||||||
|
String str = accessibilityNodeInfoo.getText().toString();
|
||||||
|
String[] all = str.split(":");
|
||||||
|
// Log.e("TIAOSHI###", "获得的抖音号==" + all[0]);
|
||||||
|
Log.e("TIAOSHI###", "获得的抖音号==" + all[1]);
|
||||||
|
ChangLiang.short_id = all[1];
|
||||||
|
|
||||||
|
AccessibilityNodeInfo accessibilityNodeInfo = accessibilityNodeInfos.get(0);
|
||||||
|
String s = accessibilityNodeInfo.getText().toString();
|
||||||
|
String s1 = EmojiFilter.filterEmoji(s);//去除字符串中包含的表情符号
|
||||||
|
Log.e("TIAOSHI###", "获得的抖音号昵称==" + s1);
|
||||||
|
ChangLiang.short_name = s1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return flag;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,6 @@ import java.util.ArrayList;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class TestAblStep1 extends BaseAblStep {
|
public class TestAblStep1 extends BaseAblStep {
|
||||||
private List<AccessibilityNodeInfo> accessibilityNodeInfos;
|
|
||||||
private DouyinDao douyinDao;
|
private DouyinDao douyinDao;
|
||||||
private AblService instance;
|
private AblService instance;
|
||||||
|
|
||||||
@@ -30,7 +29,22 @@ public class TestAblStep1 extends BaseAblStep {
|
|||||||
case AblSteps.STEP_50:
|
case AblSteps.STEP_50:
|
||||||
instance = AblService.getInstance();
|
instance = AblService.getInstance();
|
||||||
AblViewUtil.startApplication();
|
AblViewUtil.startApplication();
|
||||||
|
AblViewUtil.mySleep(2);
|
||||||
|
allowed();
|
||||||
douyinDao = new DouyinDao(FuzhuApplication.getContext());
|
douyinDao = new DouyinDao(FuzhuApplication.getContext());
|
||||||
|
|
||||||
|
closedtjDialog(AblService.getInstance());
|
||||||
|
AblViewUtil.mySleep(1);
|
||||||
|
//1.关闭检测到更新的弹框
|
||||||
|
closedJDialog(AblService.getInstance());
|
||||||
|
AblViewUtil.mySleep(1);
|
||||||
|
//2.关闭青少年弹窗
|
||||||
|
closedQDialog(AblService.getInstance());
|
||||||
|
AblViewUtil.mySleep(1);
|
||||||
|
closedBDialog(AblService.getInstance());
|
||||||
|
AblViewUtil.mySleep(1);
|
||||||
|
|
||||||
|
|
||||||
AblStepHandler.sendMsg(AblSteps.STEP_51);
|
AblStepHandler.sendMsg(AblSteps.STEP_51);
|
||||||
break;
|
break;
|
||||||
case AblSteps.STEP_51:
|
case AblSteps.STEP_51:
|
||||||
@@ -122,19 +136,7 @@ public class TestAblStep1 extends BaseAblStep {
|
|||||||
AblViewUtil.mySleep(2);
|
AblViewUtil.mySleep(2);
|
||||||
//获取抖音号
|
//获取抖音号
|
||||||
getdouyin();
|
getdouyin();
|
||||||
AccessibilityNodeInfo accessibilityNodeInfoo = accessibilityNodeInfos.get(1);
|
|
||||||
String str = accessibilityNodeInfoo.getText().toString();
|
|
||||||
String[] all = str.split(":");
|
|
||||||
Log.e("TIAOSHI###", "获得的抖音号==" + all[0]);
|
|
||||||
Log.e("TIAOSHI###", "获得的抖音号==" + all[1]);
|
|
||||||
AccessibilityNodeInfo accessibilityNodeInfo = accessibilityNodeInfos.get(0);
|
|
||||||
String s = accessibilityNodeInfo.getText().toString();
|
|
||||||
ChangLiang.short_id = all[1];
|
|
||||||
String s1 = EmojiFilter.filterEmoji(s);//去除字符串中包含的表情符号
|
|
||||||
Log.e("TIAOSHI###", "获得的抖音号昵称==" + s1);
|
|
||||||
ChangLiang.short_name = s1;
|
|
||||||
// SPUtils.setSP(FuzhuApplication.getContext(), FZConfig.SHORT_NAME, s1);
|
|
||||||
// SPUtils.setSP(FuzhuApplication.getContext(), FZConfig.SHORT_ID, ChangLiang.short_id );
|
|
||||||
DouyinBean douyinBean = new DouyinBean();
|
DouyinBean douyinBean = new DouyinBean();
|
||||||
douyinBean.setLogin_status("1");
|
douyinBean.setLogin_status("1");
|
||||||
douyinBean.setShort_id(ChangLiang.short_id);
|
douyinBean.setShort_id(ChangLiang.short_id);
|
||||||
@@ -152,7 +154,7 @@ public class TestAblStep1 extends BaseAblStep {
|
|||||||
|
|
||||||
private void getdouyin() {
|
private void getdouyin() {
|
||||||
int num = 0;
|
int num = 0;
|
||||||
accessibilityNodeInfos = new ArrayList<>();
|
List<AccessibilityNodeInfo> accessibilityNodeInfos = new ArrayList<>();
|
||||||
AccessibilityNodeInfo root = AblService.getInstance().getRootInActiveWindow();
|
AccessibilityNodeInfo root = AblService.getInstance().getRootInActiveWindow();
|
||||||
for (int i = 0; i < root.getChildCount(); i++) {
|
for (int i = 0; i < root.getChildCount(); i++) {
|
||||||
AccessibilityNodeInfo child = root.getChild(i);
|
AccessibilityNodeInfo child = root.getChild(i);
|
||||||
@@ -160,8 +162,7 @@ public class TestAblStep1 extends BaseAblStep {
|
|||||||
nodeZuobiao(child);
|
nodeZuobiao(child);
|
||||||
Rect rect = new Rect();
|
Rect rect = new Rect();
|
||||||
child.getBoundsInScreen(rect);
|
child.getBoundsInScreen(rect);
|
||||||
//(547,1437),(613,1510)
|
if (rect.top >= 564 && rect.bottom <= 761) {
|
||||||
if (rect.top >= 564 && rect.bottom <= 743) {
|
|
||||||
if ("android.widget.TextView".equals(child.getClassName())) {
|
if ("android.widget.TextView".equals(child.getClassName())) {
|
||||||
if (num < 3) {
|
if (num < 3) {
|
||||||
accessibilityNodeInfos.add(child);
|
accessibilityNodeInfos.add(child);
|
||||||
@@ -170,6 +171,18 @@ public class TestAblStep1 extends BaseAblStep {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
AccessibilityNodeInfo accessibilityNodeInfoo = accessibilityNodeInfos.get(1);
|
||||||
|
String str = accessibilityNodeInfoo.getText().toString();
|
||||||
|
String[] all = str.split(":");
|
||||||
|
// Log.e("TIAOSHI###", "获得的抖音号==" + all[0]);
|
||||||
|
Log.e("TIAOSHI###", "获得的抖音号==" + all[1]);
|
||||||
|
ChangLiang.short_id = all[1];
|
||||||
|
|
||||||
|
AccessibilityNodeInfo accessibilityNodeInfo = accessibilityNodeInfos.get(0);
|
||||||
|
String s = accessibilityNodeInfo.getText().toString();
|
||||||
|
String s1 = EmojiFilter.filterEmoji(s);//去除字符串中包含的表情符号
|
||||||
|
Log.e("TIAOSHI###", "获得的抖音号昵称==" + s1);
|
||||||
|
ChangLiang.short_name = s1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -38,8 +38,8 @@ public class TestAblStep32 extends NoticeBase {
|
|||||||
case AblSteps.STEP_232:
|
case AblSteps.STEP_232:
|
||||||
AblViewUtil.mySleep(3);
|
AblViewUtil.mySleep(3);
|
||||||
Log.e("TIAOSHI###", "56778");
|
Log.e("TIAOSHI###", "56778");
|
||||||
// if (this.objects.size() == 0) {
|
if (this.objects.size() == 0) {
|
||||||
if (0 == 0) {
|
// if (0 == 0) {
|
||||||
AblViewUtil.potgegin("停止");
|
AblViewUtil.potgegin("停止");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,8 +12,8 @@ ext {
|
|||||||
applicationId : "com.fisherbone.fuzhu",
|
applicationId : "com.fisherbone.fuzhu",
|
||||||
minSdkVersion : 24,
|
minSdkVersion : 24,
|
||||||
targetSdkVersion : 29,
|
targetSdkVersion : 29,
|
||||||
versionCode : 173,
|
versionCode : 174,
|
||||||
versionName : "1.7.3",
|
versionName : "1.7.4",
|
||||||
testInstrumentationRunner: "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner: "androidx.test.runner.AndroidJUnitRunner"
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user