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

Commit 50a3c1b9 authored by Ryan Mitchell's avatar Ryan Mitchell
Browse files

Always update overlay paths of newly added apps

When a package is updated, its overlays must always be initialized.
A package may be affected by framework overlays or overlays of shared
libraries it uses. The overlay paths must always be initialized in
package manager.

To work around this issue, rebooting the device always initializes
overlay paths for all installed applications.

Bug: 180416025
Bug: 180016597
Test: OverlayManagerTests
Change-Id: I1bf0d460336ee757bb191adaaeec0089911fa182
parent d145f376
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -244,7 +244,11 @@ final class OverlayManagerServiceImpl {
    @NonNull
    Set<PackageAndUser> onPackageAdded(@NonNull final String pkgName,
            final int userId) throws OperationFailedException {
        return reconcileSettingsForPackage(pkgName, userId, 0 /* flags */);
        final Set<PackageAndUser> updatedTargets = new ArraySet<>();
        // Always update the overlays of newly added packages.
        updatedTargets.add(new PackageAndUser(pkgName, userId));
        updatedTargets.addAll(reconcileSettingsForPackage(pkgName, userId, 0 /* flags */));
        return updatedTargets;
    }

    @NonNull