This patch simplifies argument validation in NsdManager public api and
regroup duplicated validation into common methods.
This makes stack traces more actionable as now specific errors will
cause the api to throw exception from specific methods, whereas before
IllegalArgumentException would be thrown from inside the same api method
for different reasons.
This patch also includes a couple of other small cleanups.
Test: $ runtest -x frameworks/base/tests/net/../NsdManagerTest.java
Bug: 35362108
Bug: 37013369
Bug: 62044295
Bug: 63826516
Merged-In: Iaad13e13976e9bf8f508d7188f823f8184ac414b
(cherry pick from commit f2c64f8725)
Change-Id: I5e6a1ecc6b98069ef0089bbceecf73f7692df227
libnativehelper exports headers under nativehelper. These were
available before incorrectly as global headers in order to give
access to jni.h.
Test: modules using frameworks/base find headers
Bug: 63762847
Change-Id: I0f9f231acdebe460f279135462f43d3e32eff64d
Calling run() launches in the current thread;
we want to call start() to launch in a separate
thread to unblock system initialization.
Bug: none
Test: compilation
Change-Id: Ia85059100add6a44a5e3262500b00ba8ca21e125
The UPDATE_DEVICE_STATS permission has become the de-facto mechanism
that platform components use to shift blame for resource usage, so
it's confusing to also have a separate MODIFY_NETWORK_ACCOUNTING
permission. So this change replaces MODIFY_NETWORK_ACCOUNTING with
UPDATE_DEVICE_STATS.
Bug: 62483389
Test: builds, boots
Exempt-From-Owner-Approval: Bug 63673347
Change-Id: I872759f02327b6d531ec2338bd876890aded60ad
If an invalid Resource Id is provided to the Managed Resource
Array getter, we should just return null rather than asserting
the owner of the resource.
Bug: none
Test: tbd
Change-Id: I407a96e4e82e9d6bf68e89380a88d3851efe4305
Apps with a normal UID are typically isolated enough to not require
socket tagging; we're mostly interested in tracking down internal
UIDs that have lots of code sharing the same UID.
Also fix up everyone doing manual string checks of Build.TYPE, since
we now have first-class fields for those.
Bug: 38126076
Test: builds, boots
Change-Id: I3a40348196bd8459289f2b9355d9783a07f1e7dd
This way an app store can shift blame for update-related network
traffic onto the app that is being updated.
Using a well-known tag makes it easy for developers to identify
that they didn't explicitly request the traffic at runtime, similar
to how backup/restore traffic is handled.
Bug: 38282350
Test: builds, boots
Change-Id: I003dd7c9615d4ab318250f1e44fa5d195ac94d23
Most @SystemApi methods should be protected with system (or higher)
permissions, so annotate common methods with @RequiresPermission to
make automatic verification easier.
Verification is really only relevant when calling into system
services (where permissions checking can happen on the other side of
a Binder call), so annotate managers with the new @SystemService
annotation, which is now automatically documented.
This is purely a docs change; no logic changes are being made.
Test: make -j32 update-api && make -j32 offline-sdk-docs
Bug: 62263906
Change-Id: I2554227202d84465676aa4ab0dd336b5c45fc651
-Implement the UdpEncapsulationSocket
-Convert all ManagedResources to use resourceIds
-Rework ManagedResource to track resourceIds
Bug: 30984788
Test: cts - IpSecManagerTest#testUdpEncapsulation()
Change-Id: I7b1099c487051a8d951c1485791c4b6cef2deb1d
Now the VT call data usage will be counted under
current dialer's data usage as well as the total
device data usage.
Test: Manual
bug: 37671326
Merged-In: I8351e9ae17c84210f7ca6c319d3bddcbb0043341
Change-Id: I8351e9ae17c84210f7ca6c319d3bddcbb0043341
Now the VT call data usage will be counted under
current dialer's data usage as well as the total
device data usage.
Test: Manual
bug: 37671326
Change-Id: I8351e9ae17c84210f7ca6c319d3bddcbb0043341