Commit 19c19084 authored by wanglei's avatar wanglei

...

parent 33208aac
...@@ -38,8 +38,9 @@ object AdmobMaxHelper { ...@@ -38,8 +38,9 @@ object AdmobMaxHelper {
var lastShowInter = 0L var lastShowInter = 0L
private fun getSpAdmobTrueMaxFalse(): Boolean { private fun getSpAdmobTrueMaxFalse(): Boolean {
val ss = AppPreferences.getInstance().getString("admobTrueMaxFalse", "1").toInt() // val ss = AppPreferences.getInstance().getString("admobTrueMaxFalse", "1").toInt()
return ss == 1 // return ss == 1
return true
} }
fun showBackInterAdSp(): Boolean { fun showBackInterAdSp(): Boolean {
......
...@@ -38,6 +38,7 @@ import com.base.browserwhite.ui.activity.splash.Splash2Activity ...@@ -38,6 +38,7 @@ import com.base.browserwhite.ui.activity.splash.Splash2Activity
import com.base.browserwhite.utils.AppPreferences import com.base.browserwhite.utils.AppPreferences
import com.base.browserwhite.utils.ImageUtils.getBitmapFromURL import com.base.browserwhite.utils.ImageUtils.getBitmapFromURL
import com.base.browserwhite.utils.KotlinExt.toFormatSize import com.base.browserwhite.utils.KotlinExt.toFormatSize
import com.base.browserwhite.utils.KotlinExt.toFormatTime
import com.base.browserwhite.utils.LogEx import com.base.browserwhite.utils.LogEx
import com.base.browserwhite.utils.RamUtils.ramPair import com.base.browserwhite.utils.RamUtils.ramPair
import com.base.browserwhite.utils.TimeUtils.formatATime import com.base.browserwhite.utils.TimeUtils.formatATime
...@@ -201,6 +202,8 @@ object NotificationUiUtil { ...@@ -201,6 +202,8 @@ object NotificationUiUtil {
ID_USAGE_REPORT -> {//使用报告 ID_USAGE_REPORT -> {//使用报告
val smallRemoteViews = RemoteViews(context.packageName, R.layout.notification_usage_report_small) val smallRemoteViews = RemoteViews(context.packageName, R.layout.notification_usage_report_small)
smallRemoteViews.setTextViewText(R.id.tv_tittle_1, "${System.currentTimeMillis().toFormatTime()} Usage Report")
val bigRemoteViews = RemoteViews(context.packageName, R.layout.notification_usage_report_big) val bigRemoteViews = RemoteViews(context.packageName, R.layout.notification_usage_report_big)
val pm = context.packageManager val pm = context.packageManager
val apps = AppProcessActivity.fastGetAppIcon(context) val apps = AppProcessActivity.fastGetAppIcon(context)
...@@ -370,7 +373,7 @@ object NotificationUiUtil { ...@@ -370,7 +373,7 @@ object NotificationUiUtil {
if (actionId == ID_CONSTELLATION) { if (actionId == ID_CONSTELLATION) {
AppPreferences.getInstance().put("last_constellation_notification_time", System.currentTimeMillis()) AppPreferences.getInstance().put("last_constellation_notification_time", System.currentTimeMillis())
} }
if (actionId==ID_USAGE_REPORT){ if (actionId == ID_USAGE_REPORT) {
AppPreferences.getInstance().put("last_usage_notification_time", System.currentTimeMillis()) AppPreferences.getInstance().put("last_usage_notification_time", System.currentTimeMillis())
} }
} }
......
...@@ -217,8 +217,17 @@ class WebBrowserActivity : BaseActivity<ActivityWebBrowserBinding>() { ...@@ -217,8 +217,17 @@ class WebBrowserActivity : BaseActivity<ActivityWebBrowserBinding>() {
} }
} }
binding.ivHome.setOnClickListener { binding.ivHome.setOnClickListener {
if (System.currentTimeMillis() - lastShowInter > 40 * 1000 * 1000 || lastShowInter == 0L) {
AdmobMaxHelper.admobMaxShowInterstitialAd(this@WebBrowserActivity, false) {
if (it) {
lastShowInter = System.currentTimeMillis()
}
finishToMain() finishToMain()
} }
} else {
finishToMain()
}
}
binding.flSearchEngine.setOnClickListener { binding.flSearchEngine.setOnClickListener {
showSearchEngineDialog { website -> showSearchEngineDialog { website ->
searchEngineSp = website searchEngineSp = website
......
...@@ -23,7 +23,8 @@ ...@@ -23,7 +23,8 @@
android:layout_weight="1" android:layout_weight="1"
android:textColor="@color/black" android:textColor="@color/black"
android:textSize="14sp" android:textSize="14sp"
tools:text="Check out your luck today!" /> android:text="Check out your luck today!"
tools:ignore="HardcodedText" />
<TextView <TextView
android:id="@+id/tv_btn" android:id="@+id/tv_btn"
......
...@@ -35,9 +35,9 @@ ...@@ -35,9 +35,9 @@
android:id="@+id/tv_tittle_2" android:id="@+id/tv_tittle_2"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="View the apps that generate the most garbage"
android:textColor="#898989" android:textColor="#898989"
android:textSize="12sp" android:textSize="12sp" />
tools:text="View the apps that generate the most garbage" />
</LinearLayout> </LinearLayout>
<TextView <TextView
......
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