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

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

Merge "Include additional logging to debug shortcut restore issues" into main

parents c8b035dd 9475fb0c
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -1239,6 +1239,8 @@ public class LauncherAppsService extends SystemService {
                @NonNull final ShortcutQueryWrapper query, @NonNull final UserHandle targetUser) {
            ensureShortcutPermission(callingPackage);
            if (!canAccessProfile(targetUser.getIdentifier(), "Cannot get shortcuts")) {
                Log.e(TAG, "return empty shortcuts because callingPackage " + callingPackage
                        + " cannot access user " + targetUser.getIdentifier());
                return new ParceledListSlice<>(Collections.EMPTY_LIST);
            }

+4 −0
Original line number Diff line number Diff line
@@ -850,6 +850,8 @@ class ShortcutPackage extends ShortcutPackageItem {
            @Nullable Predicate<ShortcutInfo> filter, int cloneFlag,
            @Nullable String callingLauncher, int launcherUserId, boolean getPinnedByAnyLauncher) {
        if (getPackageInfo().isShadow()) {
            Log.d(TAG, "findAll() returned empty results because " + getPackageName()
                    + " isn't installed yet");
            // Restored and the app not installed yet, so don't return any.
            return;
        }
@@ -877,6 +879,8 @@ class ShortcutPackage extends ShortcutPackageItem {
        if (!getPinnedByAnyLauncher) {
            if (si.isFloating() && !si.isCached()) {
                if (!isPinnedByCaller) {
                    Log.d(TAG, si.getId() + " ignored because it isn't pinned by "
                            + callingLauncher);
                    return;
                }
            }
+4 −0
Original line number Diff line number Diff line
@@ -3029,6 +3029,10 @@ public class ShortcutService extends IShortcutService.Stub {
            final ShortcutUser user = getUserShortcutsLocked(userId);
            final ShortcutPackage p = user.getPackageShortcutsIfExists(packageName);
            if (p == null) {
                if (DEBUG_REBOOT) {
                    Log.d(TAG, "getShortcutsInnerLocked() returned empty results because "
                            + packageName + " isn't loaded");
                }
                return; // No need to instantiate ShortcutPackage.
            }