Skip to content

Commit c9a18cb

Browse files
committed
Fix process name compatibility with legacy modules
CorePath check both of them before injecting. Moreover, we fix a compilation waring of null string.
1 parent 4cf6d56 commit c9a18cb

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

legacy/src/main/java/org/matrix/vector/legacy/LegacyDelegateImpl.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,9 @@ public void onSystemServerLoaded(ClassLoader classLoader) {
5454
XposedInit.loadedPackagesInProcess.add("android");
5555
XC_LoadPackage.LoadPackageParam lpparam = new XC_LoadPackage.LoadPackageParam(XposedBridge.sLoadedPackageCallbacks);
5656
lpparam.packageName = "android";
57-
lpparam.processName = "system_server";
57+
// For comptibility, we set the process name of `system_server` as `android`.
58+
// https://github.com/rovo89/XposedBridge/blob/art/app/src/main/java/de/robv/android/xposed/XposedInit.java
59+
lpparam.processName = "android";
5860
lpparam.classLoader = classLoader;
5961
lpparam.isFirstApplication = true;
6062
XC_LoadPackage.callAll(lpparam);

xposed/src/main/kotlin/org/matrix/vector/impl/hookers/LoadedApkHookers.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ private object PackageContextHelper {
5757
packageName = "system"
5858
}
5959

60-
return ContextInfo(packageName!!, processName!!, isFirstPackage)
60+
return ContextInfo(packageName, processName, isFirstPackage)
6161
}
6262
}
6363

0 commit comments

Comments
 (0)