Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1a7c1a97 authored by Yurii Zubrytskyi's avatar Yurii Zubrytskyi
Browse files

[res] Keep shared libraries when registering lib paths

When applications use their own workarounds and add
WebView paths to the application info object, the code that
filters out the common system overlays accidentally also
filters out the hacked WebView paths as well.

This CL skips the shared library paths from the duplicates
filtering, as those can't have common overlays in them anyway

Bug: 407448721
Test: manual, klook launches after the fix
Flag: EXEMPT bugfix

Change-Id: I3b284e29f8d1ba32f932e1135f20998c03706aa1
parent 947520ab
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -1985,7 +1985,9 @@ public class ResourcesManager {
            // its own ApplicationInfo.
            final var collector = new PathCollector(null);
            // Pre-populate the collector's sets with the base app paths so they all get filtered
            // out if they exist in the info that's being registered as well.
            // out if they exist in the info that's being registered as well. Ignore the linked
            // shared libraries though, as those are commonly altered by the apps to make the system
            // load the same library that's being registered here.
            // Note: if someone is registering their own appInfo, we can't filter out anything
            // here and this means any asset path changes are going to be ignored.
            if (baseAppInfo != null && !baseAppInfo.sourceDir.equals(appInfo.sourceDir)) {
@@ -1993,9 +1995,7 @@ public class ResourcesManager {
                if (baseAppInfo.splitSourceDirs != null) {
                    collector.libsSet.addAll(Arrays.asList(baseAppInfo.splitSourceDirs));
                }
                if (baseAppInfo.sharedLibraryFiles != null) {
                    collector.libsSet.addAll(Arrays.asList(baseAppInfo.sharedLibraryFiles));
                }
                // Skipped |baseAppInfo.sharedLibraryFiles| intentionally.
                if (baseAppInfo.resourceDirs != null) {
                    collector.overlaysSet.addAll(Arrays.asList(baseAppInfo.resourceDirs));
                }