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

Commit ea262442 authored by Mady Mellor's avatar Mady Mellor
Browse files

Add way to remove shortcut changed callbacks to shortcut service

Flag: EXEMPT bugfix
Test: none
Bug: 330507887
Change-Id: I3c0d26774cd68e131f3d2f06d6bb0675c68f39c1
parent 0356921e
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -91,6 +91,9 @@ public abstract class ShortcutServiceInternal {
    public abstract void addShortcutChangeCallback(
            @NonNull LauncherApps.ShortcutChangeCallback callback);

    public abstract void removeShortcutChangeCallback(
            @NonNull LauncherApps.ShortcutChangeCallback callback);

    public abstract int getShortcutIconResId(int launcherUserId, @NonNull String callingPackage,
            @NonNull String packageName, @NonNull String shortcutId, int userId);

+8 −0
Original line number Diff line number Diff line
@@ -3442,6 +3442,14 @@ public class ShortcutService extends IShortcutService.Stub {
            }
        }

        @Override
        public void removeShortcutChangeCallback(
                @NonNull LauncherApps.ShortcutChangeCallback callback) {
            synchronized (mServiceLock) {
                mShortcutChangeCallbacks.remove(Objects.requireNonNull(callback));
            }
        }

        @Override
        public int getShortcutIconResId(int launcherUserId, @NonNull String callingPackage,
                @NonNull String packageName, @NonNull String shortcutId, int userId) {