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
a623a5b7
Commit
a623a5b7
authored
Mar 30, 2020
by
topjohnwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Set proper component name in FlashFragment
parent
be8479fd
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
8 deletions
+5
-8
Hacks.kt
app/src/main/java/com/topjohnwu/magisk/core/Hacks.kt
+1
-1
FlashFragment.kt
.../main/java/com/topjohnwu/magisk/ui/flash/FlashFragment.kt
+4
-7
No files found.
app/src/main/java/com/topjohnwu/magisk/core/Hacks.kt
View file @
a623a5b7
...
@@ -139,7 +139,7 @@ private class JobSchedulerWrapper(private val base: JobScheduler) : JobScheduler
...
@@ -139,7 +139,7 @@ private class JobSchedulerWrapper(private val base: JobScheduler) : JobScheduler
}
}
}
}
object
ClassMap
{
private
object
ClassMap
{
private
val
map
=
mapOf
(
private
val
map
=
mapOf
(
App
::
class
.
java
to
a
.
e
::
class
.
java
,
App
::
class
.
java
to
a
.
e
::
class
.
java
,
...
...
app/src/main/java/com/topjohnwu/magisk/ui/flash/FlashFragment.kt
View file @
a623a5b7
package
com.topjohnwu.magisk.ui.flash
package
com.topjohnwu.magisk.ui.flash
import
android.annotation.SuppressLint
import
android.annotation.SuppressLint
import
android.app.Activity
import
android.app.PendingIntent
import
android.content.Context
import
android.content.Context
import
android.content.pm.ActivityInfo
import
android.content.pm.ActivityInfo
import
android.net.Uri
import
android.net.Uri
...
@@ -14,8 +12,8 @@ import android.view.View
...
@@ -14,8 +12,8 @@ import android.view.View
import
androidx.core.net.toUri
import
androidx.core.net.toUri
import
androidx.navigation.NavDeepLinkBuilder
import
androidx.navigation.NavDeepLinkBuilder
import
com.topjohnwu.magisk.R
import
com.topjohnwu.magisk.R
import
com.topjohnwu.magisk.core.ClassMap
import
com.topjohnwu.magisk.core.Const
import
com.topjohnwu.magisk.core.Const
import
com.topjohnwu.magisk.core.cmp
import
com.topjohnwu.magisk.databinding.FragmentFlashMd2Binding
import
com.topjohnwu.magisk.databinding.FragmentFlashMd2Binding
import
com.topjohnwu.magisk.ui.MainActivity
import
com.topjohnwu.magisk.ui.MainActivity
import
com.topjohnwu.magisk.ui.base.BaseUIActivity
import
com.topjohnwu.magisk.ui.base.BaseUIActivity
...
@@ -73,14 +71,13 @@ class FlashFragment : BaseUIFragment<FlashViewModel, FragmentFlashMd2Binding>()
...
@@ -73,14 +71,13 @@ class FlashFragment : BaseUIFragment<FlashViewModel, FragmentFlashMd2Binding>()
companion
object
{
companion
object
{
private
fun
createIntent
(
context
:
Context
,
args
:
args
)
:
PendingIntent
{
private
fun
createIntent
(
context
:
Context
,
args
:
args
)
=
return
NavDeepLinkBuilder
(
context
)
NavDeepLinkBuilder
(
context
)
.
setGraph
(
R
.
navigation
.
main
)
.
setGraph
(
R
.
navigation
.
main
)
.
setComponentName
(
ClassMap
[
MainActivity
::
class
.
java
]
as
Class
<
out
Activity
>
)
.
setComponentName
(
MainActivity
::
class
.
java
.
cmp
(
context
.
packageName
)
)
.
setDestination
(
R
.
id
.
flashFragment
)
.
setDestination
(
R
.
id
.
flashFragment
)
.
setArguments
(
args
.
toBundle
())
.
setArguments
(
args
.
toBundle
())
.
createPendingIntent
()
.
createPendingIntent
()
}
private
fun
flashType
(
isSecondSlot
:
Boolean
)
=
private
fun
flashType
(
isSecondSlot
:
Boolean
)
=
if
(
isSecondSlot
)
Const
.
Value
.
FLASH_INACTIVE_SLOT
else
Const
.
Value
.
FLASH_MAGISK
if
(
isSecondSlot
)
Const
.
Value
.
FLASH_INACTIVE_SLOT
else
Const
.
Value
.
FLASH_MAGISK
...
...
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