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

Skip to content
Commit 9890fcdc authored by Remi NGUYEN VAN's avatar Remi NGUYEN VAN
Browse files

Get link state with same lock as LinkProperties

The previous IpClientLinkObserver code could in theory call
mCallback.update with a linkState that came from another update; for
example:
 1. onInterfaceAddressUpdated
   - mLinkProperties.addLinkAddress
 2. onInterfaceLinkStateChanged
   - setInterfaceLinkState(false)
 1. mCallback.update(false) <- should be true ?
 2. mCallback.update(false)

In practice this would not happen because the onFoo methods are all
called in order (same binder token from netd), but IpClientLinkObserver
should not need to make such assumptions.

Bug: 151796056
Test: atest NetworkStackIntegrationTests (see also test-only change)
Change-Id: I60f5a319519069070eb5a07643686bf5ec937665
parent 750fe188
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment