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
669ea17a
Commit
669ea17a
authored
Aug 19, 2024
by
wanglei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
...
parent
aa7bbe61
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
49 additions
and
15 deletions
+49
-15
SplashActivity.kt
...ain/java/com/base/datarecovery/activity/SplashActivity.kt
+4
-4
NotificationUtil.kt
...c/main/java/com/base/datarecovery/fcm/NotificationUtil.kt
+3
-1
HomeFragment.kt
.../main/java/com/base/datarecovery/fragment/HomeFragment.kt
+37
-6
EventUtils.kt
app/src/main/java/com/base/datarecovery/utils/EventUtils.kt
+4
-4
fragment_home.xml
app/src/main/res/layout/fragment_home.xml
+1
-0
No files found.
app/src/main/java/com/base/datarecovery/activity/SplashActivity.kt
View file @
669ea17a
...
...
@@ -79,10 +79,10 @@ class SplashActivity : BaseActivity<ActivitySplashBinding>() {
BarUtils
.
setStatusBarLightMode
(
this
,
true
)
BarUtils
.
setStatusBarColor
(
this
,
Color
.
TRANSPARENT
)
if
(
MyApplication
.
isInterOpenShowing
)
{
finish
()
return
}
//
if (MyApplication.isInterOpenShowing) {
//
finish()
//
return
//
}
startStayNotification
()
NotificationUtil
.
stopNotificationHandler
()
...
...
app/src/main/java/com/base/datarecovery/fcm/NotificationUtil.kt
View file @
669ea17a
...
...
@@ -300,7 +300,9 @@ object NotificationUtil {
val
time
=
i
*
delay
handler
?.
postDelayed
(
Runnable
{
if
(
MyApplication
.
PAUSED_VALUE
===
1
)
{
if
(
handler
!=
null
)
{
handler
?.
removeCallbacksAndMessages
(
null
)
}
return
@Runnable
}
if
(
MyApplication
.
PAUSED_VALUE
!==
1
&&
ScreenStatusReceiver
.
isDeviceInteractive
()
&&
!
ScreenStatusReceiver
.
isSecureLockActive
())
{
...
...
app/src/main/java/com/base/datarecovery/fragment/HomeFragment.kt
View file @
669ea17a
...
...
@@ -4,6 +4,8 @@ import android.animation.AnimatorSet
import
android.animation.ObjectAnimator
import
android.annotation.SuppressLint
import
android.app.usage.StorageStatsManager
import
android.content.ClipData
import
android.content.ClipboardManager
import
android.content.Context
import
android.content.Intent
import
android.os.Build
...
...
@@ -12,6 +14,8 @@ import android.os.StatFs
import
android.os.storage.StorageManager
import
android.view.View
import
android.view.animation.AccelerateDecelerateInterpolator
import
android.widget.Toast
import
androidx.appcompat.app.AppCompatActivity
import
com.base.datarecovery.activity.SettingActivity
import
com.base.datarecovery.activity.appmanager.AppManagerAnimationActivity
import
com.base.datarecovery.activity.appprocess.AppProcessAnimationActivity
...
...
@@ -39,13 +43,15 @@ class HomeFragment : BaseFragment<FragmentHomeBinding>() {
showStorage
()
}
var
i
=
0
private
var
lastClickTime
=
0L
override
fun
setListener
()
{
binding
.
flScan
.
setOnClickListener
{
val
jumpJunkFirstAd
=
AppPreferences
.
getInstance
().
getString
(
"isjunkPlayAd"
,
"0"
).
toInt
()
if
(
jumpJunkFirstAd
==
1
)
{
if
(
jumpJunkFirstAd
==
1
)
{
startActivity
(
Intent
(
requireContext
(),
ScanJunk2Activity
::
class
.
java
))
}
else
{
}
else
{
startActivity
(
Intent
(
requireContext
(),
ScanJunkActivity
::
class
.
java
))
}
...
...
@@ -54,18 +60,18 @@ class HomeFragment : BaseFragment<FragmentHomeBinding>() {
binding
.
tvClean
.
setOnClickListener
{
val
jumpJunkFirstAd
=
AppPreferences
.
getInstance
().
getString
(
"isjunkPlayAd"
,
"0"
).
toInt
()
if
(
jumpJunkFirstAd
==
1
)
{
if
(
jumpJunkFirstAd
==
1
)
{
startActivity
(
Intent
(
requireContext
(),
ScanJunk2Activity
::
class
.
java
))
}
else
{
}
else
{
startActivity
(
Intent
(
requireContext
(),
ScanJunkActivity
::
class
.
java
))
}
}
binding
.
cardCleanJunk
.
setOnClickListener
{
val
jumpJunkFirstAd
=
AppPreferences
.
getInstance
().
getString
(
"isjunkPlayAd"
,
"0"
).
toInt
()
if
(
jumpJunkFirstAd
==
1
)
{
if
(
jumpJunkFirstAd
==
1
)
{
startActivity
(
Intent
(
requireContext
(),
ScanJunk2Activity
::
class
.
java
))
}
else
{
}
else
{
startActivity
(
Intent
(
requireContext
(),
ScanJunkActivity
::
class
.
java
))
}
}
...
...
@@ -89,7 +95,32 @@ class HomeFragment : BaseFragment<FragmentHomeBinding>() {
binding
.
flSetting
.
setOnClickListener
{
startActivity
(
Intent
(
requireContext
(),
SettingActivity
::
class
.
java
))
}
binding
.
tvTitle
.
setOnClickListener
{
if
(
System
.
currentTimeMillis
()
-
lastClickTime
>
5
*
1000
&&
i
!=
0
)
{
lastClickTime
=
0
i
=
0
}
if
(
i
==
20
)
{
copyUuidGid
()
i
=
0
}
i
++
lastClickTime
=
System
.
currentTimeMillis
()
}
}
private
fun
copyUuidGid
()
{
val
uuid
=
AppPreferences
.
getInstance
().
getString
(
"uuid"
,
""
)
val
gid
=
AppPreferences
.
getInstance
().
getString
(
"gid"
,
""
)
// 获取系统服务ClipboardManager
val
clipboard
:
ClipboardManager
=
requireContext
().
getSystemService
(
AppCompatActivity
.
CLIPBOARD_SERVICE
)
as
ClipboardManager
// 创建一个ClipData对象,其中包含要复制的文本
val
clip
=
ClipData
.
newPlainText
(
"uuid"
,
"uuid=$uuid gid=$gid"
)
// 将ClipData对象设置到剪贴板中
clipboard
.
setPrimaryClip
(
clip
)
Toast
.
makeText
(
requireContext
(),
"copy"
,
Toast
.
LENGTH_SHORT
).
show
()
}
@SuppressLint
(
"Recycle"
)
...
...
app/src/main/java/com/base/datarecovery/utils/EventUtils.kt
View file @
669ea17a
...
...
@@ -24,7 +24,7 @@ object EventUtils {
}
Thread
{
var
parmJson
:
String
?
=
""
var
par
a
mJson
:
String
?
=
""
try
{
val
pkg
=
ConfigHelper
.
packageName
val
s
=
JSONObject
()
...
...
@@ -48,15 +48,15 @@ object EventUtils {
.
put
(
"bp"
,
s2
)
.
toString
()
LogEx
.
logDebug
(
TAG
,
"data=${AppPreferences.getInstance().getString("
uuid
", "")}"
)
parmJson
=
AESHelper
.
encrypt
(
data
)
par
a
mJson
=
AESHelper
.
encrypt
(
data
)
}
catch
(
e
:
JSONException
)
{
parmJson
=
""
par
a
mJson
=
""
}
LogEx
.
logDebug
(
TAG
,
"report!"
)
doPost
(
url
,
HashMap
(),
parmJson
par
a
mJson
)
}.
start
()
}
...
...
app/src/main/res/layout/fragment_home.xml
View file @
669ea17a
...
...
@@ -21,6 +21,7 @@
android:layout_height=
"wrap_content"
>
<TextView
android:id=
"@+id/tv_title"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_vertical|start"
...
...
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