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

Commit c0c34322 authored by Etan Cohen's avatar Etan Cohen Committed by Lorenzo Colitti
Browse files

[CM] Fix NPE due to unvalidated callback value

Fix flaky test resulting from the above fix.

Bug: 132950880
Fix: 133457081
Test: atest ConnectivityServiceTest
Merged-In: Ia2cc04b42288ea987483e5ab0e0a10093dc49502
Change-Id: Ia2cc04b42288ea987483e5ab0e0a10093dc49502
(cherry picked from commit 9869b47c)
parent cf06ade1
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -3864,6 +3864,7 @@ public class ConnectivityServiceTest {
            }
        }

        testFactory.expectRemoveRequests(1);
        if (preUnregister) {
            mCm.unregisterNetworkCallback(networkCallback);

@@ -3873,7 +3874,6 @@ public class ConnectivityServiceTest {
            testFactory.triggerUnfulfillable(requests.get(newRequestId));
        } else {
            // Simulate the factory releasing the request as unfulfillable and expect onUnavailable!
            testFactory.expectRemoveRequests(1);
            testFactory.triggerUnfulfillable(requests.get(newRequestId));

            networkCallback.expectCallback(CallbackState.UNAVAILABLE, null);