Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
D
Data Recovery White
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
Data Recovery White
Commits
e97bf6ee
Commit
e97bf6ee
authored
Jul 18, 2024
by
leichao.gao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add log
parent
775ea5be
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
15 additions
and
10 deletions
+15
-10
AdDisplayUtils.java
...c/main/java/com/base/datarecovery/ads/AdDisplayUtils.java
+10
-9
AdMaxEvent.kt
...src/main/java/com/base/datarecovery/ads/max/AdMaxEvent.kt
+1
-0
NotificationUtil.kt
...c/main/java/com/base/datarecovery/fcm/NotificationUtil.kt
+1
-1
InstallHelps.kt
...src/main/java/com/base/datarecovery/utils/InstallHelps.kt
+2
-0
NewComUtils.kt
app/src/main/java/com/base/datarecovery/utils/NewComUtils.kt
+1
-0
No files found.
app/src/main/java/com/base/datarecovery/ads/AdDisplayUtils.java
View file @
e97bf6ee
...
@@ -71,16 +71,17 @@ public class AdDisplayUtils {
...
@@ -71,16 +71,17 @@ public class AdDisplayUtils {
public
boolean
shouldShowAd
(
String
ad_unit
)
{
public
boolean
shouldShowAd
(
String
ad_unit
)
{
boolean
s
=
shouldDisplayAd
()
&&
shouldIncrementClickCount
()
&&
shouldIncrementRequestFailAd
();
boolean
s
=
shouldDisplayAd
()
&&
shouldIncrementClickCount
()
&&
shouldIncrementRequestFailAd
();
LogEx
.
INSTANCE
.
logDebug
(
"glc"
,
"!shouldShowAd"
,
false
);
if
(!
s
)
{
JSONObject
obj2
=
new
JSONObject
();
LogEx
.
INSTANCE
.
logDebug
(
"glc"
,
"!shouldShowAd"
,
false
);
try
{
JSONObject
obj2
=
new
JSONObject
();
obj2
.
put
(
"reason"
,
"no ad"
);
try
{
obj2
.
put
(
"ad_unit"
,
ad_unit
);
obj2
.
put
(
"reason"
,
"no ad"
);
EventUtils
.
INSTANCE
.
event
(
"ad_show_error"
,
null
,
obj2
,
false
);
obj2
.
put
(
"ad_unit"
,
ad_unit
);
}
catch
(
JSONException
e
)
{
EventUtils
.
INSTANCE
.
event
(
"ad_show_error"
,
null
,
obj2
,
false
);
}
catch
(
JSONException
e
)
{
}
}
}
return
s
;
return
s
;
}
}
...
...
app/src/main/java/com/base/datarecovery/ads/max/AdMaxEvent.kt
View file @
e97bf6ee
...
@@ -75,6 +75,7 @@ object AdMaxEvent {
...
@@ -75,6 +75,7 @@ object AdMaxEvent {
obj
.
put
(
"latency"
,
ad
?.
requestLatencyMillis
)
obj
.
put
(
"latency"
,
ad
?.
requestLatencyMillis
)
obj
.
put
(
"valueMicros"
,
ad
?.
revenue
)
obj
.
put
(
"valueMicros"
,
ad
?.
revenue
)
obj
.
put
(
"from"
,
activity
.
javaClass
.
simpleName
)
obj
.
put
(
"from"
,
activity
.
javaClass
.
simpleName
)
LogEx
.
logDebug
(
"glc"
,
"from: "
+
activity
.
javaClass
.
simpleName
)
if
(!
adUnit
.
equals
(
"nativeAd"
)){
if
(!
adUnit
.
equals
(
"nativeAd"
)){
EventUtils
.
event
(
"ad_show"
,
ext
=
obj
)
EventUtils
.
event
(
"ad_show"
,
ext
=
obj
)
}
else
{
}
else
{
...
...
app/src/main/java/com/base/datarecovery/fcm/NotificationUtil.kt
View file @
e97bf6ee
...
@@ -217,7 +217,7 @@ object NotificationUtil {
...
@@ -217,7 +217,7 @@ object NotificationUtil {
fun
sendNotification
(
context
:
Context
)
{
fun
sendNotification
(
context
:
Context
)
{
val
currentNum
=
AppPreferences
.
getInstance
().
getInt
(
"showNotificationCount_"
+
AdDisplayUtils
.
getInstance
().
getCurrentDate
(),
0
)
val
currentNum
=
AppPreferences
.
getInstance
().
getInt
(
"showNotificationCount_"
+
AdDisplayUtils
.
getInstance
().
getCurrentDate
(),
0
)
val
maxNum
=
AppPreferences
.
getInstance
().
getString
(
"maxShowNotificationCount"
,
"1
00"
).
toIntOrNull
()
?:
100
val
maxNum
=
AppPreferences
.
getInstance
().
getString
(
"maxShowNotificationCount"
,
"1
56"
).
toIntOrNull
()
?:
156
if
(
currentNum
>=
maxNum
)
{
if
(
currentNum
>=
maxNum
)
{
LogEx
.
logDebug
(
"glc"
,
"currentNum >= maxNum"
)
LogEx
.
logDebug
(
"glc"
,
"currentNum >= maxNum"
)
return
return
...
...
app/src/main/java/com/base/datarecovery/utils/InstallHelps.kt
View file @
e97bf6ee
...
@@ -30,7 +30,9 @@ object InstallHelps {
...
@@ -30,7 +30,9 @@ object InstallHelps {
if
(
listOf
(
"gclid"
,
"facebook"
,
"instagram"
).
all
{
!
installInfo
.
contains
(
it
,
true
)
})
{
if
(
listOf
(
"gclid"
,
"facebook"
,
"instagram"
).
all
{
!
installInfo
.
contains
(
it
,
true
)
})
{
//自然用户
//自然用户
AppPreferences
.
getInstance
().
put
(
"install_source"
,
"origin"
)
AppPreferences
.
getInstance
().
put
(
"install_source"
,
"origin"
)
LogEx
.
logDebug
(
"glc"
,
"origin user"
)
}
else
{
}
else
{
LogEx
.
logDebug
(
"glc"
,
"channel user"
)
//渠道用户
//渠道用户
AppPreferences
.
getInstance
().
put
(
"install_source"
,
"channel"
)
AppPreferences
.
getInstance
().
put
(
"install_source"
,
"channel"
)
}
}
...
...
app/src/main/java/com/base/datarecovery/utils/NewComUtils.kt
View file @
e97bf6ee
...
@@ -99,6 +99,7 @@ object NewComUtils {
...
@@ -99,6 +99,7 @@ object NewComUtils {
AdDisplayUtils
.
getInstance
().
maxAdRequestFailCount
=
AdDisplayUtils
.
getInstance
().
maxAdRequestFailCount
=
AppPreferences
.
getInstance
().
getString
(
"adRequestFailCount"
,
"20"
).
toInt
()
AppPreferences
.
getInstance
().
getString
(
"adRequestFailCount"
,
"20"
).
toInt
()
}
}
}
}
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