Do not broadcast when module path not changed (#1622)
This commit is contained in:
parent
4955dcb542
commit
4bcf7718ad
|
|
@ -705,7 +705,7 @@ public class ConfigManager {
|
||||||
updateCaches(true);
|
updateCaches(true);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return count >= 0;
|
return count > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Only be called before updating modules. No need to cache.
|
// Only be called before updating modules. No need to cache.
|
||||||
|
|
|
||||||
|
|
@ -119,18 +119,17 @@ public class LSPosedService extends ILSPosedService.Stub {
|
||||||
if (components != null && !Arrays.stream(components).reduce(false, (p, c) -> p || c.equals(moduleName), Boolean::logicalOr)) {
|
if (components != null && !Arrays.stream(components).reduce(false, (p, c) -> p || c.equals(moduleName), Boolean::logicalOr)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
broadcastAndShowNotification(moduleName, userId, intent, isXposedModule);
|
|
||||||
if (isXposedModule) {
|
if (isXposedModule) {
|
||||||
// When installing a new Xposed module, we update the apk path to mark it as a
|
// When installing a new Xposed module, we update the apk path to mark it as a
|
||||||
// module to send a broadcast when modules that have not been activated are
|
// module to send a broadcast when modules that have not been activated are
|
||||||
// uninstalled.
|
// uninstalled.
|
||||||
ConfigManager.getInstance().updateModuleApkPath(moduleName, ConfigManager.getInstance().getModuleApkPath(applicationInfo), true);
|
// If cache not updated, assume it's not xposed module
|
||||||
// when package is changed, we may need to update cache (module cache or process cache)
|
isXposedModule = ConfigManager.getInstance().updateModuleApkPath(moduleName, ConfigManager.getInstance().getModuleApkPath(applicationInfo), false);
|
||||||
ConfigManager.getInstance().updateCache();
|
|
||||||
} else if (ConfigManager.getInstance().isUidHooked(uid)) {
|
} else if (ConfigManager.getInstance().isUidHooked(uid)) {
|
||||||
// it will automatically remove obsolete app from database
|
// it will automatically remove obsolete app from database
|
||||||
ConfigManager.getInstance().updateAppCache();
|
ConfigManager.getInstance().updateAppCache();
|
||||||
}
|
}
|
||||||
|
broadcastAndShowNotification(moduleName, userId, intent, isXposedModule);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case Intent.ACTION_UID_REMOVED: {
|
case Intent.ACTION_UID_REMOVED: {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue