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

Commit c55054aa authored by Willie Koomson's avatar Willie Koomson Committed by Android (Google) Code Review
Browse files

Revert "Save ShortcutUser before rewriting ShortcutPackageItems"

This reverts commit 0c4c18ff.

Reason for revert: multiple perf regressions

Bug: 417712196
Change-Id: I6b279545566190aed1b3a3fd41420d10bab9ee39
parent 0c4c18ff
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1107,13 +1107,13 @@ public class ShortcutService extends IShortcutService.Stub {
                }

                synchronized (mServiceLock) {
                    saveUserInternalLocked(userId, os, /* forBackup= */ false);
                    // Since we are not handling package deletion yet, or any single package
                    // changes, just clean the directory and rewrite all the ShortcutPackageItems.
                    final File root = injectUserDataPath(userId);
                    FileUtils.deleteContents(new File(root, DIRECTORY_PACKAGES));
                    FileUtils.deleteContents(new File(root, DIRECTORY_LAUNCHERS));
                    os = file.startWrite();
                    saveUserInternalLocked(userId, os, /* forBackup= */ false);
                    getUserShortcutsLocked(userId).scheduleSaveAllLaunchersAndPackages();
                }