Commit 9a91dce9 authored by sheteng's avatar sheteng

合规修改

parent 40b5093c
......@@ -139,7 +139,7 @@ dependencies {
implementation("com.github.open-android:JieCaoVideoPlayer:0.1.0")
implementation("com.tencent.bugly:crashreport_upgrade:1.5.23")//其中latest.release指代最新版本号,也可以指定明确的版本号,例如1.2.0
implementation("com.tencent.bugly:nativecrashreport:3.9.2")//其中latest.release指代最新版本号,也可以指定明确的版本号,例如2.2.0
implementation("com.tencent.bugly:crashreport_upgrade:latest.release")//其中latest.release指代最新版本号,也可以指定明确的版本号,例如1.2.0
implementation("com.tencent.bugly:nativecrashreport:latest.release")
implementation("com.tencent.tpns:tpns:1.3.2.0-release")
}
\ No newline at end of file
......@@ -39,8 +39,8 @@ class App : Application(), androidx.work.Configuration.Provider by Core {
SysUtils.initChannel(this)
UMConfigure.init(this,"61f0aa7fe014255fcb06a0bd"
,"umeng",UMConfigure.DEVICE_TYPE_PHONE,"")
UMConfigure.preInit(this,"61f0aa7fe014255fcb06a0bd"
,"umeng")
// 微信设置
PlatformConfig.setWeixin("wx9271931475fae8ce","8f8686adb87efa476af92f2ccd196dad");
......@@ -151,7 +151,6 @@ class App : Application(), androidx.work.Configuration.Provider by Core {
Beta.upgradeDialogLayoutId = R.layout.dialog_app_upgrade
Bugly.init(this, "e030f74df5", true)
}
override fun onConfigurationChanged(newConfig: Configuration) {
......
package com.ccwangluo.accelerator.receiver;
import static com.tencent.bugly.beta.tinker.TinkerManager.getApplication;
import android.app.DownloadManager;
import android.content.BroadcastReceiver;
......@@ -10,8 +9,6 @@ import android.database.Cursor;
import android.net.Uri;
import android.text.TextUtils;
import com.xuexiang.xutil.app.AppUtils;
public class AppDownloadReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
......
......@@ -25,7 +25,9 @@ import com.github.shadowsocks.utils.StartService
import com.hjq.toast.ToastUtils
import com.tencent.android.tpush.XGIOperateCallback
import com.tencent.android.tpush.XGPushManager
import com.tencent.bugly.Bugly
import com.tencent.tauth.Tencent
import com.umeng.commonsdk.UMConfigure
import com.umeng.socialize.UMShareAPI
import com.xuexiang.xpage.base.XPageActivity
import com.xuexiang.xpage.core.PageOption
......@@ -52,27 +54,18 @@ class MainActivity() : XPageActivity() {
acceleratorViewModel =
ViewModelProvider(this).get(AccelertorViewModel::class.java)
// app 启动
if (SettingSPUtils.lastAPPOpenReportTime == 0L ||
System.currentTimeMillis() - SettingSPUtils.lastAPPOpenReportTime > 30 * 60 * 1000
) {
DataRePortUtils.report("start_app")
SettingSPUtils.lastAPPOpenReportTime = System.currentTimeMillis()
}
initPhoneUtils()
PageOption.to(SplashFragment::class.java).open(this)
Tencent.setIsPermissionGranted(true)
//隐私协议
if (!SettingSPUtils.isAgreePrivacy) {
PrivacyDialog(this, HttpConfig.HTML_HOST_PRIVACY + "index.html") {
if (it) {
SettingSPUtils.isAgreePrivacy = true
DataRePortUtils.report("st_agrmt_ok")
PhoneUtils.initSdk(application)
PhoneUtils.getPhoneInfo()
PermissionDialog(this) {
getPermission()
DataRePortUtils.report("st_agrmt_ok")
}.show<PermissionDialog>()
} else {
finish()
......@@ -88,13 +81,25 @@ class MainActivity() : XPageActivity() {
AcceleratorUtils.initContext(this, connect)
mSensorManager = getSystemService(SENSOR_SERVICE) as SensorManager
mSensorEventListener = JCVideoPlayer.JCAutoFullscreenListener()
DataRePortUtils.report("st_app_open")
AcceleratorUtils.initConnect(this)
registerReceiver(appDownReceiver, IntentFilter(DownloadManager.ACTION_DOWNLOAD_COMPLETE))
}
private fun getPermission() {
Bugly.init(this, "e030f74df5", false)
UMConfigure.init(this,"61f0aa7fe014255fcb06a0bd"
,"umeng", UMConfigure.DEVICE_TYPE_PHONE,"")
PageOption.to(SplashFragment::class.java).open(this)
//QQ官方sdk授权
Tencent.setIsPermissionGranted(true)
// app 启动
if (SettingSPUtils.lastAPPOpenReportTime == 0L ||
System.currentTimeMillis() - SettingSPUtils.lastAPPOpenReportTime > 30 * 60 * 1000
) {
DataRePortUtils.report("start_app")
SettingSPUtils.lastAPPOpenReportTime = System.currentTimeMillis()
}
DataRePortUtils.report("st_app_open")
PermissionUtils.permission(
Manifest.permission.WRITE_EXTERNAL_STORAGE,
Manifest.permission.READ_EXTERNAL_STORAGE
......@@ -147,8 +152,7 @@ class MainActivity() : XPageActivity() {
)
AcceleratorUtils.checkVpn(this)
//QQ官方sdk授权
Tencent.setIsPermissionGranted(true)
}
override fun onPause() {
......
......@@ -132,6 +132,7 @@ object SysUtils {
"baiduzhushou" -> 7
"wufan" -> 8
"share" -> 9
"update" -> 10
else -> 1
}
}
......
......@@ -6,4 +6,5 @@ yingyongbao
OPPO
baiduzhushou
wufan
share
\ No newline at end of file
share
update
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment