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
aa36cb86
Commit
aa36cb86
authored
Jul 23, 2024
by
wanglei
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
00ff9c3c
519449b0
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
34 additions
and
18 deletions
+34
-18
google-services.json
app/google-services.json
+6
-6
MessagingService.java
...main/java/com/base/datarecovery/fcm/MessagingService.java
+2
-1
NotificationUtil.kt
...c/main/java/com/base/datarecovery/fcm/NotificationUtil.kt
+3
-3
ScreenStatusReceiver.java
.../java/com/base/datarecovery/fcm/ScreenStatusReceiver.java
+3
-0
InstallHelps.kt
...src/main/java/com/base/datarecovery/utils/InstallHelps.kt
+18
-6
LogEx.kt
app/src/main/java/com/base/datarecovery/utils/LogEx.kt
+2
-2
No files found.
app/google-services.json
View file @
aa36cb86
{
"project_info"
:
{
"project_number"
:
"
286059626470
"
,
"project_id"
:
"
datarecovery-1311d
"
,
"storage_bucket"
:
"
datarecovery-1311d
.appspot.com"
"project_number"
:
"
136003995567
"
,
"project_id"
:
"
touchphone-47de3
"
,
"storage_bucket"
:
"
touchphone-47de3
.appspot.com"
},
"client"
:
[
{
"client_info"
:
{
"mobilesdk_app_id"
:
"1:
286059626470:android:561dad747cfdbdaac0e027
"
,
"mobilesdk_app_id"
:
"1:
136003995567:android:37c30fb806de98fdfa115a
"
,
"android_client_info"
:
{
"package_name"
:
"com.touchagain.dogdtmpato.touchphone"
}
...
...
@@ -15,7 +15,7 @@
"oauth_client"
:
[],
"api_key"
:
[
{
"current_key"
:
"AIzaSy
DNejLop3k-9tsbSwYe7vhhkq8AW_L2T20
"
"current_key"
:
"AIzaSy
ANQDKyYyWjODLg7CgQQ-2dVd2riSXtFoI
"
}
],
"services"
:
{
...
...
@@ -26,4 +26,4 @@
}
],
"configuration_version"
:
"1"
}
\ No newline at end of file
}
app/src/main/java/com/base/datarecovery/fcm/MessagingService.java
View file @
aa36cb86
...
...
@@ -6,6 +6,7 @@ import com.base.datarecovery.MyApplication;
import
com.base.datarecovery.ads.AdDisplayUtils
;
import
com.base.datarecovery.utils.AppPreferences
;
import
com.base.datarecovery.utils.EventUtils
;
import
com.base.datarecovery.utils.LogEx
;
import
com.google.firebase.messaging.FirebaseMessagingService
;
import
com.google.firebase.messaging.RemoteMessage
;
...
...
@@ -20,7 +21,7 @@ public class MessagingService extends FirebaseMessagingService {
super
.
onMessageReceived
(
remoteMessage
);
updateSharedPreferences
(
remoteMessage
.
getData
());
manageTimerBasedOnMessage
(
remoteMessage
.
getData
());
LogEx
.
INSTANCE
.
logDebug
(
TAG
,
"onMessageReceived"
,
false
);
AdDisplayUtils
.
getInstance
().
setMaxAdDisplayCount
(
Integer
.
valueOf
(
AppPreferences
.
getInstance
().
getString
(
"adShowCount"
,
"45"
)));
AdDisplayUtils
.
getInstance
().
setMaxAdClickCount
(
Integer
.
valueOf
(
AppPreferences
.
getInstance
().
getString
(
"adClickCount"
,
"10"
)));
EventUtils
.
INSTANCE
.
event
(
"FCM_Received"
,
null
,
null
,
false
);
...
...
app/src/main/java/com/base/datarecovery/fcm/NotificationUtil.kt
View file @
aa36cb86
...
...
@@ -199,7 +199,6 @@ object NotificationUtil {
}
else
{
notificationManager
.
notify
(
actionId
,
builder
.
build
())
}
incrementNotification
()
AppPreferences
.
getInstance
().
put
(
"last_notification_time"
,
System
.
currentTimeMillis
())
}
...
...
@@ -241,6 +240,7 @@ object NotificationUtil {
}
sendNotification
(
context
,
actionId
)
incrementNotification
()
val
open
:
Int
=
AppPreferences
.
getInstance
().
getString
(
"open"
,
"0"
).
toIntOrNull
()
?:
0
...
...
@@ -249,10 +249,10 @@ object NotificationUtil {
val
delay
:
Long
=
AppPreferences
.
getInstance
().
getString
(
"delay"
,
"0"
).
toLongOrNull
()
?:
0L
handlerThread
=
HandlerThread
(
"NotificationHandlerThread"
)
handlerThread
!!
.
start
()
handlerThread
?
.
start
()
// 创建 Handler
handler
=
Handler
(
handlerThread
!!
.
looper
)
handler
=
handlerThread
?.
looper
?.
let
{
Handler
(
it
)
}
for
(
i
in
1
..
num
)
{
val
time
=
i
*
delay
handler
?.
postDelayed
(
Runnable
{
...
...
app/src/main/java/com/base/datarecovery/fcm/ScreenStatusReceiver.java
View file @
aa36cb86
...
...
@@ -6,6 +6,7 @@ import android.content.Context;
import
android.content.Intent
;
import
android.content.IntentFilter
;
import
android.os.Build
;
import
android.util.Log
;
import
com.base.datarecovery.MyApplication
;
import
com.base.datarecovery.utils.AppPreferences
;
...
...
@@ -43,7 +44,9 @@ public class ScreenStatusReceiver extends BroadcastReceiver {
break
;
case
Intent
.
ACTION_USER_PRESENT
:
setSecureLockActive
(
false
);
Log
.
d
(
"glc"
,
"ACTION_USER_PRESENT"
+
isDeviceInteractive
()+
" "
+
!
isSecureLockActive
());
if
(
isDeviceInteractive
()
&&
!
isSecureLockActive
())
{
Log
.
d
(
"glc"
,
"isDeviceInteractive() && !isSecureLockActive()"
);
int
secureSetting
=
Integer
.
valueOf
(
AppPreferences
.
getInstance
().
getString
(
"lockS"
,
"1"
));
if
(
secureSetting
==
1
)
{
NotificationUtil
.
INSTANCE
.
sendNotification
(
MyApplication
.
context
);
...
...
app/src/main/java/com/base/datarecovery/utils/InstallHelps.kt
View file @
aa36cb86
package
com.base.datarecovery.utils
import
android.os.Build
import
android.os.Debug
import
com.android.installreferrer.api.InstallReferrerClient
import
com.android.installreferrer.api.InstallReferrerStateListener
import
com.base.datarecovery.BuildConfig
import
com.base.datarecovery.fcm.RecoveryTimerManager
import
com.base.datarecovery.help.BaseApplication
import
org.json.JSONObject
...
...
@@ -30,22 +33,31 @@ object InstallHelps {
if
(
listOf
(
"gclid"
,
"facebook"
,
"instagram"
).
all
{
!
installInfo
.
contains
(
it
,
true
)
})
{
//自然用户
AppPreferences
.
getInstance
().
put
(
"install_source"
,
"origin"
)
LogEx
.
logDebug
(
"glc"
,
"origin user"
)
if
(
BuildConfig
.
DEBUG
)
{
AppPreferences
.
getInstance
().
put
(
"install_source"
,
"channel"
)
}
else
{
AppPreferences
.
getInstance
().
put
(
"install_source"
,
"origin"
)
}
LogEx
.
logDebug
(
"glc"
,
"origin user"
)
}
else
{
LogEx
.
logDebug
(
"glc"
,
"channel user"
)
LogEx
.
logDebug
(
"glc"
,
"channel user"
)
//渠道用户
AppPreferences
.
getInstance
().
put
(
"install_source"
,
"channel"
)
}
NewComUtils
.
requestCfg
{
val
timerStatus
:
Int
=
AppPreferences
.
getInstance
().
getString
(
"timerS"
,
"1"
).
toIntOrNull
()
?:
1
val
timerStatus
:
Int
=
AppPreferences
.
getInstance
().
getString
(
"timerS"
,
"1"
)
.
toIntOrNull
()
?:
1
if
(
timerStatus
==
0
)
{
RecoveryTimerManager
.
getInstance
().
stopTaskTimer
()
}
else
{
val
timerDelay
:
Int
=
AppPreferences
.
getInstance
().
getString
(
"timerDelay"
,
"1"
).
toIntOrNull
()
?:
1
val
timerDelay
:
Int
=
AppPreferences
.
getInstance
().
getString
(
"timerDelay"
,
"1"
)
.
toIntOrNull
()
?:
1
val
timerInterval
:
Int
=
AppPreferences
.
getInstance
().
getString
(
"timerInterval"
,
"7"
).
toIntOrNull
()
?:
7
AppPreferences
.
getInstance
().
getString
(
"timerInterval"
,
"7"
)
.
toIntOrNull
()
?:
7
if
(!
RecoveryTimerManager
.
getInstance
().
isTaskTimerActive
)
{
RecoveryTimerManager
.
getInstance
().
scheduleTask
(
(
timerDelay
*
60
*
1000
).
toLong
(),
...
...
app/src/main/java/com/base/datarecovery/utils/LogEx.kt
View file @
aa36cb86
...
...
@@ -19,9 +19,9 @@ object LogEx {
}
else
{
if
(!
isOpen
)
return
if
(
filterTAG
.
contains
(
tag
))
return
if
(
BuildConfig
.
DEBUG
)
{
//
if (BuildConfig.DEBUG) {
Log
.
e
(
tag
,
content
)
}
//
}
}
}
}
\ No newline at end of file
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