Commit e9803de6 authored by maxiaoliang's avatar maxiaoliang

删除无用代码

parent 1ce19989
...@@ -81,9 +81,9 @@ dependencies { ...@@ -81,9 +81,9 @@ dependencies {
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1' androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
implementation("com.google.android.gms:play-services-ads:23.1.0") implementation("com.google.android.gms:play-services-ads:23.1.0")
implementation 'com.google.ads.mediation:applovin:12.4.3.0' implementation 'com.google.ads.mediation:applovin:12.4.3.0'
implementation 'com.google.ads.mediation:fyber:8.2.7.0' // implementation 'com.google.ads.mediation:fyber:8.2.7.0'
implementation 'com.google.ads.mediation:ironsource:8.0.0.1' // implementation 'com.google.ads.mediation:ironsource:8.0.0.1'
implementation 'com.google.ads.mediation:vungle:7.3.1.0' // implementation 'com.google.ads.mediation:vungle:7.3.1.0'
implementation 'com.google.ads.mediation:facebook:6.17.0.0' implementation 'com.google.ads.mediation:facebook:6.17.0.0'
implementation 'com.google.ads.mediation:mintegral:16.7.21.0' implementation 'com.google.ads.mediation:mintegral:16.7.21.0'
implementation 'com.google.ads.mediation:pangle:5.9.0.4.0' implementation 'com.google.ads.mediation:pangle:5.9.0.4.0'
...@@ -92,21 +92,21 @@ dependencies { ...@@ -92,21 +92,21 @@ dependencies {
implementation platform('com.google.firebase:firebase-bom:32.3.1') implementation platform('com.google.firebase:firebase-bom:32.3.1')
implementation 'com.google.firebase:firebase-analytics:21.6.2' implementation 'com.google.firebase:firebase-analytics:21.6.2'
implementation 'com.google.firebase:firebase-crashlytics' implementation 'com.google.firebase:firebase-crashlytics'
implementation("com.squareup.okhttp3:okhttp:4.9.0") // implementation("com.squareup.okhttp3:okhttp:4.9.0")
implementation("com.squareup.okhttp3:logging-interceptor:4.9.0") // implementation("com.squareup.okhttp3:logging-interceptor:4.9.0")
implementation("com.github.JavaNoober.BackgroundLibrary:libraryx:1.7.6") implementation("com.github.JavaNoober.BackgroundLibrary:libraryx:1.7.6")
implementation("com.github.pokercc:ExpandableRecyclerView:0.9.3") implementation("com.github.pokercc:ExpandableRecyclerView:0.9.3")
def roomVersion = "2.5.0" // def roomVersion = "2.5.0"
implementation("androidx.room:room-runtime:$roomVersion") // implementation("androidx.room:room-runtime:$roomVersion")
annotationProcessor("androidx.room:room-compiler:$roomVersion") // annotationProcessor("androidx.room:room-compiler:$roomVersion")
kapt("androidx.room:room-compiler:$roomVersion") // kapt("androidx.room:room-compiler:$roomVersion")
implementation("androidx.room:room-ktx:$roomVersion") // implementation("androidx.room:room-ktx:$roomVersion")
implementation group: 'com.google.code.gson', name: 'gson', version: '2.10.1' implementation group: 'com.google.code.gson', name: 'gson', version: '2.10.1'
implementation 'com.belerweb:pinyin4j:2.5.1' implementation 'com.belerweb:pinyin4j:2.5.1'
implementation("com.google.firebase:firebase-messaging") implementation("com.google.firebase:firebase-messaging")
implementation("com.facebook.android:facebook-android-sdk:[8,9)") // implementation("com.facebook.android:facebook-android-sdk:[8,9)")
implementation 'com.makeramen:roundedimageview:2.3.0' implementation 'com.makeramen:roundedimageview:2.3.0'
implementation 'com.mikhaellopez:circularprogressbar:3.1.0' implementation 'com.mikhaellopez:circularprogressbar:3.1.0'
......
...@@ -4,15 +4,12 @@ import android.annotation.SuppressLint ...@@ -4,15 +4,12 @@ import android.annotation.SuppressLint
import android.app.Activity import android.app.Activity
import android.content.Intent import android.content.Intent
import android.os.Bundle import android.os.Bundle
import android.os.Process
import android.text.TextUtils import android.text.TextUtils
import android.util.Log
import com.google.android.gms.ads.MobileAds import com.google.android.gms.ads.MobileAds
import com.google.firebase.FirebaseApp import com.google.firebase.FirebaseApp
import com.test.easy.easycleanerjunk.activity.splash.NewSplashActivity import com.test.easy.easycleanerjunk.activity.splash.NewSplashActivity
import com.test.easy.easycleanerjunk.helps.BaseApplication import com.test.easy.easycleanerjunk.helps.BaseApplication
import com.test.easy.easycleanerjunk.helps.ConfigHelper import com.test.easy.easycleanerjunk.helps.ConfigHelper
import com.test.easy.easycleanerjunk.helps.InstallHelps
import com.test.easy.easycleanerjunk.helps.ads.AdmobUtils import com.test.easy.easycleanerjunk.helps.ads.AdmobUtils
import com.test.easy.easycleanerjunk.utils.ActivityManagerUtils import com.test.easy.easycleanerjunk.utils.ActivityManagerUtils
import com.test.easy.easycleanerjunk.utils.SPUtils import com.test.easy.easycleanerjunk.utils.SPUtils
...@@ -44,9 +41,9 @@ class MyApplication : BaseApplication() { ...@@ -44,9 +41,9 @@ class MyApplication : BaseApplication() {
fun initApp() { fun initApp() {
if (ConfigHelper.ifAgreePrivacy) { if (ConfigHelper.ifAgreePrivacy) {
initNotificationWork() initNotificationWork()
MainScope().launch { // MainScope().launch {
InstallHelps.init() // InstallHelps.init()
} // }
MobileAds.initialize(this) { initializationStatus -> MobileAds.initialize(this) { initializationStatus ->
} }
} }
......
package com.test.easy.easycleanerjunk.helps
import com.android.installreferrer.api.InstallReferrerClient
import com.android.installreferrer.api.InstallReferrerStateListener
import org.json.JSONObject
object InstallHelps {
fun init() {
val referrerClient = InstallReferrerClient.newBuilder(BaseApplication.context).build()
referrerClient.startConnection(object : InstallReferrerStateListener {
override fun onInstallReferrerSetupFinished(responseCode: Int) {
try {
when (responseCode) {
InstallReferrerClient.InstallReferrerResponse.OK -> {
val response = referrerClient.installReferrer
val installInfo = response.installReferrer
val obj = JSONObject()
obj.put("referrerUrl", response.installReferrer)
obj.put("referrerClickTime", response.referrerClickTimestampSeconds)
obj.put("appInstallTime", response.installBeginTimestampSeconds)
obj.put("instantExperienceLaunched", installInfo.toString())
}
else -> {
}
}
} catch (_: Exception) {
}
}
override fun onInstallReferrerServiceDisconnected() {
}
})
}
}
\ No newline at end of file
...@@ -23,7 +23,6 @@ object BarUtils { ...@@ -23,7 +23,6 @@ object BarUtils {
} }
private fun setStatusBarLightMode(window: Window, isLightMode: Boolean) { private fun setStatusBarLightMode(window: Window, isLightMode: Boolean) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
val decorView = window.decorView val decorView = window.decorView
var vis = decorView.systemUiVisibility var vis = decorView.systemUiVisibility
vis = if (isLightMode) { vis = if (isLightMode) {
...@@ -33,14 +32,12 @@ object BarUtils { ...@@ -33,14 +32,12 @@ object BarUtils {
} }
decorView.systemUiVisibility = vis decorView.systemUiVisibility = vis
} }
}
fun setStatusBarColor(activity: Activity, @ColorInt color: Int): View? { fun setStatusBarColor(activity: Activity, @ColorInt color: Int): View? {
return setStatusBarColor(activity, color, false) return setStatusBarColor(activity, color, false)
} }
private fun setStatusBarColor(activity: Activity, @ColorInt color: Int, isDecor: Boolean): View? { private fun setStatusBarColor(activity: Activity, @ColorInt color: Int, isDecor: Boolean): View? {
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.KITKAT) return null
transparentStatusBar(activity) transparentStatusBar(activity)
return applyStatusBarColor(activity, color, isDecor) return applyStatusBarColor(activity, color, isDecor)
} }
...@@ -53,17 +50,12 @@ object BarUtils { ...@@ -53,17 +50,12 @@ object BarUtils {
} }
private fun transparentStatusBar(window: Window) { private fun transparentStatusBar(window: Window) {
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.KITKAT) return
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
window.clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS) window.clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS)
window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS) window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS)
val option = View.SYSTEM_UI_FLAG_LAYOUT_STABLE or View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN val option = View.SYSTEM_UI_FLAG_LAYOUT_STABLE or View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
val vis = window.decorView.systemUiVisibility val vis = window.decorView.systemUiVisibility
window.decorView.systemUiVisibility = option or vis window.decorView.systemUiVisibility = option or vis
window.statusBarColor = Color.TRANSPARENT window.statusBarColor = Color.TRANSPARENT
} else {
window.addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS)
}
} }
private fun applyStatusBarColor(window: Window, color: Int, isDecor: Boolean): View { private fun applyStatusBarColor(window: Window, color: Int, isDecor: Boolean): View {
......
...@@ -8,8 +8,6 @@ import android.view.WindowManager; ...@@ -8,8 +8,6 @@ import android.view.WindowManager;
public class DeviceUtils { public class DeviceUtils {
private static final String TAG = "DeviceUtils";
/** /**
* 获取屏幕宽度 * 获取屏幕宽度
*/ */
...@@ -30,15 +28,4 @@ public class DeviceUtils { ...@@ -30,15 +28,4 @@ public class DeviceUtils {
return dm.heightPixels; return dm.heightPixels;
} }
public static String[] getABIs() {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
return Build.SUPPORTED_ABIS;
} else {
if (!TextUtils.isEmpty(Build.CPU_ABI2)) {
return new String[]{Build.CPU_ABI, Build.CPU_ABI2};
}
return new String[]{Build.CPU_ABI};
}
}
} }
\ 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