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

Commit 5a8b62b3 authored by Jon Miranda's avatar Jon Miranda
Browse files

Avoid sending FirstScreenBroadcast if there is nothing to send.

Bug: 216389279
Test: manual
Change-Id: I1c30f02cbb287c25a140cb4801d6b66b07cec3a7
parent bce63e06
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -135,6 +135,13 @@ public class FirstScreenBroadcast {
            printList(installerPackageName, "Widget item", widgetItems);
        }

        if (folderItems.isEmpty()
                && workspaceItems.isEmpty()
                && hotseatItems.isEmpty()
                && widgetItems.isEmpty()) {
            // Avoid sending broadcast if there is nothing to send.
            return;
        }
        context.sendBroadcast(new Intent(ACTION_FIRST_SCREEN_ACTIVE_INSTALLS)
                .setPackage(installerPackageName)
                .putStringArrayListExtra(FOLDER_ITEM_EXTRA, new ArrayList<>(folderItems))