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
6fbc38d7
Commit
6fbc38d7
authored
Feb 29, 2020
by
topjohnwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add more notice/messages
parent
200bf993
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
4 deletions
+27
-4
Hacks.kt
app/src/main/java/com/topjohnwu/magisk/core/Hacks.kt
+0
-2
SecondSlotWarningDialog.kt
...nwu/magisk/model/events/dialog/SecondSlotWarningDialog.kt
+16
-0
InstallViewModel.kt
.../java/com/topjohnwu/magisk/ui/install/InstallViewModel.kt
+11
-2
No files found.
app/src/main/java/com/topjohnwu/magisk/core/Hacks.kt
View file @
6fbc38d7
...
@@ -161,12 +161,10 @@ object ClassMap {
...
@@ -161,12 +161,10 @@ object ClassMap {
* being removed when running "remove unused resources" */
* being removed when running "remove unused resources" */
val
shouldKeepResources
=
listOf
(
val
shouldKeepResources
=
listOf
(
/* TODO: The following strings should be used somewhere */
/* TODO: The following strings should be used somewhere */
R
.
string
.
patch_file_msg
,
R
.
string
.
no_apps_found
,
R
.
string
.
no_apps_found
,
R
.
string
.
no_info_provided
,
R
.
string
.
no_info_provided
,
R
.
string
.
release_notes
,
R
.
string
.
release_notes
,
R
.
string
.
settings_download_path_error
,
R
.
string
.
settings_download_path_error
,
R
.
string
.
install_inactive_slot_msg
,
R
.
string
.
invalid_update_channel
,
R
.
string
.
invalid_update_channel
,
R
.
string
.
update_available
R
.
string
.
update_available
)
)
app/src/main/java/com/topjohnwu/magisk/model/events/dialog/SecondSlotWarningDialog.kt
0 → 100644
View file @
6fbc38d7
package
com.topjohnwu.magisk.model.events.dialog
import
com.topjohnwu.magisk.R
import
com.topjohnwu.magisk.view.MagiskDialog
class
SecondSlotWarningDialog
:
DialogEvent
()
{
override
fun
build
(
dialog
:
MagiskDialog
)
{
dialog
.
applyTitle
(
android
.
R
.
string
.
dialog_alert_title
)
.
applyMessage
(
R
.
string
.
install_inactive_slot_msg
)
.
applyButton
(
MagiskDialog
.
ButtonType
.
POSITIVE
)
{
titleRes
=
android
.
R
.
string
.
ok
}
.
cancellable
(
true
)
}
}
app/src/main/java/com/topjohnwu/magisk/ui/install/InstallViewModel.kt
View file @
6fbc38d7
package
com.topjohnwu.magisk.ui.install
package
com.topjohnwu.magisk.ui.install
import
android.net.Uri
import
android.net.Uri
import
android.widget.Toast
import
com.topjohnwu.magisk.R
import
com.topjohnwu.magisk.R
import
com.topjohnwu.magisk.core.Info
import
com.topjohnwu.magisk.core.Info
import
com.topjohnwu.magisk.core.download.DownloadService
import
com.topjohnwu.magisk.core.download.DownloadService
import
com.topjohnwu.magisk.core.download.RemoteFileService
import
com.topjohnwu.magisk.core.download.RemoteFileService
import
com.topjohnwu.magisk.core.utils.Utils
import
com.topjohnwu.magisk.extensions.addOnPropertyChangedCallback
import
com.topjohnwu.magisk.extensions.addOnPropertyChangedCallback
import
com.topjohnwu.magisk.model.entity.internal.Configuration
import
com.topjohnwu.magisk.model.entity.internal.Configuration
import
com.topjohnwu.magisk.model.entity.internal.DownloadSubject
import
com.topjohnwu.magisk.model.entity.internal.DownloadSubject
import
com.topjohnwu.magisk.model.events.RequestFileEvent
import
com.topjohnwu.magisk.model.events.RequestFileEvent
import
com.topjohnwu.magisk.model.events.dialog.SecondSlotWarningDialog
import
com.topjohnwu.magisk.ui.base.BaseViewModel
import
com.topjohnwu.magisk.ui.base.BaseViewModel
import
com.topjohnwu.magisk.utils.KObservableField
import
com.topjohnwu.magisk.utils.KObservableField
import
com.topjohnwu.superuser.Shell
import
com.topjohnwu.superuser.Shell
...
@@ -41,8 +44,14 @@ class InstallViewModel : BaseViewModel(State.LOADED) {
...
@@ -41,8 +44,14 @@ class InstallViewModel : BaseViewModel(State.LOADED) {
}
}
}
}
method
.
addOnPropertyChangedCallback
{
method
.
addOnPropertyChangedCallback
{
if
(
method
.
value
==
R
.
id
.
method_patch
)
{
when
(
method
.
value
)
{
RequestFileEvent
().
publish
()
R
.
id
.
method_patch
->
{
Utils
.
toast
(
R
.
string
.
patch_file_msg
,
Toast
.
LENGTH_LONG
)
RequestFileEvent
().
publish
()
}
R
.
id
.
method_inactive_slot
->
{
SecondSlotWarningDialog
().
publish
()
}
}
}
}
}
}
}
...
...
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