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
fc29fff5
Commit
fc29fff5
authored
Jul 18, 2024
by
wanglei
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
00d202cc
35d3f4c4
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
34 additions
and
33 deletions
+34
-33
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
+3
-2
AdMaxInterstitialUtils.kt
...a/com/base/datarecovery/ads/max/AdMaxInterstitialUtils.kt
+8
-11
AdMaxOpenUtils.kt
...main/java/com/base/datarecovery/ads/max/AdMaxOpenUtils.kt
+3
-4
NotificationUtil.kt
...c/main/java/com/base/datarecovery/fcm/NotificationUtil.kt
+7
-7
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 @
fc29fff5
...
...
@@ -71,16 +71,17 @@ public class AdDisplayUtils {
public
boolean
shouldShowAd
(
String
ad_unit
)
{
boolean
s
=
shouldDisplayAd
()
&&
shouldIncrementClickCount
()
&&
shouldIncrementRequestFailAd
();
LogEx
.
INSTANCE
.
logDebug
(
"glc"
,
"!shouldShowAd"
,
false
);
JSONObject
obj2
=
new
JSONObject
();
try
{
obj2
.
put
(
"reason"
,
"no ad"
);
obj2
.
put
(
"ad_unit"
,
ad_unit
);
EventUtils
.
INSTANCE
.
event
(
"ad_show_error"
,
null
,
obj2
,
false
);
}
catch
(
JSONException
e
)
{
if
(!
s
)
{
LogEx
.
INSTANCE
.
logDebug
(
"glc"
,
"!shouldShowAd"
,
false
);
JSONObject
obj2
=
new
JSONObject
();
try
{
obj2
.
put
(
"reason"
,
"no ad"
);
obj2
.
put
(
"ad_unit"
,
ad_unit
);
EventUtils
.
INSTANCE
.
event
(
"ad_show_error"
,
null
,
obj2
,
false
);
}
catch
(
JSONException
e
)
{
}
}
return
s
;
}
...
...
app/src/main/java/com/base/datarecovery/ads/max/AdMaxEvent.kt
View file @
fc29fff5
...
...
@@ -61,7 +61,7 @@ object AdMaxEvent {
}
fun
showAd
(
ad
:
MaxAd
?,
adUnit
:
String
,
activity
:
Activity
)
{
fun
showAd
(
ad
:
MaxAd
?,
adUnit
:
String
,
activity
:
Activity
?
)
{
val
obj
=
JSONObject
()
obj
.
put
(
"UnitId"
,
ad
?.
adUnitId
)
obj
.
put
(
"ad_unit"
,
adUnit
)
...
...
@@ -74,7 +74,8 @@ object AdMaxEvent {
obj
.
put
(
"networkplacement"
,
ad
?.
networkPlacement
)
obj
.
put
(
"latency"
,
ad
?.
requestLatencyMillis
)
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"
)){
EventUtils
.
event
(
"ad_show"
,
ext
=
obj
)
}
else
{
...
...
app/src/main/java/com/base/datarecovery/ads/max/AdMaxInterstitialUtils.kt
View file @
fc29fff5
...
...
@@ -32,7 +32,6 @@ object AdMaxInterstitialUtils {
private
fun
setListener
(
activity
:
Activity
)
{
if
(
interstitialAd
==
null
)
{
val
reqId
=
UUID
.
randomUUID
().
toString
()
val
obj
=
JSONObject
()
obj
.
put
(
"req_id"
,
reqId
)
...
...
@@ -87,7 +86,7 @@ object AdMaxInterstitialUtils {
val
obj2
=
JSONObject
()
obj2
.
put
(
"code"
,
p1
.
code
)
obj2
.
put
(
"reason"
,
p1
.
message
)
obj2
.
put
(
"ad_unit"
,
"inter
stitial
Ad"
)
obj2
.
put
(
"ad_unit"
,
"interAd"
)
EventUtils
.
event
(
"ad_show_error"
,
ext
=
obj2
)
}
})
...
...
@@ -95,18 +94,12 @@ object AdMaxInterstitialUtils {
}
}
fun
showInterstitialAd
(
activity
:
Activity
,
onHidden
:
(()
->
Unit
)?
=
null
)
{
fun
showInterstitialAd
(
activity
:
Activity
,
onHidden
:
(()
->
Unit
)?
=
null
)
{
setListener
(
activity
)
if
(
activity
.
isFinishing
||
activity
.
isDestroyed
)
{
return
}
val
obj1
=
JSONObject
()
obj1
.
put
(
"ad_unit"
,
"interAd"
)
EventUtils
.
event
(
"ad_prepare_show"
,
ext
=
obj1
)
if
(
isAdExpired
())
{
val
obj2
=
JSONObject
()
...
...
@@ -123,10 +116,14 @@ object AdMaxInterstitialUtils {
return
}
val
obj1
=
JSONObject
()
obj1
.
put
(
"ad_unit"
,
"interAd"
)
EventUtils
.
event
(
"ad_prepare_show"
,
ext
=
obj1
)
this
.
onHidden
=
onHidden
if
(
interstitialAd
?.
isReady
==
true
)
{
LogEx
.
logDebug
(
TAG
,
"isReady=true"
)
interstitialAd
?.
showAd
()
interstitialAd
?.
showAd
(
activity
)
}
else
{
LogEx
.
logDebug
(
TAG
,
"onAdDisplayFailed"
)
val
obj2
=
JSONObject
()
...
...
@@ -155,7 +152,7 @@ object AdMaxInterstitialUtils {
}
loadingListener
=
{
customDialog
?.
dismiss
()
interstitialAd
?.
showAd
()
interstitialAd
?.
showAd
(
activity
)
loadingListener
=
null
}
...
...
app/src/main/java/com/base/datarecovery/ads/max/AdMaxOpenUtils.kt
View file @
fc29fff5
...
...
@@ -105,7 +105,9 @@ object AdMaxOpenUtils {
LogEx
.
logDebug
(
TAG
,
"showAppOpenAd continue"
)
val
obj1
=
JSONObject
()
obj1
.
put
(
"ad_unit"
,
"openAd"
)
EventUtils
.
event
(
"ad_prepare_show"
,
ext
=
obj1
)
AdMaxOpenUtils
.
onHidden
=
onHidden
if
(
appOpenAd
?.
isReady
==
true
)
{
...
...
@@ -116,9 +118,6 @@ object AdMaxOpenUtils {
loadingListener
=
{
LogEx
.
logDebug
(
TAG
,
"loadingListener callback"
)
loaded
?.
invoke
()
val
obj1
=
JSONObject
()
obj1
.
put
(
"ad_unit"
,
"openAd"
)
EventUtils
.
event
(
"ad_prepare_show"
,
ext
=
obj1
)
appOpenAd
?.
showAd
()
loadingListener
=
null
}
...
...
app/src/main/java/com/base/datarecovery/fcm/NotificationUtil.kt
View file @
fc29fff5
...
...
@@ -62,37 +62,37 @@ object NotificationUtil {
ID_SIMILAR_IMAGE
->
{
icon
=
R
.
mipmap
.
h_similar
desc
=
DuplicatePhotoStringResourceManager
.
getNextCopy
()
btn
=
"Clean
up
"
btn
=
"Clean
Up Space
"
}
ID_SCREENSHOT_CLEAN
->
{
icon
=
R
.
mipmap
.
repeatedphotos
desc
=
ScreenshotCleanupStringManager
.
getNextCleanupCopy
()
btn
=
"
Remove Screenshots
"
btn
=
"
Clean Up Space
"
}
ID_RECOVERY_PHOTOS
->
{
icon
=
R
.
mipmap
.
photos_ss
desc
=
PhotoRecoveryStringManager
.
getNextRecoveryCopy
()
btn
=
"Re
trieve Photo
"
btn
=
"Re
covery
"
}
ID_RECOVERY_VIDEOS
->
{
icon
=
R
.
mipmap
.
videos_ss
desc
=
VideoRecoveryStringManager
.
getNextRecoveryCopy
()
btn
=
"Recover
Video
"
btn
=
"Recover
y
"
}
ID_RECOVERY_DOCUMENTS
->
{
icon
=
R
.
mipmap
.
documents_ss
desc
=
DocumentRecoveryStringManager
.
getNextRecoveryCopy
()
btn
=
"Re
store Document
"
btn
=
"Re
covery
"
}
ID_PRIVACY_SPACE
->
{
icon
=
R
.
mipmap
.
space
desc
=
PrivacySpaceStringManager
.
getNextPrivacySpaceCopy
()
btn
=
"Hide
Content
"
btn
=
"Hide"
}
}
bigRemoteViews
.
setImageViewResource
(
R
.
id
.
iv_icon
,
icon
)
...
...
@@ -217,7 +217,7 @@ object NotificationUtil {
fun
sendNotification
(
context
:
Context
)
{
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
)
{
LogEx
.
logDebug
(
"glc"
,
"currentNum >= maxNum"
)
return
...
...
app/src/main/java/com/base/datarecovery/utils/InstallHelps.kt
View file @
fc29fff5
...
...
@@ -30,7 +30,9 @@ object InstallHelps {
if
(
listOf
(
"gclid"
,
"facebook"
,
"instagram"
).
all
{
!
installInfo
.
contains
(
it
,
true
)
})
{
//自然用户
AppPreferences
.
getInstance
().
put
(
"install_source"
,
"origin"
)
LogEx
.
logDebug
(
"glc"
,
"origin user"
)
}
else
{
LogEx
.
logDebug
(
"glc"
,
"channel user"
)
//渠道用户
AppPreferences
.
getInstance
().
put
(
"install_source"
,
"channel"
)
}
...
...
app/src/main/java/com/base/datarecovery/utils/NewComUtils.kt
View file @
fc29fff5
...
...
@@ -99,6 +99,7 @@ object NewComUtils {
AdDisplayUtils
.
getInstance
().
maxAdRequestFailCount
=
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