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
0293eb5c
Commit
0293eb5c
authored
Jun 08, 2019
by
topjohnwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Never refetch magisk version dynamically
parent
1ee75b6a
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
20 deletions
+0
-20
MagiskRepository.kt
.../com/topjohnwu/magisk/data/repository/MagiskRepository.kt
+0
-20
No files found.
app/src/main/java/com/topjohnwu/magisk/data/repository/MagiskRepository.kt
View file @
0293eb5c
...
@@ -63,16 +63,6 @@ class MagiskRepository(
...
@@ -63,16 +63,6 @@ class MagiskRepository(
Config
.
uninstallerLink
=
it
.
uninstaller
.
link
Config
.
uninstallerLink
=
it
.
uninstaller
.
link
}
}
fun
fetchMagiskVersion
():
Single
<
Version
>
=
Single
.
zip
(
fetchMagiskVersionName
(),
fetchMagiskVersionCode
(),
BiFunction
{
versionName
,
versionCode
->
Version
(
versionName
,
versionCode
)
}
)
fun
fetchApps
()
=
fun
fetchApps
()
=
Single
.
fromCallable
{
packageManager
.
getInstalledApplications
(
0
)
}
Single
.
fromCallable
{
packageManager
.
getInstalledApplications
(
0
)
}
.
flattenAsFlowable
{
it
}
.
flattenAsFlowable
{
it
}
...
@@ -91,16 +81,6 @@ class MagiskRepository(
...
@@ -91,16 +81,6 @@ class MagiskRepository(
.
map
{
HideTarget
(
it
)
}
.
map
{
HideTarget
(
it
)
}
.
toList
()
.
toList
()
private
fun
fetchMagiskVersionName
()
=
"magisk -v"
.
suRaw
()
.
map
{
it
.
first
()
}
.
map
{
it
.
substring
(
0
until
it
.
indexOf
(
":"
))
}
.
onErrorReturn
{
"Unknown"
}
private
fun
fetchMagiskVersionCode
()
=
"magisk -V"
.
suRaw
()
.
map
{
it
.
first
()
}
.
map
{
it
.
toIntOrNull
()
?:
-
1
}
.
onErrorReturn
{
-
1
}
fun
toggleHide
(
isEnabled
:
Boolean
,
packageName
:
String
,
process
:
String
)
=
fun
toggleHide
(
isEnabled
:
Boolean
,
packageName
:
String
,
process
:
String
)
=
"magiskhide --%s %s %s"
.
format
(
isEnabled
.
state
,
packageName
,
process
).
su
().
ignoreElement
()
"magiskhide --%s %s %s"
.
format
(
isEnabled
.
state
,
packageName
,
process
).
su
().
ignoreElement
()
...
...
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