Always send all available state when calling onAvailable().
The state that needs to be transferred includes:
- NetworkCapabilities
- LinkProperties
- whether the network is currently suspended
Additionally:
- Rename notifyNetworkCallback() to notifyNetworkAvailable()
in order to clarify its real function.
- fix previous copy/paste error in unittest
Test: as follows
- built (bullhead)
- flashed
- booted
- runtest frameworks-net passes
- USB tethering with mobile and Wi-Fi upstream toggling
Bug: 32163131
Change-Id: Ib4460bcd5d08863a9feac9e8ab41a238897bb3ea
This commit is contained in:
parent
1d6742c945
commit
99f301bdfd
1 changed files with 33 additions and 19 deletions
|
|
@ -1061,6 +1061,8 @@ public class ConnectivityManager {
|
|||
* registerNetworkCallback() are not specific to any particular Network so
|
||||
* do not cause any updates.
|
||||
*
|
||||
* TODO: Delete once callers are updated.
|
||||
*
|
||||
* @hide
|
||||
*/
|
||||
public void requestLinkProperties(NetworkCallback networkCallback) {
|
||||
|
|
@ -1098,6 +1100,8 @@ public class ConnectivityManager {
|
|||
* registerNetworkCallback() are not specific to any particular Network so
|
||||
* do not cause any updates.
|
||||
*
|
||||
* TODO: Delete once callers are updated.
|
||||
*
|
||||
* @hide
|
||||
*/
|
||||
public void requestNetworkCapabilities(NetworkCallback networkCallback) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue