Commit 7fdf81bb authored by Your Name's avatar Your Name

Merge remote-tracking branch 'origin/master'

parents 7c34fef6 f27e9db1
Pipeline #1418 canceled with stages
...@@ -19,6 +19,7 @@ public class Global { ...@@ -19,6 +19,7 @@ public class Global {
//配置 //配置
public static String OpenLoadTime = "OpenLoadTime";
public static String NotificationStayStatus = "NotificationStayStatus";//int public static String NotificationStayStatus = "NotificationStayStatus";//int
public static String NotificationStayCount = "NotificationStayCount";//int public static String NotificationStayCount = "NotificationStayCount";//int
public static String NotificationStayDelay = "NotificationStayDelay";//int public static String NotificationStayDelay = "NotificationStayDelay";//int
......
...@@ -8,6 +8,7 @@ import static com.swiftcleaner.chovey.model.bean.Global.FUNCTION_LARGE_FILE; ...@@ -8,6 +8,7 @@ import static com.swiftcleaner.chovey.model.bean.Global.FUNCTION_LARGE_FILE;
import static com.swiftcleaner.chovey.model.bean.Global.FUNCTION_SCREENSHOT; import static com.swiftcleaner.chovey.model.bean.Global.FUNCTION_SCREENSHOT;
import static com.swiftcleaner.chovey.model.bean.Global.FUNCTION_SIMILAR_PHOTOS; import static com.swiftcleaner.chovey.model.bean.Global.FUNCTION_SIMILAR_PHOTOS;
import static com.swiftcleaner.chovey.model.bean.Global.FUNCTION_WHATS_APP; import static com.swiftcleaner.chovey.model.bean.Global.FUNCTION_WHATS_APP;
import static com.swiftcleaner.chovey.model.bean.Global.OpenLoadTime;
import androidx.activity.result.ActivityResultLauncher; import androidx.activity.result.ActivityResultLauncher;
import androidx.activity.result.contract.ActivityResultContracts; import androidx.activity.result.contract.ActivityResultContracts;
...@@ -36,6 +37,7 @@ import com.zxdemo.http.ZxHttp; ...@@ -36,6 +37,7 @@ import com.zxdemo.http.ZxHttp;
import com.zxdemo.service.PermanentNotifyService; import com.zxdemo.service.PermanentNotifyService;
import com.zxdemo.utils.ActivityLauncher; import com.zxdemo.utils.ActivityLauncher;
import com.zxdemo.utils.NonBlockingCountdown; import com.zxdemo.utils.NonBlockingCountdown;
import com.zxdemo.utils.SpUtils;
import java.util.Objects; import java.util.Objects;
import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicBoolean;
...@@ -49,7 +51,7 @@ public class StartActivity extends AppCompatActivity { ...@@ -49,7 +51,7 @@ public class StartActivity extends AppCompatActivity {
private ActivityResultLauncher<Intent> notificationSettingsLauncher; private ActivityResultLauncher<Intent> notificationSettingsLauncher;
private boolean adShowing = false; private boolean adShowing = false;
private NonBlockingCountdown nonBlockingCountdown = new NonBlockingCountdown(this::jumpNext); private NonBlockingCountdown nonBlockingCountdown = new NonBlockingCountdown(this::jumpNext);
private int outJumpTime = 15; private int outJumpTime = SpUtils.Companion.getInstance().getInt(OpenLoadTime, 15);
public AtomicBoolean jumped = new AtomicBoolean(false); public AtomicBoolean jumped = new AtomicBoolean(false);
private ActivityLauncher launcher; private ActivityLauncher launcher;
......
...@@ -239,10 +239,10 @@ object AdmobHelper { ...@@ -239,10 +239,10 @@ object AdmobHelper {
loaded: (() -> Unit?)? = null, loaded: (() -> Unit?)? = null,
failed: (() -> Unit?)? = null, failed: (() -> Unit?)? = null,
) { ) {
// if (!checkAvailable(INTERSTITIAL_AD_UNIT, true)) { if (!checkAvailable(INTERSTITIAL_AD_UNIT, true)) {
// failed?.invoke() failed?.invoke()
// return return
// } }
// if (isLoadingInterstitialAd) { // if (isLoadingInterstitialAd) {
// failed?.invoke() // failed?.invoke()
// return // return
...@@ -777,9 +777,12 @@ object AdmobHelper { ...@@ -777,9 +777,12 @@ object AdmobHelper {
private fun checkAvailable(adUnit: String, notCheckIntervalTime: Boolean = false): Boolean { private fun checkAvailable(adUnit: String, notCheckIntervalTime: Boolean = false): Boolean {
if (isBlacklist()) { if (isBlacklist()) {
Log.d("glc","isBlacklist")
ReportAdUtils.showErrorAd(EVENT_BLACKLIST, adUnit) ReportAdUtils.showErrorAd(EVENT_BLACKLIST, adUnit)
return false return false
} }
Log.d("glc","isBlacklist() = false ")
val currentTime = System.currentTimeMillis() val currentTime = System.currentTimeMillis()
var lastDisplayTime = SpUtils.getInstance().getLong(KEY_LAST_DISPLAY_TIME) var lastDisplayTime = SpUtils.getInstance().getLong(KEY_LAST_DISPLAY_TIME)
if (lastDisplayTime.toInt() != 0 && !areTimestampsSameDay(currentTime, lastDisplayTime)) { if (lastDisplayTime.toInt() != 0 && !areTimestampsSameDay(currentTime, lastDisplayTime)) {
...@@ -797,14 +800,17 @@ object AdmobHelper { ...@@ -797,14 +800,17 @@ object AdmobHelper {
val adClick = SpUtils.getInstance().getInt(KEY_AD_CLICK, DEFAULT_AD_CLICK) val adClick = SpUtils.getInstance().getInt(KEY_AD_CLICK, DEFAULT_AD_CLICK)
if (displayNumber >= adShow) { if (displayNumber >= adShow) {
ReportAdUtils.showErrorAd(EVENT_SHOW_DISPLAYS, adUnit) ReportAdUtils.showErrorAd(EVENT_SHOW_DISPLAYS, adUnit)
Log.d("glc","displayNumber >= adShow: "+displayNumber+" adShow:"+adShow)
return false return false
} }
if (requestNumber >= adRequest) { if (requestNumber >= adRequest) {
ReportAdUtils.showErrorAd(EVENT_SHOW_REQUESTS, adUnit) ReportAdUtils.showErrorAd(EVENT_SHOW_REQUESTS, adUnit)
Log.d("glc","requestNumber >= adRequest: "+requestNumber)
return false return false
} }
if (clickNumber >= adClick) { if (clickNumber >= adClick) {
ReportAdUtils.showErrorAd(EVENT_SHOW_CLICKS, adUnit) ReportAdUtils.showErrorAd(EVENT_SHOW_CLICKS, adUnit)
Log.d("glc","clickNumber >= adClick: "+requestNumber)
return false return false
} }
if (notCheckIntervalTime || lastDisplayTime.toInt() == 0) return true if (notCheckIntervalTime || lastDisplayTime.toInt() == 0) return true
......
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