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

Commit 6ae81730 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Fix the issue pinned shortcuts went missing after reboot" into tm-dev...

Merge "Fix the issue pinned shortcuts went missing after reboot" into tm-dev am: b2aad08e am: a73badef am: 1eaa0afe

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18701697



Change-Id: I2cd5223180ad7f077976d29c1d215e9fbd213519
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 6fbdcf32 1eaa0afe
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -706,7 +706,7 @@ class ShortcutPackage extends ShortcutPackageItem {
            }
            pinnedShortcuts.addAll(pinned);
        });
        // Then, update the pinned state if necessary.
        // Secondly, update the pinned state if necessary.
        final List<ShortcutInfo> pinned = findAll(pinnedShortcuts);
        if (pinned != null) {
            pinned.forEach(si -> {
@@ -720,6 +720,8 @@ class ShortcutPackage extends ShortcutPackageItem {
                si.clearFlags(ShortcutInfo.FLAG_PINNED);
            }
        });
        // Then, schedule a background job to persist the pinned states.
        mShortcutUser.forAllLaunchers(ShortcutPackageItem::scheduleSave);

        // Lastly, remove the ones that are no longer pinned, cached nor dynamic.
        removeOrphans();