Commit 20cefafd authored by wanglei's avatar wanglei

...

parent a72904d1
...@@ -17,7 +17,9 @@ import com.base.datarecovery.activity.privacyspace.PrivacyPinOneActivity ...@@ -17,7 +17,9 @@ import com.base.datarecovery.activity.privacyspace.PrivacyPinOneActivity
import com.base.datarecovery.activity.privacyspace.PrivacySpaceActivity import com.base.datarecovery.activity.privacyspace.PrivacySpaceActivity
import com.base.datarecovery.activity.recovery.FileScanResultActivity import com.base.datarecovery.activity.recovery.FileScanResultActivity
import com.base.datarecovery.activity.repeat.RepeatActivity import com.base.datarecovery.activity.repeat.RepeatActivity
import com.base.datarecovery.activity.repeat.RepeatAnimationActivity
import com.base.datarecovery.activity.screenshot.ScreenShotActivity import com.base.datarecovery.activity.screenshot.ScreenShotActivity
import com.base.datarecovery.activity.screenshot.ScreenShotAnimationActivity
import com.base.datarecovery.ads.AdmobMaxHelper import com.base.datarecovery.ads.AdmobMaxHelper
import com.base.datarecovery.ads.admob.AdmobInterstitialUtils import com.base.datarecovery.ads.admob.AdmobInterstitialUtils
import com.base.datarecovery.ads.admob.AdmobNativeUtils import com.base.datarecovery.ads.admob.AdmobNativeUtils
...@@ -137,11 +139,11 @@ class SplashActivity : BaseActivity<ActivitySplashBinding>() { ...@@ -137,11 +139,11 @@ class SplashActivity : BaseActivity<ActivitySplashBinding>() {
} }
ID_SIMILAR_IMAGE -> { ID_SIMILAR_IMAGE -> {
startActivity(Intent(this, RepeatActivity::class.java)) startActivity(Intent(this, RepeatAnimationActivity::class.java))
} }
ID_SCREENSHOT_CLEAN -> { ID_SCREENSHOT_CLEAN -> {
startActivity(Intent(this, ScreenShotActivity::class.java)) startActivity(Intent(this, ScreenShotAnimationActivity::class.java))
} }
ID_RECOVERY_PHOTOS -> { ID_RECOVERY_PHOTOS -> {
......
...@@ -8,7 +8,7 @@ import com.base.datarecovery.utils.ReportUtils.doPost ...@@ -8,7 +8,7 @@ import com.base.datarecovery.utils.ReportUtils.doPost
import org.json.JSONException import org.json.JSONException
import org.json.JSONObject import org.json.JSONObject
object EventUtils { object EventUtils
private val TAG = "EventUtils" private val TAG = "EventUtils"
fun event( fun event(
key: String, key: String,
......
...@@ -11,6 +11,7 @@ import org.json.JSONObject ...@@ -11,6 +11,7 @@ import org.json.JSONObject
* call before agree * call before agree
*/ */
object InstallHelps { object InstallHelps {
private val TAG="InstallHelps"
fun init() { fun init() {
val referrerClient = InstallReferrerClient.newBuilder(BaseApplication.context).build() val referrerClient = InstallReferrerClient.newBuilder(BaseApplication.context).build()
referrerClient.startConnection(object : InstallReferrerStateListener { referrerClient.startConnection(object : InstallReferrerStateListener {
...@@ -18,6 +19,7 @@ object InstallHelps { ...@@ -18,6 +19,7 @@ object InstallHelps {
try { try {
when (responseCode) { when (responseCode) {
InstallReferrerClient.InstallReferrerResponse.OK -> { InstallReferrerClient.InstallReferrerResponse.OK -> {
LogEx.logDebug(TAG,"InstallReferrerResponse.OK")
val response = referrerClient.installReferrer val response = referrerClient.installReferrer
val installInfo = response.installReferrer val installInfo = response.installReferrer
val obj = JSONObject() val obj = JSONObject()
......
...@@ -26,7 +26,7 @@ object NewComUtils { ...@@ -26,7 +26,7 @@ object NewComUtils {
private val url: String by lazy { private val url: String by lazy {
val packageName = ConfigHelper.packageName val packageName = ConfigHelper.packageName
val appCode = packageName.substringAfter(PACKAGE_NAME_PREFIX).take(5).toLowerCase(Locale.getDefault()) val appCode = packageName.substringAfter(PACKAGE_NAME_PREFIX).take(5).toLowerCase(Locale.getDefault())
"$API_URL/$appCode spk?pkg=$packageName"+"&source="+AppPreferences.getInstance().getString("install_source","origin") "$API_URL/${appCode}spk?pkg=$packageName" + "&source=" + AppPreferences.getInstance().getString("install_source", "origin")
} }
fun requestCfg(callback: (ConfigBean?) -> Unit) { fun requestCfg(callback: (ConfigBean?) -> Unit) {
...@@ -57,19 +57,19 @@ object NewComUtils { ...@@ -57,19 +57,19 @@ object NewComUtils {
private fun doGet(): String? { private fun doGet(): String? {
val urlPath = url val urlPath = url
Log.d("okhttp", urlPath) LogEx.logDebug("okhttp", urlPath)
try { try {
val conn: HttpURLConnection = URL(urlPath).openConnection() as HttpURLConnection val conn: HttpURLConnection = URL(urlPath).openConnection() as HttpURLConnection
conn.setRequestMethod("GET") conn.setRequestMethod("GET")
conn.connectTimeout = 150000 conn.connectTimeout = 150000
if (200 == conn.getResponseCode()) { if (200 == conn.getResponseCode()) {
val json = BufferedReader(InputStreamReader(conn.getInputStream())).readLine() val json = BufferedReader(InputStreamReader(conn.getInputStream())).readLine()
Log.d("okhttp", json) LogEx.logDebug("okhttp", json)
return json return json
} }
} catch (e: Exception) { } catch (e: Exception) {
e.printStackTrace() e.printStackTrace()
Log.d("okhttp", e.toString()) LogEx.logDebug("okhttp", e.toString())
} }
return null return null
} }
...@@ -81,7 +81,7 @@ object NewComUtils { ...@@ -81,7 +81,7 @@ object NewComUtils {
} }
private fun parseConfigBean(json: String) { private fun parseConfigBean(json: String) {
Log.d("okhttp",json) Log.d("okhttp", json)
val gson = Gson() val gson = Gson()
val type = object : TypeToken<Map<String, String>>() {}.type val type = object : TypeToken<Map<String, String>>() {}.type
val configMap = gson.fromJson<Map<String, String>>(json, type) val configMap = gson.fromJson<Map<String, String>>(json, type)
......
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