Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
S
swiftcleanerphonehelper
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wanglei
swiftcleanerphonehelper
Commits
7fdf81bb
Commit
7fdf81bb
authored
Dec 20, 2024
by
Your Name
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
7c34fef6
f27e9db1
Pipeline
#1418
canceled with stages
Changes
3
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
5 deletions
+14
-5
Global.java
.../main/java/com/swiftcleaner/chovey/model/bean/Global.java
+1
-0
StartActivity.java
.../com/swiftcleaner/chovey/view/activity/StartActivity.java
+3
-1
AdmobHelper.kt
app/src/main/java/com/zxdemo/admob/AdmobHelper.kt
+10
-4
No files found.
app/src/main/java/com/swiftcleaner/chovey/model/bean/Global.java
View file @
7fdf81bb
...
@@ -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
...
...
app/src/main/java/com/swiftcleaner/chovey/view/activity/StartActivity.java
View file @
7fdf81bb
...
@@ -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
;
...
...
app/src/main/java/com/zxdemo/admob/AdmobHelper.kt
View file @
7fdf81bb
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment