Commit 753a3ce7 authored by wanglei's avatar wanglei

+干掉配置接口。

parent 3c512ce6
...@@ -39,6 +39,7 @@ class MyApplication : BaseApplication() { ...@@ -39,6 +39,7 @@ class MyApplication : BaseApplication() {
if (TextUtils.isEmpty(uuid)) { if (TextUtils.isEmpty(uuid)) {
uuid = UUID.randomUUID().toString() + System.currentTimeMillis() uuid = UUID.randomUUID().toString() + System.currentTimeMillis()
SPUtils.getInstance().put("uuid", uuid) SPUtils.getInstance().put("uuid", uuid)
SPUtils.getInstance().put("install_info", uuid)
} }
} }
......
...@@ -4,7 +4,6 @@ import android.app.NotificationManager ...@@ -4,7 +4,6 @@ import android.app.NotificationManager
import android.content.BroadcastReceiver import android.content.BroadcastReceiver
import android.content.Context import android.content.Context
import android.content.Intent import android.content.Intent
import com.test.easy.easycleanerjunk.helps.EventHelper
import com.test.easy.easycleanerjunk.helps.LogEx import com.test.easy.easycleanerjunk.helps.LogEx
class CloseNotificationReceiver : BroadcastReceiver() { class CloseNotificationReceiver : BroadcastReceiver() {
......
...@@ -76,7 +76,7 @@ object NotificationHelper { ...@@ -76,7 +76,7 @@ object NotificationHelper {
* 获取当前的推送id * 获取当前的推送id
*/ */
fun getPresentPushId(): Int { fun getPresentPushId(): Int {
val pushCircleOrder = ComUtils.getSpConfigBean().push_circle_order val pushCircleOrder = supportNotification
Log.d(TAG, "push_circle_order=$pushCircleOrder") Log.d(TAG, "push_circle_order=$pushCircleOrder")
val tempList = arrayListOf<Int>() val tempList = arrayListOf<Int>()
......
package com.test.easy.easycleanerjunk.helps
object BlackHelps {
// private val url by lazy {
// val pkg = ConfigHelper.packageName
// val url = StringBuilder(
// "${ConfigHelper.apiUrl}/${
// pkg.filter { it.isLowerCase() }.substring(4, 9)
// }cl"
// )
// url.append("?pkg=$pkg")
// url.toString()
// }
//
// val client = OkHttpClient.Builder().apply {
// if (BuildConfig.DEBUG) {
// addInterceptor(HttpLoggingInterceptor().apply {
// level = HttpLoggingInterceptor.Level.BODY
// })
// }
// }.build()
// fun getBlackList() {
// val data = JSONObject()
// val pkg = BaseApplication.context.packageName
// val s = JSONObject()
//// .put("${pkg}_1", "${ScreenUtils.getScreenHeight()}")
//// .put("${pkg}_2", "${ScreenUtils.getScreenWidth()}")
//// .put("${pkg}_3", DeviceUtils.getModel())
// .put("${pkg}_4", Build.MANUFACTURER)
// .put("${pkg}_5", Build.VERSION.SDK_INT)
//// .put("${pkg}_8", AppUtils.getAppVersionName())
//// .put("${pkg}_9", DeviceUtils.getAndroidID())
// .put("${pkg}_10", ConfigHelper.gid)
// .put("${pkg}_11", System.getProperty("http.agent"))
// .put("${pkg}_13", "android")
// // .put("${pkg}_14", "${AppUtils.getAppVersionCode()}")
// .put("${pkg}_15", "google")
// .put("${pkg}_24", BuildConfig.BUILD_TYPE)
// data.put("bp", s)
// val body = AESHelper.encrypt(data.toString()).toRequestBody("application/json;charset=utf-8".toMediaTypeOrNull())
// val request = Request.Builder()
// .post(body)
// .url(url)
// .build()
// client.newCall(request).enqueue(object : Callback {
// override fun onFailure(call: Call, e: IOException) {
//
// }
//
// override fun onResponse(call: Call, response: Response) {
// response.body?.string()?.let {
// Regex("\"data\":\"(.*?)\"").find(it)!!.groupValues[1]
// }?.let { data2 ->
// val booleanS = AESHelper.decrypt(data2)
// AdmobUtils.isBlack = booleanS.contains("true")
// }
// }
// })
//
// }
}
\ No newline at end of file
...@@ -18,7 +18,7 @@ object ComUtils { ...@@ -18,7 +18,7 @@ object ComUtils {
private val TAG = "ComUtils" private val TAG = "ComUtils"
val localConfig = val localConfig =
"nNs6WMHOrm1X02T3Ws2Kw30RugVj+ytSxDLXjUZFIjbTFwM+HMrnjBmZN3ARa18WvpoVDQA6zz5OxIX2vglyyaGUXjG/WoWdQRJup1Hbdl0VGAeLVahoXdlZfpgnYvba3KHvid9i+A6UpoWUHn3xDByzk7N20mxaVwJ6MZMeTZrqxnULyvje6OMUhNllcUyE/OgHCI52hkNSrDFwvfCWgxWn+FK134WZQOJ4WYOcfjJEZEpWLmLowkane7ILLOcwonO/EO6JDHWT6e/M1mHmziokGhWjAxg58xBwjnV4r4O+Sto0WbvX01Eh1aVt9e+Fxue/8KKsjBUbzclcqNg4ttpKf92i48PNQ/QR+yXbTjT5+ZFPTQVkAcbuKrcLbQ/eZyvn5QYNJxIU+jyqmeznCsldkmQnRpGyzJyRwcdK2BV3ZIZcz7oWiUgvwt3NNGFrdC8ueQF2gqV9r8VoYsc9mGmPE06PfD7DAcgG5W46DqSmdyU9WnQsWnfGv94Hhg1TvE7iLFFMoETrHwifJM9kER14rY2J81abPkfFiFKrp5nTgZduDikSO1/Ac8mlSPOsXDglRZBA2wVisKBE9X5wDEDMY66fFK347/3tPfGasnTGKl5KB/HfldzDXNmY27YZO4Let0Jz4shtFzq96J3O2fZ9PMBiX3VDUiHhvZ2nmDj9+HqmvGtTD29ocYGxrtO+qq7nCn2HzOkUEOmNEgGVXJm4a9hqAWRtQZWuVDpLKR0GBh6N+OVyv5TSFmQ5xXVqt9Je17NWKEsdgVGtvLgAShfEv6Ec0PdfUMprkYDgpgL4YKVbjKDX/LMBceC11Zv2W1iHJnAuV3Jdq6pRfB3IVu3e" "{\"open_time_out\":15,\"inter_show_limit\":80,\"native_show_limit\":40,\"newuser_avoid_time\":0,\"all_push_interval\":60,\"loop_interval\":600,\"isNowPlayAd\":0,\"adClickCount\":15,\"nativeAdClickCount\":15,\"push_interval_11001\":30,\"push_interval_11004\":30,\"push_interval_11006\":30,\"push_interval_11008\":30,\"push_interval_11009\":30,\"push_interval_11010\":30,\"push_interval_12000\":30,\"push_interval_22001\":30,\"push_interval_22003\":30,\"push_interval_22002\":30,\"push_interval_22005\":30,\"push_interval_22004\":30,\"push_interval_22007\":30,\"push_circle_order\":[11001,11004,11006,11008,11009,11010,12000]}"
var configSp = "" var configSp = ""
get() { get() {
return SPUtils.getInstance().getString("configSp", field) return SPUtils.getInstance().getString("configSp", field)
...@@ -28,53 +28,6 @@ object ComUtils { ...@@ -28,53 +28,6 @@ object ComUtils {
SPUtils.getInstance().put("configSp", value, true) SPUtils.getInstance().put("configSp", value, true)
} }
private val url by lazy {
val pkg = ConfigHelper.packageName
val url = StringBuilder(
"${ConfigHelper.apiUrl}/${
pkg.filter { it.isLowerCase() }.substring(4, 9)
}spk"
)
url.append("?pkg=$pkg")
url.toString()
}
fun requestCfg() {
val client = OkHttpClient.Builder().apply {
if (BuildConfig.DEBUG) {
addInterceptor(HttpLoggingInterceptor().apply {
level = HttpLoggingInterceptor.Level.BODY
})
}
}.build()
LogEx.logDebug(TAG, "url=$url")
val request = Request.Builder()
.url(url)
.get()
.build()
client.newCall(request).enqueue(object : Callback {
override fun onFailure(call: Call, e: IOException) {
}
override fun onResponse(call: Call, response: Response) {
response.body?.string()?.let {
LogEx.logDebug(TAG, "it=$it")
val i = Regex("\"data\":\"(.*?)\"").find(it)
if (i.toString() != "null") {
i!!.groupValues[1].let {
val str = AESHelper.decrypt(it)
LogEx.logDebug(TAG, "str=$str")
configSp = str
}
}
}
}
})
}
fun getLocalConfigBean(): ConfigBean { fun getLocalConfigBean(): ConfigBean {
val json = AESHelper.decrypt(localConfig) val json = AESHelper.decrypt(localConfig)
LogEx.logDebug(TAG, "Local json=$json") LogEx.logDebug(TAG, "Local json=$json")
......
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