Commit 81bf7925 authored by jyx's avatar jyx

优化弹出次数错乱问题

parent 86c4b55f
......@@ -62,7 +62,7 @@ class ApkActivity : BaseActivity() {
private fun initView() {
GlideUtils.loadImageView(this, R.mipmap.ic_app_out_clean, ivImg)
if (mApkState == 0 || mApkState == 1) {
if (mApkState == 0) {
// 应用安装
val apkInfo2 = AppUtil.getApkInfo2(this, mApkPkgName)
tvTitle.text = "安装包残留提示"
......@@ -78,11 +78,37 @@ class ApkActivity : BaseActivity() {
tvInfo2.visibility = View.VISIBLE
ivIcon.visibility = View.VISIBLE
WifiDataManager.increaseCount(WifiDataManager.INSTALL_APK)
if (BuildConfig.DEBUG) {
tvInfo2.text = "\n-测试 -> 当前应用安装剩余次数:" + sp.getInt(
tvInfo2.text = "测试 -> 当前应用安装剩余次数:" + sp.getInt(
WifiDataManager.INSTALL_APK,
0
) + "当前应用安装总次数:" + WifiDataManager.INSTALL_APK_TIMES
) + "总次数:" + WifiDataManager.INSTALL_APK_TIMES
}
} else if (mApkState == 1) {
// 应用安装
val apkInfo2 = AppUtil.getApkInfo2(this, mApkPkgName)
tvTitle.text = "安装包残留提示"
tvInfo.text = SpanUtils()
.append(apkInfo2.applicationName)
.setForegroundColor(ContextCompat.getColor(this, R.color.color_28BA75))
.append(" 安装完成,清理安装包可节省")
.append("大量")
.setForegroundColor(ContextCompat.getColor(this, R.color.color_28BA75))
.append("空间")
.create()
GlideUtils.loadImageView(this, apkInfo2.applicationIcon, ivIcon)
tvInfo2.visibility = View.VISIBLE
ivIcon.visibility = View.VISIBLE
WifiDataManager.increaseCount(WifiDataManager.UPDATE_APK)
if (BuildConfig.DEBUG) {
tvInfo2.text = "测试 -> 当前应用更新剩余次数:" + sp.getInt(
WifiDataManager.UPDATE_APK,
0
) + "总次数:" + WifiDataManager.UPDATE_APK_TIMES
}
} else if (mApkState == 2) {
// 应用卸载
......@@ -99,12 +125,14 @@ class ApkActivity : BaseActivity() {
tvInfo2.visibility = View.GONE
ivIcon.visibility = View.GONE
WifiDataManager.increaseCount(WifiDataManager.UNINSTALL_APK)
if (BuildConfig.DEBUG) {
tvInfo2.visibility = View.VISIBLE
tvInfo2.text = "\n-测试 -> 当前应用卸载剩余次数:" + sp.getInt(
tvInfo2.text = "测试 -> 当前应用卸载剩余次数:" + sp.getInt(
WifiDataManager.UNINSTALL_APK,
0
) + "当前应用卸载总次数:" + WifiDataManager.UNINSTALL_APK_TIMES
) + "总次数:" + WifiDataManager.UNINSTALL_APK_TIMES
}
}
......
......@@ -48,6 +48,7 @@ class BoostFastActivity : Activity() {
StatusBarUtil.transparencyBar(this)
WifiDataManager.increaseCount(WifiDataManager.TIMING)
// base extras
intent.extras?.let {
......
......@@ -35,6 +35,8 @@ class ScreenActivity : OutAppActivity(), View.OnClickListener {
)
}, 500)
WifiDataManager.increaseCount(WifiDataManager.LOCK_ON)
// val thread = TimeThread(tvDate, tvTime)
// thread.start()
......@@ -53,7 +55,7 @@ class ScreenActivity : OutAppActivity(), View.OnClickListener {
private fun resetTime() {
val date = Date()
val monthDay = TimeRender.formatDate(date, TimeRender.DEFAULT_FORMAT_MONTH_DAY)
var time = TimeRender.formatDate(date, TimeRender.DEFAULT_FORMAT_MINTER)
val time = TimeRender.formatDate(date, TimeRender.DEFAULT_FORMAT_MINTER)
tvDate.text = TimeRender.getWeek() + " " + monthDay
tvTime.text = time
......
......@@ -106,9 +106,11 @@ class TriggerActivity : BaseActivity() {
.create()
btnClean.text = "立即提速"
WifiDataManager.increaseCount(WifiDataManager.WIFI_ON)
if (BuildConfig.DEBUG) {
tvInfo2.visibility = View.VISIBLE
tvInfo2.text = "-测试 -> 当前 连接WIFI 弹出次数:" + sp.getInt(
tvInfo2.text = "测试 -> 当前 连接WIFI 弹出次数:" + sp.getInt(
WifiDataManager.WIFI_ON,
0
) + "总次数:" + WifiDataManager.WIFI_ON_TIMES
......@@ -124,9 +126,11 @@ class TriggerActivity : BaseActivity() {
.create()
btnClean.text = "WIFI测速"
WifiDataManager.increaseCount(WifiDataManager.WIFI_ON)
if (BuildConfig.DEBUG) {
tvInfo2.visibility = View.VISIBLE
tvInfo2.text = "-测试 -> 当前 连接WIFI 弹出次数:" + sp.getInt(
tvInfo2.text = "测试 -> 当前 连接WIFI 弹出次数:" + sp.getInt(
WifiDataManager.WIFI_ON,
0
) + "总次数:" + WifiDataManager.WIFI_ON_TIMES
......@@ -142,9 +146,11 @@ class TriggerActivity : BaseActivity() {
.create()
btnClean.text = "WIFI安全检测"
WifiDataManager.increaseCount(WifiDataManager.WIFI_ON)
if (BuildConfig.DEBUG) {
tvInfo2.visibility = View.VISIBLE
tvInfo2.text = "-测试 -> 当前 连接WIFI 弹出次数:" + sp.getInt(
tvInfo2.text = "测试 -> 当前 连接WIFI 弹出次数:" + sp.getInt(
WifiDataManager.WIFI_ON,
0
) + "总次数:" + WifiDataManager.WIFI_ON_TIMES
......@@ -157,9 +163,11 @@ class TriggerActivity : BaseActivity() {
.create()
btnClean.text = "网络测速"
WifiDataManager.increaseCount(WifiDataManager.WIFI_OFF)
if (BuildConfig.DEBUG) {
tvInfo2.visibility = View.VISIBLE
tvInfo2.text = "-测试 -> 当前 断开WIFI 弹出次数:" + sp.getInt(
tvInfo2.text = "测试 -> 当前 断开WIFI 弹出次数:" + sp.getInt(
WifiDataManager.WIFI_OFF,
0
) + "总次数:" + WifiDataManager.WIFI_OFF_TIMES
......@@ -172,9 +180,11 @@ class TriggerActivity : BaseActivity() {
.create()
btnClean.text = "网络优化"
WifiDataManager.increaseCount(WifiDataManager.WIFI_OFF)
if (BuildConfig.DEBUG) {
tvInfo2.visibility = View.VISIBLE
tvInfo2.text = "-测试 -> 当前 断开WIFI 弹出次数:" + sp.getInt(
tvInfo2.text = "测试 -> 当前 断开WIFI 弹出次数:" + sp.getInt(
WifiDataManager.WIFI_OFF,
0
) + "总次数:" + WifiDataManager.WIFI_OFF_TIMES
......@@ -207,9 +217,11 @@ class TriggerActivity : BaseActivity() {
.create()
btnClean.text = "一键省电"
WifiDataManager.increaseCount(WifiDataManager.BATTERY_OFF)
if (BuildConfig.DEBUG) {
tvInfo2.visibility = View.VISIBLE
tvInfo2.text = "-测试 -> 当前 拔电 弹出次数:" + sp.getInt(
tvInfo2.text = "测试 -> 当前 拔电 弹出次数:" + sp.getInt(
WifiDataManager.BATTERY_OFF,
0
) + "总次数:" + WifiDataManager.BATTERY_OFF_TIMES
......@@ -225,9 +237,11 @@ class TriggerActivity : BaseActivity() {
phoneContainer.visibility = View.VISIBLE
btnClean.visibility = View.GONE
WifiDataManager.increaseCount(WifiDataManager.TELEPHONE_OFF)
if (BuildConfig.DEBUG) {
tvInfo2.visibility = View.VISIBLE
tvInfo2.text = "-测试 -> 当前 电话挂断 弹出次数:" + sp.getInt(
tvInfo2.text = "测试 -> 当前 电话挂断 弹出次数:" + sp.getInt(
WifiDataManager.TELEPHONE_OFF,
0
) + "总次数:" + WifiDataManager.PHONE_OFF_TIMES
......
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