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
10f50e24
Commit
10f50e24
authored
Mar 28, 2019
by
topjohnwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert to old behavior on old MagiskHide versions
parent
8e9a7b25
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
13 deletions
+20
-13
ApplicationAdapter.java
...ava/com/topjohnwu/magisk/adapters/ApplicationAdapter.java
+20
-13
No files found.
app/src/main/java/com/topjohnwu/magisk/adapters/ApplicationAdapter.java
View file @
10f50e24
...
@@ -39,6 +39,7 @@ import java.util.Set;
...
@@ -39,6 +39,7 @@ import java.util.Set;
import
butterknife.BindView
;
import
butterknife.BindView
;
import
java9.util.Comparators
;
import
java9.util.Comparators
;
import
java9.util.Objects
;
import
java9.util.Objects
;
import
java9.util.Sets
;
import
java9.util.stream.Collectors
;
import
java9.util.stream.Collectors
;
import
java9.util.stream.Stream
;
import
java9.util.stream.Stream
;
import
java9.util.stream.StreamSupport
;
import
java9.util.stream.StreamSupport
;
...
@@ -48,6 +49,7 @@ public class ApplicationAdapter extends SectionedAdapter
...
@@ -48,6 +49,7 @@ public class ApplicationAdapter extends SectionedAdapter
private
static
final
String
SAFETYNET_PROCESS
=
"com.google.android.gms.unstable"
;
private
static
final
String
SAFETYNET_PROCESS
=
"com.google.android.gms.unstable"
;
private
static
final
String
GMS_PACKAGE
=
"com.google.android.gms"
;
private
static
final
String
GMS_PACKAGE
=
"com.google.android.gms"
;
private
static
boolean
old_hide
=
false
;
/* A list of apps that should not be shown as hide-able */
/* A list of apps that should not be shown as hide-able */
private
static
final
List
<
String
>
HIDE_BLACKLIST
=
Arrays
.
asList
(
private
static
final
List
<
String
>
HIDE_BLACKLIST
=
Arrays
.
asList
(
...
@@ -243,6 +245,9 @@ public class ApplicationAdapter extends SectionedAdapter
...
@@ -243,6 +245,9 @@ public class ApplicationAdapter extends SectionedAdapter
fullList
=
StreamSupport
.
stream
(
pm
.
getInstalledApplications
(
0
))
fullList
=
StreamSupport
.
stream
(
pm
.
getInstalledApplications
(
0
))
.
filter
(
info
->
!
HIDE_BLACKLIST
.
contains
(
info
.
packageName
)
&&
info
.
enabled
)
.
filter
(
info
->
!
HIDE_BLACKLIST
.
contains
(
info
.
packageName
)
&&
info
.
enabled
)
.
map
(
info
->
{
.
map
(
info
->
{
if
(
old_hide
)
{
return
new
HideAppInfo
(
info
,
Sets
.
of
(
info
.
packageName
));
}
else
{
Set
<
String
>
set
=
new
ArraySet
<>();
Set
<
String
>
set
=
new
ArraySet
<>();
PackageInfo
pkg
=
getPackageInfo
(
info
.
packageName
);
PackageInfo
pkg
=
getPackageInfo
(
info
.
packageName
);
if
(
pkg
!=
null
)
{
if
(
pkg
!=
null
)
{
...
@@ -254,6 +259,7 @@ public class ApplicationAdapter extends SectionedAdapter
...
@@ -254,6 +259,7 @@ public class ApplicationAdapter extends SectionedAdapter
if
(
set
.
isEmpty
())
if
(
set
.
isEmpty
())
return
null
;
return
null
;
return
new
HideAppInfo
(
info
,
set
);
return
new
HideAppInfo
(
info
,
set
);
}
}).
filter
(
Objects:
:
nonNull
).
sorted
()
}).
filter
(
Objects:
:
nonNull
).
sorted
()
.
collect
(
Collectors
.
toList
());
.
collect
(
Collectors
.
toList
());
...
@@ -368,13 +374,14 @@ public class ApplicationAdapter extends SectionedAdapter
...
@@ -368,13 +374,14 @@ public class ApplicationAdapter extends SectionedAdapter
String
process
;
String
process
;
HideTarget
(
String
line
)
{
HideTarget
(
String
line
)
{
String
[]
split
=
line
.
split
(
"\\|"
);
String
[]
split
=
line
.
split
(
"\\|"
,
2
);
pkg
=
split
[
0
];
pkg
=
split
[
0
];
if
(
split
.
length
>
=
2
)
{
if
(
split
.
length
=
=
2
)
{
process
=
split
[
1
];
process
=
split
[
1
];
}
else
{
}
else
{
// Backwards compatibility
// Backwards compatibility
process
=
pkg
.
equals
(
GMS_PACKAGE
)
?
SAFETYNET_PROCESS
:
pkg
;
old_hide
=
true
;
process
=
pkg
;
}
}
}
}
}
}
...
...
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