Merge "Remove unnecessary invokation on AppSearch" into sc-dev am: 4546fb3eb4
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14021435 Change-Id: I9513bb4afb58093382c8b06cc6178d3db143e6fb
This commit is contained in:
@@ -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<>();
|
||||
|
||||
Reference in New Issue
Block a user