Commit cf9465b6 authored by sheteng's avatar sheteng

v2.0 开发 上线

parent 59889f0a
......@@ -112,6 +112,7 @@
<provider android:name="androidx.core.content.FileProvider"
android:authorities="com.ccwangluo.accelerator.fileprovider"
android:exported="false"
tools:replace="android:authorities"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
......
......@@ -7,8 +7,8 @@ import androidx.multidex.MultiDex
import com.ccwangluo.accelerator.ui.MainActivity
import com.ccwangluo.accelerator.utils.SysUtils
import com.github.shadowsocks.Core
import com.github.shadowsocks.bg.AuthManager.mmkv
import com.hjq.toast.ToastUtils
import com.tencent.bugly.Bugly
import com.tencent.bugly.BuglyStrategy
import com.tencent.bugly.beta.Beta
import com.tencent.android.tpush.XGPushConfig
......@@ -21,6 +21,7 @@ import com.xuexiang.xutil.XUtil
class App : Application(), androidx.work.Configuration.Provider by Core {
// val mSharedEntry : SharedEntry = SharedEntry();
override fun onCreate() {
super.onCreate()
initBugly()
......@@ -48,6 +49,7 @@ class App : Application(), androidx.work.Configuration.Provider by Core {
// QQ设置
PlatformConfig.setQQZone("101994779","7c34e16cadc3040bb3e8fa900c8a9c0f");
PlatformConfig.setQQFileProvider("com.tencent.sample2.fileprovider");
}
fun initBugly() {
......
......@@ -310,7 +310,7 @@ class AcceleratorFragment : XPageFragment() {
}
//用户是否有使用时长
LoginUtils.getUserHasTimer(this@AcceleratorFragment) {
if (it) {
if (it || gameInfo?.type == 1) {
binding.btnQuick.isEnabled = false
startAnim()
} else {
......
......@@ -103,7 +103,7 @@ class CommonWebViewFragment : XPageFragment() {
override fun onPageStarted(view: WebView?, url: String?, favicon: Bitmap?) {
println("webview " + url)
url?.let {
if (it.contains("cc-tts-front") || it.contains("ttaccelerator")) {
if (it.contains("cc-tt") || it.contains("ttaccelerator")) {
binding.webBar.visibility = View.GONE
} else {
binding.webBar.visibility = View.VISIBLE
......
......@@ -94,11 +94,11 @@ object AcceleratorUtils : TencentLocationListener {
netState.preNetDelay =
NetUtils.tcpPing(DataStore.pingAccHost, DataStore.pingAccPort)
.toInt()
LoginUtils.getUserHasTimer { haveTime ->
if (!haveTime) { //没有加速时长关闭服务
stopAccelerator({})
}
}
// LoginUtils.getUserHasTimer { haveTime ->
// if (!haveTime) { //没有加速时长关闭服务
// stopAccelerator({})
// }
// }
netState.accNetDelay =
if (netState.accNetDelay > netState.preNetDelay && netState.preNetDelay != -1) {
netState.preNetDelay
......
......@@ -9,7 +9,7 @@ object HttpConfig {
/**
* 主页h5
*/
// val UI_MAIN_URL = "http://10.3.64.200:8081/#"
// val UI_MAIN_URL = "http://10.3.64.200:8080/#"
// val UI_MAIN_URL = "http://test-cc-tt-front-new.orangenet.org.cn/#" //测试
val UI_MAIN_URL = "http://cc-tts-front.srccwl.com/#" //生产
......
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