343530 Commits

Author SHA1 Message Date
David Brazdil
106a915256 Merge "Pass targetSdkVersion to installd" 2018-01-17 13:42:29 +00:00
nharold
3cff120fcb Merge "Prevent Closure of Underlying Socket FDs" 2018-01-17 08:45:29 +00:00
nharold
809bcfc45e Merge changes from topic "ipsec-oneway-transform"
* changes:
  Update IpSecService UnitTests
  Make Transforms Unidirectional
2018-01-17 08:40:37 +00:00
Nathan Harold
b548d251b7 Prevent Closure of Underlying Socket FDs
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
2018-01-16 21:30:20 -08:00
nharold
fa6187510a Merge "Update documentation for KEY_CARRIER_NAME_STRING" 2018-01-17 03:39:44 +00:00
Nathan Harold
5676f5fdae Update IpSecService UnitTests
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
2018-01-16 19:38:10 -08:00
Ryan Lothian
a13201a99b Merge "Handle onBindingDied in notification manager" 2018-01-16 23:31:41 +00:00
Ryan Lothian
4b766b38f0 Handle onBindingDied in notification manager
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)
2018-01-16 23:31:03 +00:00
David Brazdil
3d44ed0dfe Pass targetSdkVersion to installd
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
2018-01-16 22:36:41 +00:00
Ivan Lozano
05284b6c6a Merge "Fix doFadingAnimationLocked in sanitized builds." 2018-01-16 20:27:36 +00:00
Nathan Harold
a25233123b Make Transforms Unidirectional
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
2018-01-16 11:08:31 -08:00
Treehugger Robot
f779d7e3be Merge "ActivityThread: Attempt to attach agent with app's classloader" 2018-01-16 18:25:32 +00:00
Treehugger Robot
c3a209382c Merge changes I0d0c0fac,Ifb9b00b6
* changes:
  Split updateCapabilities into two methods.
  More strictly check NetworkCapabilities callbacks.
2018-01-16 14:25:13 +00:00
Lorenzo Colitti
aa7f7e4a6a Split updateCapabilities into two methods.
This makes the code a bit easier to follow.

Test: ConnectivityServiceTest continues to pass
Change-Id: I0d0c0facc1e3ba07b53542b35da40ddc096ff92e
2018-01-16 21:25:10 +09:00
Treehugger Robot
a04d0cc72f Merge "Update netId to nethandle mapping in NetworkTest." 2018-01-16 12:23:02 +00:00
Paul Duffin
2285630e4b Merge "Replace legacy-test with android.test.base in bp files" 2018-01-16 10:47:47 +00:00
Lorenzo Colitti
8bdf996b17 Update netId to nethandle mapping in NetworkTest.
Bug: 63052780
Test: NetworkTest now passes
Change-Id: I5f1cb3055b7042a19afb5dd62f082912157612ba
2018-01-16 17:19:04 +09:00
Hugo Benichi
e65a016d76 Merge "MacAddress: add @NonNull annotations" 2018-01-16 07:10:50 +00:00
Hugo Benichi
48872c6342 MacAddress: add @NonNull annotations
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
2018-01-16 13:32:59 +09:00
Treehugger Robot
9456c020d8 Merge "Change the netId to nethandle mapping." 2018-01-16 02:58:56 +00:00
Hugo Benichi
46e9e35835 Merge "ConnectivityService: synchronize access on mLockdownEnabled" 2018-01-16 00:20:52 +00:00
Andreas Gampe
ab8a63be6a ActivityThread: Attempt to attach agent with app's classloader
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
2018-01-15 13:04:25 -08:00
Nathan Harold
baaa68d141 Update documentation for KEY_CARRIER_NAME_STRING
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
2018-01-15 10:48:00 -08:00
Lorenzo Colitti
e4fc6322a4 Change the netId to nethandle mapping.
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
2018-01-16 02:08:09 +09:00
Paul Duffin
b36eb542a9 Replace legacy-test with android.test.base in bp files
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
2018-01-15 15:47:47 +00:00
Lorenzo Colitti
273345499b More strictly check NetworkCapabilities callbacks.
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
2018-01-16 00:25:13 +09:00
vichang
9cb0b52011 Merge "Add a new API android.icu.util.LocaleData" 2018-01-15 13:55:54 +00:00
Treehugger Robot
e61ee4198e Merge "change NMS removeNetwork to netd binder variant" 2018-01-15 12:39:09 +00:00
vichang
a5fed7f526 Merge "Expose API android.icu.util.IllformedLocaleException" 2018-01-15 11:56:58 +00:00
Erik Kline
33d8e5cc07 change NMS removeNetwork to netd binder variant
Also: require NETWORK_STACK instead of CONNECTIVITY_INTERNAL.

