libxposed: Adapt some of API 101 required by gkms-localify

This commit is contained in:
WeiguangTWK 2026-04-02 20:23:16 +08:00
parent 496b76fa3e
commit ec7cb26aa2
2 changed files with 21 additions and 1 deletions

View File

@ -2,7 +2,12 @@ package io.github.libxposed.service;
import io.github.libxposed.service.IXposedScopeCallback;
interface IXposedService {
const int API = 100;
const int LIB_API = 101;
const int API = LIB_API; // compatibility alias
const long PROP_CAP_SYSTEM = 1L;
const long PROP_CAP_REMOTE = 1L << 1;
const long PROP_RT_API_PROTECTION = 1L << 2;
const int FRAMEWORK_PRIVILEGE_ROOT = 0;
const int FRAMEWORK_PRIVILEGE_CONTAINER = 1;
@ -18,6 +23,7 @@ interface IXposedService {
String getFrameworkVersion() = 3;
long getFrameworkVersionCode() = 4;
int getFrameworkPrivilege() = 5;
long getFrameworkProperties() = 6;
// scope utilities
List<String> getScope() = 10;

View File

@ -201,6 +201,20 @@ public final class XposedService {
}
}
/**
* Get the Xposed framework properties of current implementation.
*
* @return Framework properties bitmask
* @throws ServiceException If the service is dead or an error occurred
*/
public long getFrameworkProperties() {
try {
return mService.getFrameworkProperties();
} catch (RemoteException e) {
throw new ServiceException(e);
}
}
/**
* Get the Xposed framework privilege of current implementation.
*