Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
DAVx⁵
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Jobs
Commits
Open sidebar
bitfire web engineering
DAVx⁵
Commits
6a512e1f
Commit
6a512e1f
authored
Jan 08, 2019
by
Ricki Hirner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix crash on single-core devices and ProGuard rules
parent
43009541
Pipeline
#42485327
passed with stages
in 10 minutes and 16 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
3 deletions
+11
-3
build.gradle
app/build.gradle
+3
-1
SyncManager.kt
.../main/java/at/bitfire/davdroid/syncadapter/SyncManager.kt
+8
-2
No files found.
app/build.gradle
View file @
6a512e1f
...
...
@@ -67,7 +67,6 @@ android {
dependencies
{
implementation
project
(
':cert4android'
)
implementation
':dav4jvm'
implementation
project
(
':ical4android'
)
implementation
project
(
':vcard4android'
)
...
...
@@ -79,6 +78,9 @@ dependencies {
implementation
'androidx.preference:preference:1.0.0'
implementation
'com.google.android.material:material:1.0.0'
implementation
(
':dav4jvm'
)
{
exclude
group:
'org.ogce'
,
module:
'xpp3'
// Android comes with its own XmlPullParser
}
implementation
'com.jaredrummler:colorpicker:1.0.5'
implementation
'com.mikepenz:aboutlibraries:6.2.0'
...
...
app/src/main/java/at/bitfire/davdroid/syncadapter/SyncManager.kt
View file @
6a512e1f
...
...
@@ -67,8 +67,10 @@ abstract class SyncManager<ResourceType: LocalResource<*>, out CollectionType: L
companion
object
{
val
MAX_PROCESSING_THREADS
=
Math
.
min
(
Runtime
.
getRuntime
().
availableProcessors
()/
2
,
1
)
val
MAX_DOWNLOAD_THREADS
=
Math
.
max
(
Runtime
.
getRuntime
().
availableProcessors
(),
2
)
val
MAX_PROCESSING_THREADS
=
// nCPU/2 (rounded up for case of 1 CPU), but max. 4
Math
.
min
((
Runtime
.
getRuntime
().
availableProcessors
()+
1
)/
2
,
4
)
val
MAX_DOWNLOAD_THREADS
=
// one (if one CPU), 2 otherwise
Math
.
min
(
Runtime
.
getRuntime
().
availableProcessors
(),
2
)
const
val
MAX_MULTIGET_RESOURCES
=
10
fun
cancelNotifications
(
manager
:
NotificationManagerCompat
,
authority
:
String
,
account
:
Account
)
=
...
...
@@ -79,6 +81,10 @@ abstract class SyncManager<ResourceType: LocalResource<*>, out CollectionType: L
}
init
{
Logger
.
log
.
info
(
"SyncManager: using up to $MAX_PROCESSING_THREADS processing threads and $MAX_DOWNLOAD_THREADS download threads"
)
}
private
val
mainAccount
=
if
(
localCollection
is
LocalAddressBook
)
localCollection
.
mainAccount
else
...
...
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