Skip to content

Commit

Permalink
remove useless tcagent
Browse files Browse the repository at this point in the history
  • Loading branch information
codeskyblue committed Mar 4, 2021
1 parent 0c5cae2 commit ecb1e51
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 43 deletions.
5 changes: 1 addition & 4 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,8 @@ android {
// 1: original version
// 2: update all dependencies to latest
// 6: input method, battery,rotation monitor
def buildTendId = System.getenv("TEND_ID")
def buildChannel = "official"

defaultConfig {
buildConfigField "String", "buildTendId", "\"${buildTendId}\""
buildConfigField "String", "buildChannel", "\"${buildChannel}\""
applicationId "com.github.uiautomator"
minSdkVersion 18
targetSdkVersion 28
Expand Down Expand Up @@ -106,6 +102,7 @@ dependencies {

// test
androidTestImplementation 'androidx.test:runner:1.3.0'

androidTestImplementation 'androidx.test:rules:1.3.0'
androidTestImplementation 'androidx.test.uiautomator:uiautomator:2.2.0'
androidTestImplementation 'androidx.core:core:1.3.0'
Expand Down
2 changes: 0 additions & 2 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,11 @@
<uses-permission
android:name="android.permission.ACCESS_MOCK_LOCATION"
tools:ignore="MockLocation,ProtectedPermissions" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.DISABLE_KEYGUARD" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.MANAGE_ACCOUNTS" />
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
Expand Down
14 changes: 0 additions & 14 deletions app/src/main/java/com/github/uiautomator/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
import com.github.uiautomator.util.MemoryManager;
import com.github.uiautomator.util.OkhttpManager;
import com.github.uiautomator.util.Permissons4App;
import com.tendcloud.tenddata.TCAgent;

import org.json.JSONException;
import org.json.JSONObject;
Expand Down Expand Up @@ -80,25 +79,12 @@ public void run() {
}
}


private void initTCAgent() {
TCAgent.LOG_ON = true;
// App ID: 在TalkingData创建应用后,进入数据报表页中,在“系统设置”-“编辑应用”页面里查看App ID。
// 渠道 ID: 是渠道标识符,可通过不同渠道单独追踪数据。
TCAgent.init(this, BuildConfig.buildTendId, BuildConfig.buildChannel);
// 如果已经在AndroidManifest.xml配置了App ID和渠道ID,调用TCAgent.init(this)即可;或与AndroidManifest.xml中的对应参数保持一致。
TCAgent.setReportUncaughtExceptions(true);
Log.i(TAG, "TCAgent init done");
}

@RequiresApi(api = Build.VERSION_CODES.O)
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);

this.initTCAgent();

tvAgentStatus = findViewById(R.id.atx_agent_status);
tvAutomatorStatus = findViewById(R.id.uiautomator_status);
tvAutomatorMode = findViewById(R.id.uiautomator_mode);
Expand Down
23 changes: 0 additions & 23 deletions app/src/main/java/com/github/uiautomator/TCAgentApplication.java

This file was deleted.

0 comments on commit ecb1e51

Please sign in to comment.