Commit cf9465b6 authored by sheteng's avatar sheteng

v2.0 开发 上线

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