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

Commit 4546fb3e authored by Pinyao Ting's avatar Pinyao Ting Committed by Android (Google) Code Review
Browse files

Merge "Remove unnecessary invokation on AppSearch" into sc-dev

parents 42f58922 06445c2d
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -2187,6 +2187,10 @@ class ShortcutPackage extends ShortcutPackageItem {

    private void saveShortcut(@NonNull final Collection<ShortcutInfo> shortcuts) {
        Objects.requireNonNull(shortcuts);
        if (shortcuts.isEmpty()) {
            // No need to invoke AppSearch when there's nothing to save.
            return;
        }
        ConcurrentUtils.waitForFutureNoInterrupt(
                runInAppSearch(session -> {
                    final AndroidFuture<Boolean> future = new AndroidFuture<>();