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

Commit 2966eb20 authored by Rohit Goyal's avatar Rohit Goyal Committed by Android (Google) Code Review
Browse files

Merge "Bugfix: Allow shortcut and widget services to update shortcuts and...

Merge "Bugfix: Allow shortcut and widget services to update shortcuts and widgets across all launchers during archival." into main
parents 53c657f7 c3ba6cb0
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -476,8 +476,12 @@ class AppWidgetServiceImpl extends IAppWidgetService.Stub implements WidgetBacku
            } else {
                // If the package is being updated, we'll receive a PACKAGE_ADDED
                // shortly, otherwise it is removed permanently.
                final boolean packageRemovedPermanently = (extras == null
                        || !extras.getBoolean(Intent.EXTRA_REPLACING, false));
                boolean isReplacing = extras != null && extras.getBoolean(Intent.EXTRA_REPLACING,
                        false);
                boolean isArchival = extras != null && extras.getBoolean(Intent.EXTRA_ARCHIVAL,
                        false);
                final boolean packageRemovedPermanently =
                        (extras == null || !isReplacing || (isReplacing && isArchival));

                if (packageRemovedPermanently) {
                    for (String pkgName : pkgList) {
+2 −1
Original line number Diff line number Diff line
@@ -3795,6 +3795,7 @@ public class ShortcutService extends IShortcutService.Stub {
                }

                final boolean replacing = intent.getBooleanExtra(Intent.EXTRA_REPLACING, false);
                final boolean archival = intent.getBooleanExtra(Intent.EXTRA_ARCHIVAL, false);

                switch (action) {
                    case Intent.ACTION_PACKAGE_ADDED:
@@ -3805,7 +3806,7 @@ public class ShortcutService extends IShortcutService.Stub {
                        }
                        break;
                    case Intent.ACTION_PACKAGE_REMOVED:
                        if (!replacing) {
                        if (!replacing || (replacing && archival)) {
                            handlePackageRemoved(packageName, userId);
                        }
                        break;