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
9a15365a
Commit
9a15365a
authored
Mar 07, 2019
by
topjohnwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Welcome, Java 8/9 APIs
Fix #1162
parent
82c864d5
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
6 deletions
+12
-6
build.gradle
app/build.gradle
+1
-0
proguard-rules.pro
app/proguard-rules.pro
+3
-0
ApplicationAdapter.java
...ava/com/topjohnwu/magisk/adapters/ApplicationAdapter.java
+8
-6
No files found.
app/build.gradle
View file @
9a15365a
...
...
@@ -64,6 +64,7 @@ dependencies {
fullImplementation
project
(
':app-core'
)
fullImplementation
'ru.noties:markwon:2.0.1'
fullImplementation
'com.caverock:androidsvg-aar:1.3'
fullImplementation
'net.sourceforge.streamsupport:android-retrostreams:1.7.0'
def
androidXVersion
=
"1.0.0"
implementation
'androidx.core:core:1.0.1'
...
...
app/proguard-rules.pro
View file @
9a15365a
...
...
@@ -35,6 +35,9 @@
# SVG
-
dontwarn
com
.
caverock
.
androidsvg
.
SVGAndroidRenderer
# RetroStreams
-
dontwarn
java9
.
**
# Strip logging
-
assumenosideeffects
class
com
.
topjohnwu
.
magisk
.
utils
.
Logger
{
public
***
debug
(...);
...
...
app/src/full/java/com/topjohnwu/magisk/adapters/ApplicationAdapter.java
View file @
9a15365a
...
...
@@ -33,6 +33,7 @@ import androidx.annotation.WorkerThread;
import
androidx.collection.ArraySet
;
import
androidx.recyclerview.widget.RecyclerView
;
import
butterknife.BindView
;
import
java9.util.Comparators
;
public
class
ApplicationAdapter
extends
RecyclerView
.
Adapter
<
ApplicationAdapter
.
ViewHolder
>
{
...
...
@@ -218,12 +219,13 @@ public class ApplicationAdapter extends RecyclerView.Adapter<ApplicationAdapter.
@Override
public
int
compareTo
(
HideAppInfo
o
)
{
return
Comparator
.
comparing
((
HideAppInfo
t
)
->
t
.
hidden
)
.
reversed
()
.
thenComparing
((
a
,
b
)
->
a
.
name
.
compareToIgnoreCase
(
b
.
name
))
.
thenComparing
(
t
->
t
.
info
.
packageName
)
.
thenComparing
(
t
->
t
.
process
)
.
compare
(
this
,
o
);
Comparator
<
HideAppInfo
>
c
;
c
=
Comparators
.
comparing
((
HideAppInfo
t
)
->
t
.
hidden
);
c
=
Comparators
.
reversed
(
c
);
c
=
Comparators
.
thenComparing
(
c
,
(
a
,
b
)
->
a
.
name
.
compareToIgnoreCase
(
b
.
name
));
c
=
Comparators
.
thenComparing
(
c
,
t
->
t
.
info
.
packageName
);
c
=
Comparators
.
thenComparing
(
c
,
t
->
t
.
process
);
return
c
.
compare
(
this
,
o
);
}
}
...
...
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