android_packages_modules_Co.../Tethering/src
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Hungming Chen fc52868213 Tethering: ignore duplicate upstream changed event
Different network objects with the same network ID should be
treated as the same network.

chooseUpstreamType compares the current upstream and new upstream
by object (comparison operator) instead of network id
(Network#equals). This implies that different objects with the
same network id still trigger upstream changed report.

Since this commit, reportUpstreamChanged is only called when upsteam
has really changed (connected, switched or disconnected) in
chooseUpstreamType. In previous code, reportUpstreamChanged is also
called if EVENT_ON_CAPABILITIES is called when the upstream is the
same but its capabilities changed.

The NotificationUpdater#onUpstreamCapabilitiesChanged method only
needs to be called by chooseUpstreamType when it chooses a new
upstream. If the upstream remains the same but its capabilities
change, the EVENT_ON_CAPABILITIES will call
onUpstreamCapabilitiesChanged.

Bug: 243516306
Test: atest TetheringTest
Change-Id: I009383a61a5fabd249ba78fcffd524a5bbe4602e
2023-06-19 06:51:03 +00:00
..
android/net Support SAP and LOHS enabled at the same time 2023-05-25 08:31:33 +00:00
com/android/networkstack/tethering Tethering: ignore duplicate upstream changed event 2023-06-19 06:51:03 +00:00