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

Commit 86f01c4c authored by Andrey Epin's avatar Andrey Epin
Browse files

Fix SmartspaceService callback comparison.

We should use binder references when comparing two IPC callbacks.

Test: Inject a test code into LocscreenSmartspaceController#reloadSmartspace() that register and unregister a test smartspace listener. Verify that the listeners is
get invoked without the fix and is not get invoked with the fix.
Change-Id: I3229c6496cde43ba1df65412857eb36b47b525c4
parent 027b3b37
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -302,7 +302,7 @@ public abstract class SmartspaceService extends Service {
                Slog.e(TAG, "Callback is null, likely the binder has died.");
                return false;
            }
            return mCallback.equals(callback);
            return mCallback.asBinder().equals(callback.asBinder());
        }

        @Override