The version of applyTransportModeTransform() and
removeTransportModeTransform() that accepted
Socket and DatagramSocket were closing the underlying
FDs upon return. It's unclear whether this is due to
a behavior change elsewhere in ParcelFileDescriptor,
but either way, converting to using getFileDescriptor$
and then calling dup() explicitly rather than relying
on ParcelFileDescriptor seems like a better idea anyway.
Bug: 72047396
Test: CTS - IpSecManagerTest.testCreateTransform()
Change-Id: Ia2f02564e1289f25bf113dbb861fcfd2240537a7
The IpSecService Unit tests relied on the
directionality of the IpSecConfig and previously
did not specify a source address. Unit tests
updated without functional change other than to
address these two requirements.
Bug: 71717213
Test: runtest frameworks-net
Change-Id: Iedbed735bc50fd4fdfe985f9e173956062a7b0d1
On Android, if the process containing the service being bound to
crashes before the bind succeeds, the app doing the binding won't
get a success or failure callback.
When that happens in this code, this leaves notif. manager thinking
that a binding is in progress, so it never attempts to rebind until
the device is rebooted.
Bug: 69064494
Test: original CL was manually tested --
crashed listener on proc start, verified not unbound forever
Change-Id: Id2082744208e21a709d9453365f282449a2e9407
(cherry picked from commit 4a86a51b672617b02994fc812e4f96342daf424e)
Dex2oat now accepts targetSdkVersion as a parameter to determine
whether ART should treat the app as "legacy" and allow or restrict
access to private APIs.
We also bump arguments of otapreopt to v4 to accommodate the new value.
Bug: 64382372
Test: manual
Change-Id: Iae3867325dfaf8deaba51626ab04b97ad797d3b6
Convert the IpSecTransform from being a bi-directional
pair of SAs to a unidirectional single SA. This CL
also removes the concept of "direction from SAs meaning
that a IpSecTransform may now be applied to a socket
in either direction.
-Make transforms unidirectional
-Add Convert allocateSpi() to use destination rather
than direction and remote address
-Remove directionality from builders for IpSecTransform
-Change applyTransportModeTransform() to take a
direction in which to apply the transform object.
-Additional minor naming updates
-Restrict IpSecConfig to only print keys on eng builds
-Move DIRECTION constants to IpSecManager
-Add sourceAddress parameter to IpSecTransform to provide
additional guarantees about the source address of data;
(explicit failure rather than implicit failure).
-Move SPI to the build() method of IpSecTransform
Bug: 71717213
Test: runtest frameworks-net, CTS - IpSecManagerTest
Change-Id: I0824b37f443f4b8c62536d9801238c63ed8f2a1c
This patch adds to the MacAddress class:
- getAddressType() method which replaces addressType(), for naming
consistency
- @NonNull annotations on all input and output reference values for
all public methods (@hide and public).
TYPE_UNKNOWN, which currently cannot be observed with a non @hide
method, is also removed from the public api.
Bug: 71866627
Test: $ runtest frameworks-net
Change-Id: I2af70408d46f431b7b32183e6b48ddae9a261a2c
Try to use the app's (main) classloader when an attach-agent request
is handled. If that fails, retry without a classloader.
Add bind-application-time flag to ProfilerInfo. Use the flag to have
a second attach-agent point on app startup. Add --attach-agent-bind
to cmd activity start to expose the difference between pre-bind and
bind-time attaching.
Bug: 70901841
Test: m
Test: cts-tradefed run commandAndExit cts-dev -m CtsJvmtiAttachingHostTestCases
Change-Id: I21698ec3be43a6d095d577100b2adfb22daca7d5
The documentation for KEY_CARRIER_NAME_STRING was out
of date; documentation updated to support the additional
use case of "fallback" carrier name when SPN is
unavailable.
Bug: 71882065
Test: compilation (docstring-only change)
Change-Id: I8e6a44358f8b18384c3c6e3cc0964e94c2484a11
Being able to update this handle is necessary to ensure that
system-only OTAs do not break vendor code that relies on
nethandles.
Bug: 63052780
Test: walleye builds, boots, networking works
Test: MultinetworkApiTest CTS tests passes
Change-Id: I049a4ad2610ca68b8f56377b63be7e5e8ce76039
The legacy-test target is deprecated and will be replaced by
android.test.base. This replaces a few usages of the legacy-test target
in Android.bp files with android.test.base.
Bug: 30188076
Test: make checkbuild
Change-Id: I3575f638114fe2a3b703e67837496346bde24472
This change more strictly accounts for onCapabilitiesChanged
callbaks and their values. It exposes several cases where we the
callbacks we send are spurious.
Test: ConnectivityServiceTest continues to pass
Change-Id: Ifb9b00b6f0cae48f8ed41a525100d1744b5f429b
A mistake during the conversion of the legacy-android-test target from
Android.mk to Android.bp caused some junit classes to be accidentally
included in the legacy-android-test target. That caused some warnings
about duplicate classes to be output during the build.
The junit classes are being included as part of the static library
android.test.runner. This fixes that by adding a new
android.test.runner-minus-junit which excludes the junit classes
and then using that instead.
Test: make checkbuild
Change-Id: Icd00b38c64d3416a55c1055f9716ddb78ec278f8
The loop as constructed causes i to overflow twice when i = 0 on integer
overflow sanitized builds.
runtime error: unsigned integer overflow: 0 - 1 cannot be represented
in type 'size_t' (aka 'unsigned long')
runtime error: unsigned integer overflow: 18446744073709551615 + 1
cannot be represented in type 'size_t' (aka 'unsigned long')
This refactors the loop to avoid the overflows.
Bug: 30969751
Test: Compiles, device boots, enabled pointer location overlay.
Change-Id: I844bb3b84b1f536c50d06fb489fcc22590d4aa98
Merged-In: I844bb3b84b1f536c50d06fb489fcc22590d4aa98
(cherry picked from commit 7ee0dba09550811040df4d7b494766f7d146e3de)
Also removed InterfaceAddress which was added
in aosp/561351 since LinkAddress is exactly same
as InterfaceAddress.
Test: Telephony sanity tests
bug: 64132030
Merged-In: Ib7965a44b307c4cff2581abf0b7c12fcb1b9526a
Change-Id: Ib7965a44b307c4cff2581abf0b7c12fcb1b9526a
- Rename varaibles holding LoadedApk to make the code easier to read.
- Move resource creation into LoadedApk, consolidating the logic.
(cherry picked from commit 7541ca4d1aa48e3110187a83a8dccbfa72084148)
Test: manual
Merged-In: I6bdc70482fbbb346ff694ada528ded18d3a63ef7
Change-Id: I6bdc70482fbbb346ff694ada528ded18d3a63ef7
Renames ...-legacy-test-... targets related to stubs generation to
...-android-test-base-....
(cherry picked from commit 5c99382a1995723637814221cd5432c458c622ad)
Bug: 30188076
Test: make checkbuild
Change-Id: I40b39c5250b7d990a903052c0b1ebd694242b5b3
Merged-Id: I54204733612d6d3f14dd8023973e993a5ddab51d
Make it consistent with the test-mock and test-runner directories.
Also renames the files in api/ subdirectory.
(cherry picked from commit f779efd62cd579f67bd3b387d59fda11ee0cbe90)
Bug: 30188076
Test: make checkbuild
Change-Id: Ied3621e6201d8717223fe1ccd4ea77d458126b25
Merged-In: If4f99a65fcca416ede5b3e63481398f0b451bcb7
Cherry-pick from 30b9adfad1c5055044f0b585782b10f764e0ddf9
The screen unlocked functions save effort on setting
the usb config during each connection. These
functions persist between connections and between
boots. When the screen is unlocked and these
functions are set, the current functions will
be automatically set to the screen unlocked functions.
Also added svc command for this so it can be
used and tested while the UI is worked on.
Bug: 62876645
Test: svc usb setScreenUnlockedFunctions mtp
Test: Test functions with locking, unlocking, and
disconnecting, with no lockscreen, swipe, and pattern
Change-Id: Ia05e095917166d25398c4d310b02971e3a1bb12a