Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
com.ccwangluo.accelerator
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sheteng
com.ccwangluo.accelerator
Commits
1394ab32
Commit
1394ab32
authored
Jan 26, 2021
by
Mygod
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use work-multiprocess
parent
065f57ef
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
2 additions
and
25 deletions
+2
-25
core/build.gradle.kts
core/build.gradle.kts
+1
-0
core/src/main/AndroidManifest.xml
core/src/main/AndroidManifest.xml
+0
-25
core/src/main/java/com/github/shadowsocks/Core.kt
core/src/main/java/com/github/shadowsocks/Core.kt
+1
-0
No files found.
core/build.gradle.kts
View file @
1394ab32
...
...
@@ -75,6 +75,7 @@ dependencies {
api
(
"androidx.lifecycle:lifecycle-livedata-core-ktx:$lifecycleVersion"
)
api
(
"androidx.preference:preference:1.1.1"
)
api
(
"androidx.room:room-runtime:$roomVersion"
)
api
(
"androidx.work:work-multiprocess:$workVersion"
)
api
(
"androidx.work:work-runtime-ktx:$workVersion"
)
api
(
"com.google.android.gms:play-services-oss-licenses:17.0.0"
)
api
(
"com.google.code.gson:gson:2.8.6"
)
...
...
core/src/main/AndroidManifest.xml
View file @
1394ab32
...
...
@@ -113,30 +113,5 @@
tools:node=
"remove"
/>
<service
android:name=
"androidx.room.MultiInstanceInvalidationService"
android:process=
":bg"
/>
<!-- https://android.googlesource.com/platform/frameworks/support/+/androidx-master-dev/work/workmanager/src/main/AndroidManifest.xml -->
<provider
android:name=
"androidx.work.impl.WorkManagerInitializer"
tools:node=
"remove"
/>
<service
android:name=
"androidx.work.impl.background.systemalarm.SystemAlarmService"
android:process=
":bg"
tools:ignore=
"Instantiatable"
/>
<service
android:name=
"androidx.work.impl.background.systemjob.SystemJobService"
android:process=
":bg"
/>
<service
android:name=
"androidx.work.impl.foreground.SystemForegroundService"
android:process=
":bg"
tools:ignore=
"Instantiatable"
/>
<receiver
android:name=
"androidx.work.impl.utils.ForceStopRunnable$BroadcastReceiver"
android:process=
":bg"
/>
<receiver
android:name=
"androidx.work.impl.background.systemalarm.ConstraintProxy$BatteryChargingProxy"
android:process=
":bg"
/>
<receiver
android:name=
"androidx.work.impl.background.systemalarm.ConstraintProxy$BatteryNotLowProxy"
android:process=
":bg"
/>
<receiver
android:name=
"androidx.work.impl.background.systemalarm.ConstraintProxy$StorageNotLowProxy"
android:process=
":bg"
/>
<receiver
android:name=
"androidx.work.impl.background.systemalarm.ConstraintProxy$NetworkStateProxy"
android:process=
":bg"
/>
<receiver
android:name=
"androidx.work.impl.background.systemalarm.RescheduleReceiver"
android:process=
":bg"
/>
<receiver
android:name=
"androidx.work.impl.background.systemalarm.ConstraintProxyUpdateReceiver"
android:process=
":bg"
/>
</application>
</manifest>
core/src/main/java/com/github/shadowsocks/Core.kt
View file @
1394ab32
...
...
@@ -141,6 +141,7 @@ object Core : Configuration.Provider {
}
override
fun
getWorkManagerConfiguration
()
=
Configuration
.
Builder
().
apply
{
setDefaultProcessName
(
app
.
packageName
+
":bg"
)
setMinimumLoggingLevel
(
if
(
BuildConfig
.
DEBUG
)
Log
.
VERBOSE
else
Log
.
INFO
)
setExecutor
{
GlobalScope
.
launch
{
it
.
run
()
}
}
setTaskExecutor
{
GlobalScope
.
launch
{
it
.
run
()
}
}
...
...
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