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
18acb97d
Commit
18acb97d
authored
May 30, 2022
by
topjohnwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make SYSTEM_UID a special case
parent
bf2f823b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
SuperuserViewModel.kt
...a/com/topjohnwu/magisk/ui/superuser/SuperuserViewModel.kt
+4
-1
No files found.
app/src/main/java/com/topjohnwu/magisk/ui/superuser/SuperuserViewModel.kt
View file @
18acb97d
...
...
@@ -3,6 +3,7 @@ package com.topjohnwu.magisk.ui.superuser
import
android.annotation.SuppressLint
import
android.content.pm.PackageManager
import
android.content.pm.PackageManager.MATCH_UNINSTALLED_PACKAGES
import
android.os.Process
import
androidx.databinding.ObservableArrayList
import
androidx.lifecycle.viewModelScope
import
com.topjohnwu.magisk.BR
...
...
@@ -59,7 +60,9 @@ class SuperuserViewModel(
val
policies
=
ArrayList
<
PolicyRvItem
>()
val
pm
=
AppContext
.
packageManager
for
(
policy
in
db
.
fetchAll
())
{
val
pkgs
=
pm
.
getPackagesForUid
(
policy
.
uid
)
val
pkgs
=
if
(
policy
.
uid
==
Process
.
SYSTEM_UID
)
arrayOf
(
"android"
)
else
pm
.
getPackagesForUid
(
policy
.
uid
)
if
(
pkgs
==
null
)
{
db
.
delete
(
policy
.
uid
)
continue
...
...
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