revert: 在SystemUI 启用 AppCenter (#119)

This commit is contained in:
LittleTurtle2333
2022-03-31 17:00:18 +08:00
parent 176682fa38
commit f83d439374
3 changed files with 6 additions and 21 deletions

View File

@@ -29,6 +29,12 @@ class SettingsActivity : MIUIActivity() {
private val activity = this
override fun onCreate(savedInstanceState: Bundle?) {
if (BuildConfig.BUILD_TYPE != "debug") {
AppCenter.start(
application, "ae2037d3-9914-4e0c-b02b-f9b2bb2574e5",
Analytics::class.java, Crashes::class.java
)
}
checkLSPosed()
super.onCreate(savedInstanceState)
}

View File

@@ -13,7 +13,6 @@ object SystemUI: AppRegister() {
override fun handleLoadPackage(lpparam: XC_LoadPackage.LoadPackageParam) {
XposedBridge.log("Simplicitytools: 成功 Hook "+javaClass.simpleName)
autoInitHooks(lpparam,
AppCenterService, //AppCenter统计服务
HideStatusBarIcon, //隐藏状态栏图标
HideBatteryIcon, //隐藏电池
HideHDIcon, //隐藏HD图标

View File

@@ -1,20 +0,0 @@
package com.lt2333.simplicitytools.hook.app.systemui
import android.app.Application
import android.content.Context
import com.lt2333.simplicitytools.util.hookAfterMethod
import com.lt2333.simplicitytools.util.xposed.base.HookRegister
import com.microsoft.appcenter.AppCenter
import com.microsoft.appcenter.analytics.Analytics
object AppCenterService : HookRegister() {
override fun init() {
Application::class.java.hookAfterMethod("attach", Context::class.java) {
runCatching {
AppCenter.start(it.thisObject as Application, "ae2037d3-9914-4e0c-b02b-f9b2bb2574e5", Analytics::class.java)
}
}
}
}