[core] Nuke KeepAll and KeepMembers
This commit is contained in:
parent
96fbd2d045
commit
0bc9fdbaa2
|
|
@ -24,9 +24,3 @@
|
||||||
-dontoptimize
|
-dontoptimize
|
||||||
-keep class de.robv.android.xposed.** {*;}
|
-keep class de.robv.android.xposed.** {*;}
|
||||||
-keep class android.** { *; }
|
-keep class android.** { *; }
|
||||||
|
|
||||||
-keep interface io.github.lsposed.common.KeepAll
|
|
||||||
-keep interface io.github.lsposed.common.KeepMembers
|
|
||||||
|
|
||||||
-keep class * implements io.github.lsposed.common.KeepAll { *; }
|
|
||||||
-keepclassmembers class * implements io.github.lsposed.common.KeepMembers { *; }
|
|
||||||
|
|
@ -1,24 +0,0 @@
|
||||||
/*
|
|
||||||
* This file is part of LSPosed.
|
|
||||||
*
|
|
||||||
* LSPosed is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* LSPosed is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with LSPosed. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
*
|
|
||||||
* Copyright (C) 2020 EdXposed Contributors
|
|
||||||
* Copyright (C) 2021 LSPosed Contributors
|
|
||||||
*/
|
|
||||||
|
|
||||||
package io.github.lsposed.common;
|
|
||||||
|
|
||||||
public interface KeepAll {
|
|
||||||
}
|
|
||||||
|
|
@ -1,24 +0,0 @@
|
||||||
/*
|
|
||||||
* This file is part of LSPosed.
|
|
||||||
*
|
|
||||||
* LSPosed is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* LSPosed is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with LSPosed. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
*
|
|
||||||
* Copyright (C) 2020 EdXposed Contributors
|
|
||||||
* Copyright (C) 2021 LSPosed Contributors
|
|
||||||
*/
|
|
||||||
|
|
||||||
package io.github.lsposed.common;
|
|
||||||
|
|
||||||
public interface KeepMembers {
|
|
||||||
}
|
|
||||||
|
|
@ -21,16 +21,17 @@
|
||||||
package io.github.lsposed.lspd.core;
|
package io.github.lsposed.lspd.core;
|
||||||
|
|
||||||
import androidx.annotation.IntDef;
|
import androidx.annotation.IntDef;
|
||||||
|
import androidx.annotation.Keep;
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
|
|
||||||
import io.github.lsposed.common.KeepAll;
|
|
||||||
import io.github.lsposed.lspd.proxy.Router;
|
import io.github.lsposed.lspd.proxy.Router;
|
||||||
|
|
||||||
import java.lang.annotation.Retention;
|
import java.lang.annotation.Retention;
|
||||||
|
|
||||||
import static java.lang.annotation.RetentionPolicy.SOURCE;
|
import static java.lang.annotation.RetentionPolicy.SOURCE;
|
||||||
|
|
||||||
public interface Impl extends KeepAll {
|
@Keep
|
||||||
|
public interface Impl {
|
||||||
|
|
||||||
int NONE = 0;
|
int NONE = 0;
|
||||||
int YAHFA = 1;
|
int YAHFA = 1;
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,8 @@ import android.os.Binder;
|
||||||
import android.os.IBinder;
|
import android.os.IBinder;
|
||||||
import android.ddm.DdmHandleAppName;
|
import android.ddm.DdmHandleAppName;
|
||||||
|
|
||||||
import io.github.lsposed.common.KeepAll;
|
import androidx.annotation.Keep;
|
||||||
|
|
||||||
import io.github.lsposed.lspd.config.LSPApplicationServiceClient;
|
import io.github.lsposed.lspd.config.LSPApplicationServiceClient;
|
||||||
import io.github.lsposed.lspd.service.ServiceManager;
|
import io.github.lsposed.lspd.service.ServiceManager;
|
||||||
import io.github.lsposed.lspd.util.Utils;
|
import io.github.lsposed.lspd.util.Utils;
|
||||||
|
|
@ -35,7 +36,8 @@ import java.util.concurrent.atomic.AtomicReference;
|
||||||
import static io.github.lsposed.lspd.config.LSPApplicationServiceClient.serviceClient;
|
import static io.github.lsposed.lspd.config.LSPApplicationServiceClient.serviceClient;
|
||||||
|
|
||||||
@SuppressLint("DefaultLocale")
|
@SuppressLint("DefaultLocale")
|
||||||
public class Main implements KeepAll {
|
@Keep
|
||||||
|
public class Main {
|
||||||
private static final AtomicReference<Impl> lspdImplRef = new AtomicReference<>(null);
|
private static final AtomicReference<Impl> lspdImplRef = new AtomicReference<>(null);
|
||||||
private static final Binder heartBeatBinder = new Binder();
|
private static final Binder heartBeatBinder = new Binder();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -20,9 +20,10 @@
|
||||||
|
|
||||||
package io.github.lsposed.lspd.core;
|
package io.github.lsposed.lspd.core;
|
||||||
|
|
||||||
import io.github.lsposed.common.KeepAll;
|
import androidx.annotation.Keep;
|
||||||
|
|
||||||
public interface Proxy extends KeepAll {
|
@Keep
|
||||||
|
public interface Proxy {
|
||||||
|
|
||||||
boolean init();
|
boolean init();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -20,13 +20,14 @@
|
||||||
|
|
||||||
package io.github.lsposed.lspd.nativebridge;
|
package io.github.lsposed.lspd.nativebridge;
|
||||||
|
|
||||||
import io.github.lsposed.common.KeepAll;
|
import androidx.annotation.Keep;
|
||||||
|
|
||||||
import java.lang.reflect.Member;
|
import java.lang.reflect.Member;
|
||||||
|
|
||||||
import de.robv.android.xposed.PendingHooks;
|
import de.robv.android.xposed.PendingHooks;
|
||||||
|
|
||||||
public class ClassLinker implements KeepAll {
|
@Keep
|
||||||
|
public class ClassLinker {
|
||||||
|
|
||||||
public static native void setEntryPointsToInterpreter(Member method);
|
public static native void setEntryPointsToInterpreter(Member method);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -36,8 +36,4 @@ public abstract class BaseProxy implements Proxy {
|
||||||
public boolean init() {
|
public boolean init() {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void onBlackListed() {
|
|
||||||
XposedBridge.clearAllCallbacks();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue