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
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user