Bug: 34953048
Bug: 64133961
Test: as follows
    - built
    - flashed
    - booted
    - runtest frameworks-net
Change-Id: I26f07f51a8a2f4a8bb43a276da7c5e66c355c848
2018-01-15 19:51:37 +09:00
Paul Duffin
4418418adb Merge "Remove junit classes from legacy-android-test" 2018-01-13 19:33:39 +00:00
Paul Duffin
a88eb29f9e Remove junit classes from legacy-android-test
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
2018-01-13 09:37:37 +00:00
Paul Duffin
22bd015cba Merge changes from topic "fix-legacy-android-test-spam"
* changes:
  Added new android.test.base targets
  Move legacy-test to test-base
2018-01-13 09:33:05 +00:00
Treehugger Robot
895148087b Merge "Add the user mobile data state into PhoneStateListener so that applications can listen to the change of the user mobile data state." 2018-01-13 04:09:42 +00:00
Treehugger Robot
277c7d248c Merge "Used LinkAddress insteaad of InterfaceAddress" 2018-01-13 01:42:52 +00:00
Ivan Lozano
d09e917cd1 Fix doFadingAnimationLocked in sanitized builds.
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)
2018-01-12 16:48:38 -08:00
Sanket Padawe
e8fc3d2399 Merge "Add permission check for old call handover apis." 2018-01-12 23:50:40 +00:00
Treehugger Robot
eac8c121fe Merge "android.os.VintfObject: update for VNDK version format change." 2018-01-12 22:12:39 +00:00
Joseph Pirozzo
c9082cecb3 Merge "Bluetooth in band ring" 2018-01-12 22:11:50 +00:00
Hall Liu
d3cb6380a4 Merge "Use proper classloader when reading from parcel" 2018-01-12 20:56:36 +00:00
Treehugger Robot
6ca155f8c2 Merge "Minor LoadedApk refactoring." 2018-01-12 20:52:14 +00:00
Jack Yu
8100a8ae26 Used LinkAddress insteaad of InterfaceAddress
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
2018-01-12 11:18:38 -08:00
Jeff Hamilton
caf728ea26 Minor LoadedApk refactoring.
- 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
2018-01-12 11:05:50 -08:00
Sanket Padawe
f6a9e5b6e0 Add permission check for old call handover apis.
Bug: 65415068
Test: manual
Change-Id: I4784debf1be255de24c341fe5474fc529bc1cebe
2018-01-12 10:17:42 -08:00
Holly Jiuyu Sun
90b4e47d94 Merge "Add dependencies of EuiccCard." 2018-01-12 17:18:03 +00:00
Paul Duffin
e95a895ef4 Added new android.test.base targets
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
2018-01-12 16:31:08 +00:00
Paul Duffin
2141827700 Move legacy-test to test-base
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
2018-01-12 15:52:39 +00:00
Badhri Jagan Sridharan
22f4a681f9 Merge "DO NOT MERGE: Add setScreenUnlockedFunctions method to UsbManager" 2018-01-12 15:36:08 +00:00
Jerry Zhang
7ca5d3a334 DO NOT MERGE: Add setScreenUnlockedFunctions method to UsbManager
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
2018-01-12 15:35:43 +00:00
Treehugger Robot
f0561142f3 Merge "base: Convert libs/services/Android.mk into a blueprint" 2018-01-12 12:39:35 +00:00