Fix NPE when getting the callback cookie.

Was using the wrong method to fetch the cookie.

Test: runtest frameworks-services -c com.android.server.NetworkScoreServiceTest
Bug: 34987725
Change-Id: Iba26086e52ded98c4bf2ea5f9b5d7d6abfe88c20
This commit is contained in:
Jeremy Joslin
2017-02-06 11:14:34 -08:00
parent 391b1b82d2
commit 7890e19288

View File

@@ -927,7 +927,7 @@ public class NetworkScoreService extends INetworkScoreService.Stub {
try {
for (int i = 0; i < count; i++) {
consumer.accept(callbackList.getBroadcastItem(i),
callbackList.getRegisteredCallbackCookie(i));
callbackList.getBroadcastCookie(i));
}
} finally {
callbackList.finishBroadcast();