This patch disentangles the creation of NativeDaemonConnector from the
creation of NsdService by introducing a wrapper type DaemonConnection.
This allows to mock this dependency in unit tests.
Test: enhanced previously introduced new tests.
Bug: 37013369, 33298084
Change-Id: I894b7cddfc509f86d0134d214c88c063b81b5e0a
Due to multi-branch automerging issue, TRANSPORT_NAMES got inserted
twice into NetworkCapabilities both by commits 45670bb37d and
21665ac809. This patch deletes one of the copy.
Test: no functionality change. Build is fixed.
Change-Id: I2adec1a9cb1ee6f1d61dfeec2d0b92b8141eed88
Update docs based on what new lint detector found. Add new @IntDef
to parameters or methods returning constants or flags, and add
@RequiresPermission to methods mentioning permissions.
Test: make -j32 offline-sdk-docs
Bug: 37526420
Change-Id: I7f640f7883fcb66b911a52ae93b83f77306571ec
This patch extracts into BitUtils byte manipulation helper methods
and unsigned type manipulation helper methods from ApfFilter into
an independent and reusable structure.
Test: $ runtest frameworks-net
Change-Id: I0f33af10457a63dbde5983f14353a79b8cd877d9
This patch is a partial cherry-pick from commit
cf83a3f4da for the BitUtils and
NetworkCapabilities classes.
Bug: 34901696
Test: none
(cherry picked from commit cf83a3f4da)
Merged-In: Id04f9080e7f75608deeb49306aec34941e71794c
Change-Id: I64eae49f646365b7cd1683a689315fe03bf0bdd9
If anything unrestricted is bundled in the whole thing has to be
unrestricted (we can't restrict based on destination or intent)
but the NOT_METERED flag wasn't taken into account.
This wasn't a problem before because telephony set that statically
and late, but a change caused it to be marked NOT_METERED earlier
which exposed this bug.
bug: 37208956
Merged-In: I7b7a1c38621ce0ecde8cf041e82b1ebb7a9c6f15
Test: new NetworkCapabilitiesTest. Fails without fix, works with.
Change-Id: I86c1b2854413a94662aa53e697d32380695ab9ac
Wifi Aware networks are per app - i.e. a requestor gets
a dedicated network. Change verifies that the only the
original requestor matches the created network (using UID).
Bug: 36053921
Test: Integration (sl4a) tests
Change-Id: I4ff3994731dd7ccb88e2bea333d1e6905b136f02
This patch cleanups conversion of boolean values to ints when reading
configuration values or sending Messages whose arg1 or arg2 has boolean
semantics.
Test: runtest frameworks-net
Change-Id: I5187d17cd746486f63b1c410d191c30edd93ff6f
This patch moves reportNetworkConnectivity onto the handler of
ConnectivityService.
This allows:
- to inspect NetworkAgentInfo on the ConnectivityService handler,
which is always more correct than doing so on a Binder thread.
- to improve locking policies around NetworkAgentInfo.
Test: $ runtest frameworks-net
Bug: 37119619, 36902662
Change-Id: I49a765826e65c29a1995242290e5e7544112c94e
This prepares some refactoring and the addition of a timeout to
resolveService.
Test: new tests pass
Bug: 37013369, 33298084
Change-Id: Ie8277bd5983278507bfa70495b4ce7d13895b24b
And also remove some small code duplication (checkNotNull).
Test: built, flashed, runtest frameworks-net
Change-Id: Id6c13bca9d12f70b88806032e0a4fa198efbedc6
Symptom:
AppOps verified the incorrect package of calling tether state
changing API.
It threw SecurityException by mistake.
Solution:
Pass the correct package name to enforceTetherChangePermission.
Bug: 32931147
Change-Id: Ia1167f26f556678b189a24a4a716f1a7e5cb12eb
If anything unrestricted is bundled in the whole thing has to be
unrestricted (we can't restrict based on destination or intent)
but the NOT_METERED flag wasn't taken into account.
This wasn't a problem before because telephony set that statically
and late, but a change caused it to be marked NOT_METERED earlier
which exposed this bug.
bug: 37208956
Test: new NetworkCapabilitiesTest. Fails without fix, works with.
Change-Id: I7b7a1c38621ce0ecde8cf041e82b1ebb7a9c6f15