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
42606efe
Commit
42606efe
authored
Jun 09, 2022
by
vvb2060
Committed by
John Wu
Jun 10, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Always remove task
parent
cae58c87
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
10 deletions
+13
-10
AndroidManifest.xml
app/src/main/AndroidManifest.xml
+1
-0
SuRequestActivity.kt
...va/com/topjohnwu/magisk/ui/surequest/SuRequestActivity.kt
+7
-7
Codegen.kt
buildSrc/src/main/java/Codegen.kt
+1
-0
connect.cpp
native/jni/su/connect.cpp
+4
-3
No files found.
app/src/main/AndroidManifest.xml
View file @
42606efe
...
@@ -27,6 +27,7 @@
...
@@ -27,6 +27,7 @@
android:name=
".ui.surequest.SuRequestActivity"
android:name=
".ui.surequest.SuRequestActivity"
android:directBootAware=
"true"
android:directBootAware=
"true"
android:exported=
"false"
android:exported=
"false"
android:taskAffinity=
""
tools:ignore=
"AppLinkUrlError"
>
tools:ignore=
"AppLinkUrlError"
>
<intent-filter>
<intent-filter>
<action
android:name=
"android.intent.action.VIEW"
/>
<action
android:name=
"android.intent.action.VIEW"
/>
...
...
app/src/main/java/com/topjohnwu/magisk/ui/surequest/SuRequestActivity.kt
View file @
42606efe
...
@@ -24,13 +24,9 @@ open class SuRequestActivity : UIActivity<ActivityRequestBinding>() {
...
@@ -24,13 +24,9 @@ open class SuRequestActivity : UIActivity<ActivityRequestBinding>() {
override
val
layoutRes
:
Int
=
R
.
layout
.
activity_request
override
val
layoutRes
:
Int
=
R
.
layout
.
activity_request
override
val
viewModel
:
SuRequestViewModel
by
viewModel
()
override
val
viewModel
:
SuRequestViewModel
by
viewModel
()
override
fun
onBackPressed
()
{
viewModel
.
denyPressed
()
}
override
fun
onCreate
(
savedInstanceState
:
Bundle
?)
{
override
fun
onCreate
(
savedInstanceState
:
Bundle
?)
{
supportRequestWindowFeature
(
Window
.
FEATURE_NO_TITLE
)
supportRequestWindowFeature
(
Window
.
FEATURE_NO_TITLE
)
lockOrientation
()
requestedOrientation
=
ActivityInfo
.
SCREEN_ORIENTATION_LOCKED
window
.
addFlags
(
WindowManager
.
LayoutParams
.
FLAG_KEEP_SCREEN_ON
)
window
.
addFlags
(
WindowManager
.
LayoutParams
.
FLAG_KEEP_SCREEN_ON
)
window
.
addFlags
(
WindowManager
.
LayoutParams
.
SOFT_INPUT_STATE_ALWAYS_HIDDEN
)
window
.
addFlags
(
WindowManager
.
LayoutParams
.
SOFT_INPUT_STATE_ALWAYS_HIDDEN
)
if
(
Build
.
VERSION
.
SDK_INT
>=
Build
.
VERSION_CODES
.
S
)
{
if
(
Build
.
VERSION
.
SDK_INT
>=
Build
.
VERSION_CODES
.
S
)
{
...
@@ -62,7 +58,11 @@ open class SuRequestActivity : UIActivity<ActivityRequestBinding>() {
...
@@ -62,7 +58,11 @@ open class SuRequestActivity : UIActivity<ActivityRequestBinding>() {
return
theme
return
theme
}
}
private
fun
lockOrientation
()
{
override
fun
onBackPressed
()
{
requestedOrientation
=
ActivityInfo
.
SCREEN_ORIENTATION_LOCKED
viewModel
.
denyPressed
()
}
override
fun
finish
()
{
super
.
finishAndRemoveTask
()
}
}
}
}
buildSrc/src/main/java/Codegen.kt
View file @
42606efe
...
@@ -127,6 +127,7 @@ fun genStubManifest(srcDir: File, outDir: File): String {
...
@@ -127,6 +127,7 @@ fun genStubManifest(srcDir: File, outDir: File): String {
| android:name="%s"
| android:name="%s"
| android:directBootAware="true"
| android:directBootAware="true"
| android:exported="false"
| android:exported="false"
| android:taskAffinity=""
| tools:ignore="AppLinkUrlError">
| tools:ignore="AppLinkUrlError">
| <intent-filter>
| <intent-filter>
| <action android:name="android.intent.action.VIEW"/>
| <action android:name="android.intent.action.VIEW"/>
...
...
native/jni/su/connect.cpp
View file @
42606efe
...
@@ -17,10 +17,11 @@ exe, "/system/bin", "com.android.commands.content.Content", \
...
@@ -17,10 +17,11 @@ exe, "/system/bin", "com.android.commands.content.Content", \
#define START_ACTIVITY \
#define START_ACTIVITY \
exe, "/system/bin", "com.android.commands.am.Am", \
exe, "/system/bin", "com.android.commands.am.Am", \
"start", "-p", target, "--user", user, "-a", "android.intent.action.VIEW", \
"start", "-p", target, "--user", user, "-a", "android.intent.action.VIEW", \
"-f", "0x58
0
00020", "--es", "action", action
"-f", "0x58
8
00020", "--es", "action", action
// 0x58000020 = FLAG_ACTIVITY_NEW_TASK|FLAG_ACTIVITY_MULTIPLE_TASK|
// 0x58800020 = FLAG_ACTIVITY_NEW_TASK|FLAG_ACTIVITY_MULTIPLE_TASK|
// FLAG_ACTIVITY_NO_HISTORY|FLAG_INCLUDE_STOPPED_PACKAGES
// FLAG_ACTIVITY_NO_HISTORY|FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS|
// FLAG_INCLUDE_STOPPED_PACKAGES
#define get_cmd(to) \
#define get_cmd(to) \
((to).command.empty() ? \
((to).command.empty() ? \
...
...
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