mirror of
https://gitlab.com/ultrasonic/ultrasonic.git
synced 2025-04-26 05:32:15 +03:00
Move function out of companion object
This commit is contained in:
parent
0efb3547c3
commit
8d4d1ba660
@ -351,7 +351,6 @@ class DownloadFile(
|
||||
}
|
||||
}
|
||||
|
||||
companion object {
|
||||
private fun updateModificationDate(file: File) {
|
||||
if (file.exists()) {
|
||||
val ok = file.setLastModified(System.currentTimeMillis())
|
||||
@ -363,6 +362,7 @@ class DownloadFile(
|
||||
try {
|
||||
// Try alternate method to update last modified date to current time
|
||||
// Found at https://code.google.com/p/android/issues/detail?id=18624
|
||||
// According to the bug, this was fixed in Android 8.0 (API 26)
|
||||
val raf = RandomAccessFile(file, "rw")
|
||||
val length = raf.length()
|
||||
raf.setLength(length + 1)
|
||||
@ -374,5 +374,4 @@ class DownloadFile(
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user