Exposed implementation info
This commit is contained in:
parent
7b4c10da07
commit
d1a80d142c
|
|
@ -3,6 +3,8 @@ package io.github.libxposed;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.ContextWrapper;
|
import android.content.ContextWrapper;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
|
||||||
public class XposedContextWrapper extends ContextWrapper implements XposedInterface {
|
public class XposedContextWrapper extends ContextWrapper implements XposedInterface {
|
||||||
|
|
||||||
XposedContextWrapper(XposedContext base) {
|
XposedContextWrapper(XposedContext base) {
|
||||||
|
|
@ -23,6 +25,23 @@ public class XposedContextWrapper extends ContextWrapper implements XposedInterf
|
||||||
getBaseContext().hook();
|
getBaseContext().hook();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@NonNull
|
||||||
|
@Override
|
||||||
|
public String implementationName() {
|
||||||
|
return getBaseContext().implementationVersion();
|
||||||
|
}
|
||||||
|
|
||||||
|
@NonNull
|
||||||
|
@Override
|
||||||
|
public String implementationVersion() {
|
||||||
|
return getBaseContext().implementationVersion();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public long implementationVersionCode() {
|
||||||
|
return getBaseContext().implementationVersionCode();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
final public void log(String message) {
|
final public void log(String message) {
|
||||||
getBaseContext().log(message);
|
getBaseContext().log(message);
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,17 @@
|
||||||
package io.github.libxposed;
|
package io.github.libxposed;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
|
||||||
public interface XposedInterface {
|
public interface XposedInterface {
|
||||||
|
|
||||||
|
long API_VERSION = 100;
|
||||||
|
|
||||||
void hook();
|
void hook();
|
||||||
|
|
||||||
|
@NonNull String implementationName();
|
||||||
|
@NonNull String implementationVersion();
|
||||||
|
long implementationVersionCode();
|
||||||
|
|
||||||
void log(String message);
|
void log(String message);
|
||||||
void log(String message, Throwable throwable);
|
void log(String message, Throwable throwable);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -40,9 +40,7 @@ import org.lsposed.lspd.util.LspModuleClassLoader;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.FileInputStream;
|
import java.io.FileInputStream;
|
||||||
import java.io.FileNotFoundException;
|
|
||||||
import java.io.FileOutputStream;
|
import java.io.FileOutputStream;
|
||||||
import java.io.IOException;
|
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
@ -279,12 +277,12 @@ public class LSPosedContext extends XposedContext {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public FileInputStream openFileInput(String name) throws FileNotFoundException {
|
public FileInputStream openFileInput(String name) {
|
||||||
throw new AbstractMethodError();
|
throw new AbstractMethodError();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public FileOutputStream openFileOutput(String name, int mode) throws FileNotFoundException {
|
public FileOutputStream openFileOutput(String name, int mode) {
|
||||||
throw new AbstractMethodError();
|
throw new AbstractMethodError();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -421,17 +419,17 @@ public class LSPosedContext extends XposedContext {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setWallpaper(Bitmap bitmap) throws IOException {
|
public void setWallpaper(Bitmap bitmap) {
|
||||||
throw new AbstractMethodError();
|
throw new AbstractMethodError();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setWallpaper(InputStream data) throws IOException {
|
public void setWallpaper(InputStream data) {
|
||||||
throw new AbstractMethodError();
|
throw new AbstractMethodError();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void clearWallpaper() throws IOException {
|
public void clearWallpaper() {
|
||||||
throw new AbstractMethodError();
|
throw new AbstractMethodError();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -456,12 +454,12 @@ public class LSPosedContext extends XposedContext {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void startIntentSender(IntentSender intent, @Nullable Intent fillInIntent, int flagsMask, int flagsValues, int extraFlags) throws IntentSender.SendIntentException {
|
public void startIntentSender(IntentSender intent, @Nullable Intent fillInIntent, int flagsMask, int flagsValues, int extraFlags) {
|
||||||
throw new AbstractMethodError();
|
throw new AbstractMethodError();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void startIntentSender(IntentSender intent, @Nullable Intent fillInIntent, int flagsMask, int flagsValues, int extraFlags, @Nullable Bundle options) throws IntentSender.SendIntentException {
|
public void startIntentSender(IntentSender intent, @Nullable Intent fillInIntent, int flagsMask, int flagsValues, int extraFlags, @Nullable Bundle options) {
|
||||||
throw new AbstractMethodError();
|
throw new AbstractMethodError();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -693,12 +691,12 @@ public class LSPosedContext extends XposedContext {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Context createPackageContext(String packageName, int flags) throws PackageManager.NameNotFoundException {
|
public Context createPackageContext(String packageName, int flags) {
|
||||||
throw new AbstractMethodError();
|
throw new AbstractMethodError();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Context createContextForSplit(String splitName) throws PackageManager.NameNotFoundException {
|
public Context createContextForSplit(String splitName) {
|
||||||
throw new AbstractMethodError();
|
throw new AbstractMethodError();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -727,6 +725,23 @@ public class LSPosedContext extends XposedContext {
|
||||||
throw new AbstractMethodError();
|
throw new AbstractMethodError();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@NonNull
|
||||||
|
@Override
|
||||||
|
public String implementationName() {
|
||||||
|
return "LSPosed";
|
||||||
|
}
|
||||||
|
|
||||||
|
@NonNull
|
||||||
|
@Override
|
||||||
|
public String implementationVersion() {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public long implementationVersionCode() {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void log(String message) {
|
public void log(String message) {
|
||||||
Log.i(TAG, mPackageName + ": " + message);
|
Log.i(TAG, mPackageName + ": " + message);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue