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
79fa0d3a
Commit
79fa0d3a
authored
Dec 31, 2020
by
topjohnwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Hide selection improvements
parent
8e61080a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
7 deletions
+17
-7
HideInfo.kt
app/src/main/java/com/topjohnwu/magisk/ui/hide/HideInfo.kt
+4
-1
HideRvItems.kt
...src/main/java/com/topjohnwu/magisk/ui/hide/HideRvItems.kt
+10
-3
proc_monitor.cpp
native/jni/magiskhide/proc_monitor.cpp
+3
-3
No files found.
app/src/main/java/com/topjohnwu/magisk/ui/hide/HideInfo.kt
View file @
79fa0d3a
...
...
@@ -99,4 +99,7 @@ data class HideProcessInfo(
val
name
:
String
,
val
packageName
:
String
,
var
isHidden
:
Boolean
)
)
{
val
isIsolated
get
()
=
name
==
ISOLATED_MAGIC
val
isAppZygote
get
()
=
name
.
endsWith
(
"_zygote"
)
}
app/src/main/java/com/topjohnwu/magisk/ui/hide/HideRvItems.kt
View file @
79fa0d3a
...
...
@@ -40,11 +40,10 @@ class HideRvItem(
if
(
value
==
true
)
{
processes
.
filterNot
{
it
.
isHidden
}
.
filter
{
isExpanded
||
it
.
process
.
name
==
it
.
process
.
packageName
}
.
filter
{
isExpanded
||
it
.
defaultSelection
}
}
else
{
processes
.
filter
{
it
.
isHidden
}
.
filter
{
isExpanded
||
it
.
process
.
name
==
it
.
process
.
packageName
}
}.
forEach
{
it
.
toggle
()
}
}
...
...
@@ -68,7 +67,12 @@ class HideRvItem(
else
->
null
}
}
else
{
processes
.
find
{
it
.
isHidden
&&
it
.
process
.
name
==
it
.
process
.
packageName
}
!=
null
val
defaultProcesses
=
processes
.
filter
{
it
.
defaultSelection
}
when
(
defaultProcesses
.
count
{
it
.
isHidden
})
{
0
->
false
defaultProcesses
.
size
->
true
else
->
null
}
}
}
...
...
@@ -102,6 +106,9 @@ class HideProcessRvItem(
isHidden
=
!
isHidden
}
val
defaultSelection
get
()
=
process
.
isIsolated
||
process
.
isAppZygote
||
process
.
name
==
process
.
packageName
override
fun
contentSameAs
(
other
:
HideProcessRvItem
)
=
process
==
other
.
process
override
fun
itemSameAs
(
other
:
HideProcessRvItem
)
=
process
.
name
==
other
.
process
.
name
...
...
native/jni/magiskhide/proc_monitor.cpp
View file @
79fa0d3a
...
...
@@ -86,7 +86,7 @@ void update_uid_map() {
string
data_path
(
APP_DATA_DIR
);
size_t
len
=
data_path
.
length
();
auto
dir
=
open_dir
(
APP_DATA_DIR
);
bool
first
Iteration
=
true
;
bool
first
_iter
=
true
;
for
(
dirent
*
entry
;
(
entry
=
xreaddir
(
dir
.
get
()));)
{
data_path
.
resize
(
len
);
data_path
+=
'/'
;
...
...
@@ -96,7 +96,7 @@ void update_uid_map() {
struct
stat
st
;
for
(
auto
&
hide
:
hide_set
)
{
if
(
hide
.
first
==
ISOLATED_MAGIC
)
{
if
(
!
first
Iteration
)
continue
;
if
(
!
first
_iter
)
continue
;
// Setup isolated processes
uid_proc_map
[
-
1
].
emplace_back
(
hide
.
second
);
}
...
...
@@ -106,7 +106,7 @@ void update_uid_map() {
continue
;
uid_proc_map
[
st
.
st_uid
].
emplace_back
(
hide
.
second
);
}
first
Iteration
=
false
;
first
_iter
=
false
;
}
}
...
...
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