343875 Commits

Author SHA1 Message Date
Neil Fuller
b3c2efc615 Merge "Javadoc fixes to Time" 2018-01-18 09:18:27 +00:00
Bowgo Tsai
70e4d19935 Add odm sepolicy support to SELinuxMMAC.java
Currently there are two mac permission files:
    - /system/etc/selinux/plat_mac_permissions.xml
    - /vendor/etc/selinux/nonplat_mac_permissions.xml

The change renames nonplat_mac_permissions.xml to
vendor_mac_permissions.xml.
It also adds odm_mac_permissions.xml but allows it to be optional:
    - /system/etc/selinux/plat_mac_permissions.xml
    - /vendor/etc/selinux/vendor_mac_permissions.xml
    - /odm/etc/selinux/odm_mac_permissions.xml (optional)

Also cleans up comments to reflect the change.

Bug: 64240127
Test: boot sailfish normally without odm
Test: boot another device having odm
Change-Id: I87d01215a65e75bf33659ed03797ffda5393d5a4
2018-01-18 14:39:50 +08:00
Holly Jiuyu Sun
a5bc474e2c Merge "Add APIs to EuiccCardManager." 2018-01-18 03:32:22 +00:00
Jeff Sharkey
ffaddf73de Merge "Add "not congested" network capability." 2018-01-18 03:28:34 +00:00
Treehugger Robot
a3bf36f050 Merge "Add basic resolution of Private DNS hostname" 2018-01-18 02:44:53 +00:00
Lorenzo Colitti
aacb56a7c0 Merge "Add public API methods for private DNS." 2018-01-18 01:17:17 +00:00
Treehugger Robot
877cbe1dc2 Merge "Added internal API getMaxConnectedAudioDevices()" 2018-01-18 00:46:57 +00:00
Holly Jiuyu Sun
bbc858006f Add APIs to EuiccCardManager.
The CL contains parts of the EuiccCard APIs. getEid() is sync. All the
other APIs are async.
Move ResetOptions from EuiccCard to EuiccCardManager.
The other APIs will be added in a follow-up CL.

Bug: 38206971
Test: test on phone
Change-Id: Iba098ee779b8ea4e244e0e4cf7318139666cc94b
2018-01-17 16:38:42 -08:00
Nathan Harold
c47eaccf7c Add Tunnel Interface APIs to IpSecManager
Add a new interface and a new management object,
IpSecTunnelInterface to the IpSecManager surface.
This object will be used to control IPsec tunnels.

-Add IpSecTunnelInterface object
-Add methods to create and use an IpSecTunnelInterface
-Update the IpSecTransform builder to create Tunnel
 mode IpSecTransform objects (usable with an IpSecTunnel)

Bug: 36033193
Test: compilation
Change-Id: Ib6948b12c15c93674234dc36288058ae44435b90
2018-01-17 16:14:17 -08:00
Treehugger Robot
7839672e22 Merge "Reland: Move zygote's seccomp setup to post-fork" 2018-01-17 23:58:10 +00:00
Treehugger Robot
dbfaf31357 Merge "Bluetooth in band ring" 2018-01-17 23:48:40 +00:00
Andy Hung
6cb33a1b54 Merge "Watchdog: add media.metrics" 2018-01-17 22:33:53 +00:00
Holly Jiuyu Sun
0797f4be58 Merge "Add APIs to EuiccCardManager and EuiccCardController." 2018-01-17 22:26:58 +00:00
Jack Yu
3965e3bbc6 Merge "Added data service interface" 2018-01-17 22:12:29 +00:00
Steven Moreland
2ef0cbd8bb HIDL: Check error value.
HwParcel's verifySuccess method doesn't actually check
to see if the call succeeded.

Change-Id: Iaa99cbfd6f5f211facaa20c09c5e1dae8e2b8a7f
Fixes: 71813867
Test: boot walleye, hidl_test_java
2018-01-17 13:26:35 -08:00
Neil Fuller
3d3d7f1a8d Javadoc fixes to Time
Fixing errors noticed while inspecting the code.

Test: None - docs only
Change-Id: Ib6d427c4339f0b8e56eb72b12e89c1095245d6b4
2018-01-17 21:13:21 +00:00
dalyk
d920134258 Add public API methods for private DNS.
Test: Small modifications to LinkProperties test.
Bug: 71828272
Change-Id: Id2f5acb5469132ec4a917837739f42085c71498e
2018-01-17 15:46:21 -05:00
Brad Ebinger
1f00565433 Merge "Integrate IMS Registration API" 2018-01-17 20:29:54 +00:00
Benedict Wong
4f9fb810d8 Address comments and final cleanup from refcounting integration
Added some extra comments on reference counting and moved a few methods
around. No significant logical changes made in this CL

Bug: 63409385
Test: CTS, Unit tests (both frameworks-base and netd) and binder tests
all pass

Change-Id: I89f1f4a021db48ae406fefefa6aca7406045736c
2018-01-17 12:10:49 -08:00
Treehugger Robot
b760295764 Merge "Add URL_DPC, URL_FILTERED and URL_ENFORCE_MANAGED as constants." 2018-01-17 19:50:40 +00:00
Chen Xu
3d23b90874 Merge "new carrier id APIs" 2018-01-17 19:09:34 +00:00
nharold
6725ff729b Merge "IpSec - API Tweak for removeTransportModeTransform" 2018-01-17 19:07:10 +00:00
Holly Jiuyu Sun
fb1c78405e Add APIs to EuiccCardManager and EuiccCardController.
Move CancelReason from EuiccCard to EuiccCardManager.
part 2.

