Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
F
File Recovery RecycleBin
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
File Recovery RecycleBin
Commits
513d05f1
Commit
513d05f1
authored
Jul 26, 2024
by
wanglei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
...
parent
e3b3acf5
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
8 deletions
+13
-8
StayNotificationService.kt
...filerecoveryrecyclebin/service/StayNotificationService.kt
+13
-8
No files found.
app/src/main/java/com/base/filerecoveryrecyclebin/service/StayNotificationService.kt
View file @
513d05f1
...
@@ -20,10 +20,10 @@ import androidx.core.app.NotificationCompat
...
@@ -20,10 +20,10 @@ import androidx.core.app.NotificationCompat
import
androidx.core.graphics.drawable.IconCompat
import
androidx.core.graphics.drawable.IconCompat
import
com.base.filerecoveryrecyclebin.R
import
com.base.filerecoveryrecyclebin.R
import
com.base.filerecoveryrecyclebin.activity.MainActivity
import
com.base.filerecoveryrecyclebin.activity.MainActivity
import
com.base.filerecoveryrecyclebin.activity.junkclean.ScanJunkActivity
import
com.base.filerecoveryrecyclebin.activity.SplashActivity
import
com.base.filerecoveryrecyclebin.activity.recovery.FileScanResultActivity
import
com.base.filerecoveryrecyclebin.activity.recyclebin.MediaContentObserver
import
com.base.filerecoveryrecyclebin.activity.recyclebin.MediaContentObserver
import
com.base.filerecoveryrecyclebin.activity.recyclebin.MyFileObserver
import
com.base.filerecoveryrecyclebin.activity.recyclebin.MyFileObserver
import
com.base.filerecoveryrecyclebin.bean.ConstObject
import
com.base.filerecoveryrecyclebin.bean.ConstObject.SCAN_DOCUMENTS
import
com.base.filerecoveryrecyclebin.bean.ConstObject.SCAN_DOCUMENTS
import
com.base.filerecoveryrecyclebin.bean.ConstObject.SCAN_PHOTOS
import
com.base.filerecoveryrecyclebin.bean.ConstObject.SCAN_PHOTOS
import
com.base.filerecoveryrecyclebin.bean.ConstObject.SCAN_VIDEOS
import
com.base.filerecoveryrecyclebin.bean.ConstObject.SCAN_VIDEOS
...
@@ -63,7 +63,7 @@ class StayNotificationService : Service() {
...
@@ -63,7 +63,7 @@ class StayNotificationService : Service() {
@SuppressLint
(
"ForegroundServiceType"
)
@SuppressLint
(
"ForegroundServiceType"
)
override
fun
onStartCommand
(
intent
:
Intent
?,
flags
:
Int
,
startId
:
Int
):
Int
{
override
fun
onStartCommand
(
intent
:
Intent
?,
flags
:
Int
,
startId
:
Int
):
Int
{
if
(
fileObserver
==
null
)
{
if
(
fileObserver
==
null
)
{
fileObserver
=
FileObserverExample
()
fileObserver
=
FileObserverExample
()
fileObserver
?.
startObserving
()
fileObserver
?.
startObserving
()
}
}
...
@@ -147,14 +147,17 @@ class StayNotificationService : Service() {
...
@@ -147,14 +147,17 @@ class StayNotificationService : Service() {
val
expendView
=
RemoteViews
(
context
.
packageName
,
R
.
layout
.
stay_notification_big
)
val
expendView
=
RemoteViews
(
context
.
packageName
,
R
.
layout
.
stay_notification_big
)
val
requestCode1
=
Random
.
nextInt
(
1800
)
val
requestCode1
=
Random
.
nextInt
(
1800
)
val
intent0
=
Intent
(
context
,
ScanJunkActivity
::
class
.
java
)
val
intent0
=
Intent
(
context
,
SplashActivity
::
class
.
java
).
apply
{
putExtra
(
"actionId"
,
ConstObject
.
ID_JUNK_CLEAN_PUSH
)
}
val
pendingIntent0
=
val
pendingIntent0
=
PendingIntent
.
getActivity
(
context
,
requestCode1
,
intent0
,
PendingIntent
.
FLAG_IMMUTABLE
)
PendingIntent
.
getActivity
(
context
,
requestCode1
,
intent0
,
PendingIntent
.
FLAG_IMMUTABLE
)
contentView
.
setOnClickPendingIntent
(
R
.
id
.
id_ll_clean
,
pendingIntent0
)
contentView
.
setOnClickPendingIntent
(
R
.
id
.
id_ll_clean
,
pendingIntent0
)
expendView
.
setOnClickPendingIntent
(
R
.
id
.
id_ll_clean
,
pendingIntent0
)
expendView
.
setOnClickPendingIntent
(
R
.
id
.
id_ll_clean
,
pendingIntent0
)
val
requestCode2
=
Random
.
nextInt
(
1800
)
val
requestCode2
=
Random
.
nextInt
(
1800
)
val
intent2
=
Intent
(
context
,
FileScanResultActivity
::
class
.
java
).
apply
{
val
intent2
=
Intent
(
context
,
SplashActivity
::
class
.
java
).
apply
{
putExtra
(
"actionId"
,
ConstObject
.
ID_RECOVERY_PHOTOS
)
putExtra
(
"ScanType"
,
SCAN_PHOTOS
)
putExtra
(
"ScanType"
,
SCAN_PHOTOS
)
}
}
val
pendingIntent2
=
val
pendingIntent2
=
...
@@ -163,7 +166,8 @@ class StayNotificationService : Service() {
...
@@ -163,7 +166,8 @@ class StayNotificationService : Service() {
expendView
.
setOnClickPendingIntent
(
R
.
id
.
id_recovery_photos
,
pendingIntent2
)
expendView
.
setOnClickPendingIntent
(
R
.
id
.
id_recovery_photos
,
pendingIntent2
)
val
requestCode3
=
Random
.
nextInt
(
1800
)
val
requestCode3
=
Random
.
nextInt
(
1800
)
val
intent3
=
Intent
(
context
,
FileScanResultActivity
::
class
.
java
).
apply
{
val
intent3
=
Intent
(
context
,
SplashActivity
::
class
.
java
).
apply
{
putExtra
(
"actionId"
,
ConstObject
.
ID_RECOVERY_VIDEOS
)
putExtra
(
"ScanType"
,
SCAN_VIDEOS
)
putExtra
(
"ScanType"
,
SCAN_VIDEOS
)
}
}
val
pendingIntent3
=
val
pendingIntent3
=
...
@@ -180,7 +184,8 @@ class StayNotificationService : Service() {
...
@@ -180,7 +184,8 @@ class StayNotificationService : Service() {
// expendView.setOnClickPendingIntent(R.id.id_screenshot, pendingIntent4)
// expendView.setOnClickPendingIntent(R.id.id_screenshot, pendingIntent4)
val
requestCode4
=
Random
.
nextInt
(
1800
)
val
requestCode4
=
Random
.
nextInt
(
1800
)
val
intent4
=
Intent
(
context
,
FileScanResultActivity
::
class
.
java
).
apply
{
val
intent4
=
Intent
(
context
,
SplashActivity
::
class
.
java
).
apply
{
putExtra
(
"actionId"
,
ConstObject
.
ID_RECOVERY_DOCUMENTS
)
putExtra
(
"ScanType"
,
SCAN_DOCUMENTS
)
putExtra
(
"ScanType"
,
SCAN_DOCUMENTS
)
}
}
val
pendingIntent4
=
val
pendingIntent4
=
...
...
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