Welcome, Java 8/9 APIs

Fix #1162
This commit is contained in:
topjohnwu 2019-03-07 00:01:07 -05:00
parent 82c864d57e
commit 9a15365a57
3 changed files with 12 additions and 6 deletions

View File

@ -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'

View File

@ -35,6 +35,9 @@
# SVG
-dontwarn com.caverock.androidsvg.SVGAndroidRenderer
# RetroStreams
-dontwarn java9.**
# Strip logging
-assumenosideeffects class com.topjohnwu.magisk.utils.Logger {
public *** debug(...);

View File

@ -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);
}
}