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
8db4c052
Commit
8db4c052
authored
Jul 23, 2024
by
leichao.gao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test code
parent
f8e9eca7
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
31 additions
and
15 deletions
+31
-15
google-services.json
app/google-services.json
+6
-6
MessagingService.java
...main/java/com/base/datarecovery/fcm/MessagingService.java
+2
-1
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 @
8db4c052
{
"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"
:
{
...
...
app/src/main/java/com/base/datarecovery/fcm/MessagingService.java
View file @
8db4c052
...
...
@@ -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"
);
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/ScreenStatusReceiver.java
View file @
8db4c052
...
...
@@ -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 @
8db4c052
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
)
})
{
//自然用户
if
(
BuildConfig
.
DEBUG
)
{
AppPreferences
.
getInstance
().
put
(
"install_source"
,
"channel"
)
}
else
{
AppPreferences
.
getInstance
().
put
(
"install_source"
,
"origin"
)
LogEx
.
logDebug
(
"glc"
,
"origin user"
)
}
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 @
8db4c052
...
...
@@ -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