Tests various combinations of empty / non-empty NetworkSpecifiers
and changing specifiers on the fly.
Test: ConnectivityServiceTest passes
Bug: 27533960
Change-Id: Ibd6b4efc861dc51689e46f3882ba859223411bf0
This patch simplifies wakelock management by acknowledging that only one
acquisition at most is in flight at any time. This allows to remove the
serial number associated with wakelock acquisition and to avoid double
release when regaining a default network.
Example of $ adb shell dumpsys connectivity logs:
NetTransition WakeLock activity (most recent first):
03-31 00:15:13.816 - RELEASE (EVENT_CLEAR_NET_TRANSITION_WAKELOCK)
03-31 00:14:59.216 - ACQUIRE for NetworkAgentInfo [WIFI () - 101]
03-31 00:09:05.799 - RELEASE (EVENT_EXPIRE_NET_TRANSITION_WAKELOCK)
03-31 00:08:05.738 - ACQUIRE for NetworkAgentInfo [WIFI () - 100]
Test: watched wakelock section $ adb shell dumpsys connectivity while
turning on and off Wifi (with no other network).
Bug: 36703718
Change-Id: I899b0816c0e41b3991d9540e9b9a604914ff673a
Expose both duration and maximum extended advertising events to limit
advertising time.
Test: manual
Bug: 30622771
Change-Id: I44df300995ef985526b93f8c24389775720b3432
This patch adds some additional error checking for the advertising set
parameters, and some more comments.
Test: manual
Bug: 30622771
Change-Id: I87bd44f4179ef63694ad3ed656dc2acc52e40f1e
-Plumb IpSecManager APIs to NetD
-Add Resource Management to IpSecService
Bug: 33695893
Test: CTS verifies nearly all of these paths
Change-Id: Ic43965c6158f28cac53810adbf5cf50d2c54f920
-Remove Int-based SPI usage from the IpSecTransform.Builder
This is essentially a less-safe method overload, and it is both
unnecessary and difficult to implement: the cross-validation
between SPI and Transform is actually useful, and the kernel
requires two different mechanisms to use an unreserved vs a
reserved (alloc'd) SPI: CREATESA vs UPDATESA, which makes this
hard to support. API Council has questioned the value of this,
and they are right: everything points to "remove this". In the
future, if we find that SPI reservation is overhead, we can
always add it back.
-Hiding the TunnelMode builder method and application/remove
methods. These will not land by the time the next API
stabilizes, so better to hide them now that this is a
near-certainty. Expectation is to un-hide them in the subsequent
API bump.
Bug: 36073210
Test: Compilation, verified nobody is calling these stubs
Change-Id: Ic1a3f2cf7128633318ac175d6b56b45eb8d21cab
The file has fallen out of date since it was fundamentally
updated in commit 50e9b86. This change brings it up to date
with 2017b.
This change also switches back to using zone.tab as a source
of time zone IDs. In commit 50e9b86 the source was switched
to zone1970.tab. Although this switch wouldn't have
meaningfully affected time zone calculations it does alter
the exemplar locations for automatically detected time zones.
This information may surfaced to users in some places and
can lead to confusion because zone1970.tab uses zones that
span multiple countries, while zone.tab zones tend to be
more local. Reverting should lead to a subtly better
localization experience.
During this work a number of unexpected differences between
zone.tab and zone1970.tab were uncovered. These have been
questioned upstream via the IANA mailing list on 31st March
2017.
Notable other updates:
Addition of Asia/Famagusta for Cyprus.
Addition of Asia/Atyrau for Kazakhstan.
Addition of Europe/Saratov for Russia.
The following have been queried with IANA and differ between
zone.tab and zone1970.tab:
Removal of Indian/Reunion for French Southern Territories
Removal of Pacific/Honolulu for United States Minor Outlying Islands
Removal of Asia/Bangkok for Vietnam.
Bug: 25338903
Test: Build / CtsUtilTestCases
Change-Id: I955a2dc8d35968f2e58f51c3a2175e8402a59ee0
- Add API guide for developers giving an overview of what they need
to implement.
- Add @hide setLabel method in PhoneAccount; used when registering a
self-managed CS's phone account; we override it with their app label to
ensure they don't try to give themselves another name.
Test: Unit
Bug: 34159263
Change-Id: I0c890dc2feeb3ee438a80ed425db2aaf1f4c1fdd
This patch adds wakelock acquire and release activity to
ConnectivityService logs in dumpsys. All of the last 20 acquire and
release operations are logged.
This patch also:
- does a bit of cleanup to related dumpsys logs
- unify pretty printing of internal event ids to their names.
- delete mInetLog which was obsolete and not used.
Example of logs:
NetTransition WakeLock activity (most recent first):
03-30 02:15:40.628 - RELEASE 1 by EVENT_EXPIRE_NET_TRANSITION_WAKELOCK: not released (serial number was 2)
03-30 02:15:09.965 - ACQUIRE 2 for NetworkAgentInfo [WIFI () - 101]
03-30 02:15:01.877 - RELEASE 1 by EVENT_CLEAR_NET_TRANSITION_WAKELOCK: released
03-30 02:14:40.598 - ACQUIRE 1 for NetworkAgentInfo [WIFI () - 100]
Test: inspected result of $ adb shell dumpsys connectivity
Bug: 36703718
Change-Id: Ia8e2016fc512ee798ef0adc3f612d1f6c33d4870
In order to differentiate between various reasons for authentication
failure, add reason codes. These will be hidden since we don't intend to
have API change.
Bug: 33245941
Test: Unit test
Change-Id: I7222520df18e54d684ba9e50ff95be5d46a7d70c
Direct access to Netd from the bluetooth process is disallowed by
SELinux policy. This change reverts to the old behavior where IpManager
interacts with NetdService indirectly via NetworkManagementService.
Bug: 36492299
This partially reverts commit af39244a34f4449c12a5f925222c9bc8d8049320.
Change-Id: Icf20b1e24abf7dd3123760f8637928bde7afe06b
To make the SPI reservation more semantically consistent with the
transform creation API, and to ensure that we always create SPI
reservations relative to a well-known remote, we should take the
SPI request relative to a remote (rather than to a destination).
This necessitates that we now consider direction separately, which
is used for keying the SA-Id.
Bug: 36073210
Test: compilation
Change-Id: I81e955c20128c1f8e04fd68eb26669561f827a78
When creating an isolatedProcess=true service and when the native bridge
is in use, MountEmulatedStorage() is called with force_mount_namespace=true
and MOUNT_EXTERNAL_NONE. This led to an abort crash, since the process
would attempt to mount an empty path string.
Test: android.externalservice.cts.ExternalServiceTest built for ARM, run on Fugu
Bug: 36072260
Change-Id: I9441bcbd30167971ad486726bbeae57f3c4aebe9
-Add IpSecService with the necessary glue to connect to netd
-Add code to retrieve IpSecService from System Server
Bug: 34811227
Test: Service boots (and dumpsys works), more via b/34811227
Merged-In: I4cdcb643421141202f77a0e2f87a37012de0cd92
Change-Id: I4cdcb643421141202f77a0e2f87a37012de0cd92
This API can be used to enable the optional codecs, or disable them
and use only the mandatory SBC.
Internally, it is implemented by raising the SBC priority to
highest (so SBC will be used/selected), or reducing the SBC priority
to its default value (lowest).
Test: A2DP streaming and enabling/disabling/selecting optional codecs
Bug: 35873828
Change-Id: Ia82036ac33590a3a402b1f5a36102264d47a9029