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
bc51ce7c
Commit
bc51ce7c
authored
Mar 05, 2021
by
vvb2060
Committed by
John Wu
Mar 07, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix reboot menu
parent
b693d13b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
RebootEvent.kt
app/src/main/java/com/topjohnwu/magisk/events/RebootEvent.kt
+2
-2
No files found.
app/src/main/java/com/topjohnwu/magisk/events/RebootEvent.kt
View file @
bc51ce7c
...
@@ -29,10 +29,10 @@ object RebootEvent {
...
@@ -29,10 +29,10 @@ object RebootEvent {
fun
inflateMenu
(
activity
:
BaseActivity
):
PopupMenu
{
fun
inflateMenu
(
activity
:
BaseActivity
):
PopupMenu
{
val
themeWrapper
=
ContextThemeWrapper
(
activity
,
R
.
style
.
Foundation_PopupMenu
)
val
themeWrapper
=
ContextThemeWrapper
(
activity
,
R
.
style
.
Foundation_PopupMenu
)
val
menu
=
PopupMenu
(
themeWrapper
,
activity
.
findViewById
(
R
.
id
.
action_reboot
))
val
menu
=
PopupMenu
(
themeWrapper
,
activity
.
findViewById
(
R
.
id
.
action_reboot
))
activity
.
menuInflater
.
inflate
(
R
.
menu
.
menu_reboot
,
menu
.
menu
)
if
(
Build
.
VERSION
.
SDK_INT
>=
Build
.
VERSION_CODES
.
R
&&
if
(
Build
.
VERSION
.
SDK_INT
>=
Build
.
VERSION_CODES
.
R
&&
activity
.
getSystemService
<
PowerManager
>()
?.
isRebootingUserspaceSupported
==
true
)
activity
.
getSystemService
<
PowerManager
>()
?.
isRebootingUserspaceSupported
==
true
)
menu
.
menu
.
getItem
(
R
.
id
.
action_reboot_userspace
).
isVisible
=
true
menu
.
menu
.
findItem
(
R
.
id
.
action_reboot_userspace
).
isVisible
=
true
activity
.
menuInflater
.
inflate
(
R
.
menu
.
menu_reboot
,
menu
.
menu
)
menu
.
setOnMenuItemClickListener
(
::
reboot
)
menu
.
setOnMenuItemClickListener
(
::
reboot
)
return
menu
return
menu
}
}
...
...
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