Bug: 38206971
Test: test on phone
Change-Id: Iab61be59b7130a5336dffbc965eefefcfa3eccf6
2018-01-17 10:38:15 -08:00
Jack Yu
ffcda5c10b Added data service interface
The interface for mobile data service. This is the base class
for vendor or first party data service provider to implement
the data service for cellular or IWLAN data support.

Test: Manual
bug: 64132030
Change-Id: I3e5f48b88905f4533cac60975802d4da3746e7f8
2018-01-17 09:51:30 -08:00
Treehugger Robot
fc3b50e9b6 Merge "Skip SystemUI check in BluetoothServiceManager if noHome." 2018-01-17 17:33:41 +00:00
Victor Hsieh
c8176efe2e Reland: Move zygote's seccomp setup to post-fork
Before this change, seccomp filter setup is as early as in zygote's main
function.  To make it possible to split app and system server's filter,
this postpone the setup to after fork.  It also starts to call app
specific and system server specific setup function.

The filter setup is done in Zygote's ForkAndSpecializeCommon.  This is
because adding a seccomp filter must be done when either the caller has
CAP_SYS_ADMIN or after the PR_SET_NO_NEW_PRIVS bit is set.  Given that
setting PR_SET_NO_NEW_PRIVS breaks SELinux domain transition
(b/71859146), this must be done after Zygote forks but before
CAP_SYS_ADMIN is droppped.

Test: (cts) -m CtsSecurityTestCases -t android.security.cts.SeccompTest
Test: no selinux denial flood in dmesg with selinux enforced
Test: debuggerd -b `pidof com.android.phone`  # logcat shows tombstoned
      received crash request
Bug: 63944145
Bug: 71859146

Change-Id: I8215c8530d3d0de504a270488f8e29635805e8b0
2018-01-17 09:30:44 -08:00
fionaxu
f4a7659967 new carrier id APIs
1. New telephony APIs to getCurrentCarrierId
and getCurrentCarrierName
2. New broadcast intent to notify carrier id changed

Bug: 64131637
Test: Build
Change-Id: I9a240ba7df313ad701f98bb3982f29c3d5317da8
(cherry picked from commit fff6f59a63304be50e7a251fb4fca38ae0090fc4)
Merged-in: I9a240ba7df313ad701f98bb3982f29c3d5317da8
2018-01-17 17:08:08 +00:00
Yohann Roussel
493cebd025 Add tests about MultiDex corruption recovering
Those are testing extracted zip corruption and also corruption of their
corresponding odex file and the capacity of MultiDex.install to restore
a runnable state.

Bug: 28832787
Test: This is the test
Change-Id: I8dd99172d545e700b12c2a2b1391ef1aeb5560ce
2018-01-17 15:42:52 +01:00
Erik Kline
a24d459a5d Add basic resolution of Private DNS hostname
Test: as follows
    - built
    - flashed
    - booted
Bug: 34953048
Bug: 64133961
Change-Id: I0a2289ea51a9294352c91d2ead23730d9b0333a5
2018-01-17 23:17:08 +09:00
David Brazdil
106a915256 Merge "Pass targetSdkVersion to installd" 2018-01-17 13:42:29 +00:00
yuemingw
4c0065f392 Add URL_DPC, URL_FILTERED and URL_ENFORCE_MANAGED as constants.
Test: manual
Bug: 68208245
Change-Id: I9416526f4a6e014dae66a936d6d1eb60309ef8ab
2018-01-17 10:56:59 +00:00
Pavlin Radoslavov
a513792e9e Added internal API getMaxConnectedAudioDevices()
The API can be used to obtain the maximum number of connected
devices for A2DP or HFP.

Test: Manual
Bug: 64767509
Change-Id: I80b8a1c85e33ae0b23fdc4812f8991a4202d9abc
2018-01-17 02:09:53 -08:00
Jeff Sharkey
9b2a10f55d Add "not congested" network capability.
Can be used by a network to indicate when it's congested, meaning that
apps should defer network traffic that could be done at a later time.

Test: bit FrameworksNetTests:android.net.,com.android.server.net.,com.android.server.connectivity.VpnTest,com.android.server.ConnectivityServiceTest
Bug: 64133169
Change-Id: I8a60b6f02dd0f42268b59690556c16335d34e220
2018-01-17 02:27:04 -07:00
Nathan Harold
f73d252c8f IpSec - API Tweak for removeTransportModeTransform
Because IpSecTransforms are now unidirectional,
and because the only mechanism for removing Transforms
removes it from both directions, the API can no longer
use the Transform parameter to meaningfully validate
that the caller had applied a transform. Since that
functionality was as-yet unimplemented and is now
infeasible, the transform parameter is removed.

Bug: 72079356
Test: cts - IpSecManagerTest; runtest frameworks-net
Change-Id: If19b0d34bdc6daf31a40d6d62bff326dcbca08c0
2018-01-17 01:11:46 -08: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
yinxu
921daf9e18 Add CARD_ID in SubscriptionInfo database
Test: Basic telephony sanity
Bug: 64131518

Change-Id: I1c3c903ad2fc15fd49f4ece9ada4cbfa792a28ce
2018-01-16 12:59:01 -08: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
Brad Ebinger
f0bc082a2c Integrate IMS Registration API
Integrates the new IMS Registration API into the framework
and add two APIs for feature parity.

1) Moves ImsRegistrationImplBase to the android.telephony.ims
namespace
2) Expose ImsRegistration AIDL in TelephonyManager as hidden
API.
3) Adds onVoicemailCountUpdate and
onSubscriberAssociatedUriChanged APIs for feature parity.

Bug: 63987047
Test: Telephony unit tests, manual IMS tests
Merged-In: I51a8ae5cf58b81708c21adc1b26a9eb59f6280fd
Change-Id: I51a8ae5cf58b81708c21adc1b26a9eb59f6280fd
2018-01-16 09:43:47 -08: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