Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
M
Magisk
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
Magisk
Commits
294db93f
Commit
294db93f
authored
Oct 23, 2019
by
topjohnwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Copy instead of move
We might be copying from CE to DE storage, which cannot be moved
parent
7f971f71
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
DownloadService.kt
...va/com/topjohnwu/magisk/model/download/DownloadService.kt
+4
-3
No files found.
app/src/main/java/com/topjohnwu/magisk/model/download/DownloadService.kt
View file @
294db93f
...
@@ -13,6 +13,7 @@ import com.topjohnwu.magisk.extensions.chooser
...
@@ -13,6 +13,7 @@ import com.topjohnwu.magisk.extensions.chooser
import
com.topjohnwu.magisk.extensions.exists
import
com.topjohnwu.magisk.extensions.exists
import
com.topjohnwu.magisk.extensions.provide
import
com.topjohnwu.magisk.extensions.provide
import
com.topjohnwu.magisk.intent
import
com.topjohnwu.magisk.intent
import
com.topjohnwu.magisk.isRunningAsStub
import
com.topjohnwu.magisk.model.entity.internal.Configuration.*
import
com.topjohnwu.magisk.model.entity.internal.Configuration.*
import
com.topjohnwu.magisk.model.entity.internal.Configuration.Flash.Secondary
import
com.topjohnwu.magisk.model.entity.internal.Configuration.Flash.Secondary
import
com.topjohnwu.magisk.model.entity.internal.DownloadSubject
import
com.topjohnwu.magisk.model.entity.internal.DownloadSubject
...
@@ -20,7 +21,6 @@ import com.topjohnwu.magisk.model.entity.internal.DownloadSubject.*
...
@@ -20,7 +21,6 @@ import com.topjohnwu.magisk.model.entity.internal.DownloadSubject.*
import
com.topjohnwu.magisk.ui.flash.FlashActivity
import
com.topjohnwu.magisk.ui.flash.FlashActivity
import
com.topjohnwu.magisk.utils.APKInstall
import
com.topjohnwu.magisk.utils.APKInstall
import
com.topjohnwu.magisk.utils.DynAPK
import
com.topjohnwu.magisk.utils.DynAPK
import
com.topjohnwu.magisk.isRunningAsStub
import
org.koin.core.get
import
org.koin.core.get
import
java.io.File
import
java.io.File
import
kotlin.random.Random.Default.nextInt
import
kotlin.random.Random.Default.nextInt
...
@@ -67,7 +67,8 @@ open class DownloadService : RemoteFileService() {
...
@@ -67,7 +67,8 @@ open class DownloadService : RemoteFileService() {
when
(
subject
.
configuration
)
{
when
(
subject
.
configuration
)
{
is
APK
.
Upgrade
->
{
is
APK
.
Upgrade
->
{
if
(
isRunningAsStub
)
{
if
(
isRunningAsStub
)
{
subject
.
file
.
renameTo
(
DynAPK
.
update
(
this
))
subject
.
file
.
copyTo
(
DynAPK
.
update
(
this
),
overwrite
=
true
)
subject
.
file
.
delete
()
ProcessPhoenix
.
triggerRebirth
(
this
)
ProcessPhoenix
.
triggerRebirth
(
this
)
}
else
{
}
else
{
APKInstall
.
install
(
this
,
subject
.
file
)
APKInstall
.
install
(
this
,
subject
.
file
)
...
@@ -161,4 +162,4 @@ open class DownloadService : RemoteFileService() {
...
@@ -161,4 +162,4 @@ open class DownloadService : RemoteFileService() {
}
}
}
}
\ No newline at end of file
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