Currently, in NetworkStats, there are many methods to manipulate
the records. However, some methods are similar and ambiguous,
such as addEntry, addValues, setValues, addIfaceValues,
combineValues and combineAllValues.
Thus, properly grouping and renaming methods are necessary.
In this change, for methods that add one record unconditionally,
name them insertEntry.
setIfaceValues -> insertEntry
addEntry -> insertEntry
Test: atest FrameworksNetTests ImsPhoneCallTrackerTest TetheringTests
Test: m doc-comment-check-docs
Bug: 148895143
Change-Id: I801ddc49e283a254b9586700c9b597c0adb0d459
This change add several javadoc for NetworkStats and its Entry
class. Also remove IFACE_ALL constant accordlingly.
Test: atest FrameworkNetTests
Test: m doc-comment-check-docs
Bug: 148895143
Change-Id: Id1b8f41be79f847ad73197ff0e18258b6ee8a730
am skip reason: Change-Id If256ed4437ddcbcc72a6f766cff2f4cc512ee3f7 with SHA-1 1ff5f65f5b is in history
Change-Id: I9d5b81e4cd85c56db1143c508fe4da314d29d178
am skip reason: Change-Id If256ed4437ddcbcc72a6f766cff2f4cc512ee3f7 with SHA-1 1ff5f65f5b is in history
Change-Id: Ie664fbef5d0e7b6754c400ff73c5a78485ee4a63
am skip reason: Change-Id If256ed4437ddcbcc72a6f766cff2f4cc512ee3f7 with SHA-1 1ff5f65f5b is in history
Change-Id: Ie58da93cd3a7876d8dc56bbcff90bcfd0a38c9d3
This change makes IPsec tunnel interfaces automatically get brought up
once they are created. Originally this was considered to be an
additional safety check, as they would not be start routing traffic
until explicitly brought up. However, in the intervening time, the
NetworkManagementController now requires the NETWORK_STACK permission to
set an interface as up. Additionally, that call is a hidden API, and
thus not usable for use cases such as IWLAN.
Bug: 149348618
Test: FrameworksNetTests, CtsNetTestCases passing.
Change-Id: I55b63a748463a388e1e2991d2d5d6b3023545e60
IPsec resource counts were selected to be conservative, due to unknowns
about device capabilities. Since then, it appears that we no longer need
such stringent quotas, and this can be relaxed.
Test: FrameworksNetTest passing
Change-Id: Id53d14e5698e5fcc410868424176b00350c7ae79
am skip reason: Change-Id I2af74cbcfa642f05f5e7bf85b2a8e8c38595f6ca with SHA-1 11f3924f18 is in history
Change-Id: Idaaaa1dbbad6e616a852253e1ace463385b3b24e
The method requires NETWORK_STACK or MAINLINE_NETWORK_STACK permissions,
but the annotation was missing.
Test: m
Fixes: 150877670
Merged-In: I2af74cbcfa642f05f5e7bf85b2a8e8c38595f6ca
(cherry picked from commit e45d3ff849695977cb063cc59550c505b220bd6c)
Change-Id: Ia215b74df99ae60be2e380917be68a272d658ef4
am skip reason: Change-Id I7c5127e96d80d077735010d2e62c7227805ccb10 with SHA-1 c8e7d759be is in history
Change-Id: I8c338aedd21b50b412d600d165c1d0f63453d52a
=====
Remove the need of accessing handler in NSS unit test
Currently, to wait for handler becomes idle, specific message
is used and the test would wait for condition variable to be
open when the message is processed.
However, this is already done in the HandlerUtils. Thus,
there is no need to post such message manually in the handler.
Test: atest FrameworksNetTests
Bug: 150664039
Change-Id: Iab32b2dbab01634ca159dcb90fc9f929d1fed1a2
=====
Remove setHandler in NetworkStatsService
Currently, internal handler is set by setHandler after
constructing NSS object. This was introduced in ag/866187 to
access the handler in the unit test.
However, the design put NSS in a bad situation where all classes
that need handler or executor could not be final and need to be
dynamically allocated in order to get a valid handler.
Thus, since the usage of handler is removed in previous patch,
this change eliminate setHandler by initializing the handler in
the constructor.
Test: atest FrameworksNetTests
Bug: 150664039
Change-Id: I794a24d00b0ca9fdc78091e7b9ab7307e0f034b7
=====
Bug: 150664039
Change-Id: If256ed4437ddcbcc72a6f766cff2f4cc512ee3f7
Merged-In: If256ed4437ddcbcc72a6f766cff2f4cc512ee3f7
(cherry picked from commit 2a6439d7e2a3926e10a0b9a4dc730b1a022d8138)
The method requires NETWORK_STACK or MAINLINE_NETWORK_STACK permissions,
but the annotation was missing.
Test: m
Fixes: 150877670
Change-Id: I2af74cbcfa642f05f5e7bf85b2a8e8c38595f6ca
This change fix two things:
1. Handle ethernet callback in internal thread to avoid crash. IpServer
should be created from tethering thread, otherwise mIpNeighborMonitor of
IpServer would throw
IllegalStateException("start() called from off-thread")
2. Ethernet tethering request may be duplicated if multiple
startTethering is called but no stopTethering
Bug: 130840861
Bug: 148824036
Test: ON/OFF ethernet tehtering manually
atest TetheringTests
Change-Id: Ibd3ea6bc6751bd65647ff381f9b0124bc3395c09
Merged-In: I7c5127e96d80d077735010d2e62c7227805ccb10
Merged-In: Ibd3ea6bc6751bd65647ff381f9b0124bc3395c09
(cherry picked from commit 72702b979654234c18045f04270040056a74cf90)
Currently, internal handler is set by setHandler after
constructing NSS object. This was introduced in ag/866187 to
access the handler in the unit test.
However, the design put NSS in a bad situation where all classes
that need handler or executor could not be final and need to be
dynamically allocated in order to get a valid handler.
Thus, since the usage of handler is removed in previous patch,
this change eliminate setHandler by initializing the handler in
the constructor.
Test: atest FrameworksNetTests
Bug: 150664039
Change-Id: I794a24d00b0ca9fdc78091e7b9ab7307e0f034b7
am skip reason: Change-Id I6118b313ce668707d598aa2eab9baee2f7622dbc with SHA-1 1970749b57 is in history
Change-Id: I678c69314756955e3b6182ab6b25ba7395bedd97
DnsSdTxtRecord is moved to frameworks/libs/net for mainline
support. Also change the import path using this class.
Bug: 139268426
Bug: 135998869
Test: atest FrameworksNetTests
./frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Change-Id: I6118b313ce668707d598aa2eab9baee2f7622dbc
Merged-In: I6118b313ce668707d598aa2eab9baee2f7622dbc