Only send callbacks when overridden
Most users of NetworkCallback do not override all methods, so callbacks
from ConnectivityService end up being unused by the app.
To save resources, check which callback methods are overridden in
ConnectivityManager, and inform ConnectivityService so it can skip
preparing and sending the corresponding binder calls when the callback
is not used by the app.
This is flagged off by default.
Test: flag enabled: atest CtsNetTestCases ConnectivityCoverageTests
Bug: 327038794
Bug: 279392981
Change-Id: Iaf490f416fb6e1437d40497fba1a40a899a9f523
7 files changed