13685 Commits

Author SHA1 Message Date
Hans Boehm
9a9e22fad4 Merge "Add reachabilityFence, remove ExemptionMechanism.finalize" 2018-01-31 18:20:05 +00:00
Treehugger Robot
1dfa830bb0 Merge "Add handover permission, fill in some missing API gaps." 2018-01-30 18:33:27 +00:00
Ruchi Kandoi
62c46eac8e Add android.Manifest.permission.NFC_TRANSACTION_EVENT
This permission would gate if an application is eligible to receive
notifications about nfc transactions taking place on the Secure
Elements.

Bug: 72556384
Test: Test dummy notifications on sample app.
Change-Id: I233f7185bbc3a5511f79ae012cc60a081968eb99
2018-01-27 01:48:31 +00:00
Tobias Thierer
9f82b6bab5 Merge "Track removal of Os.waitpid(..., Int32Ref, ...) from API." 2018-01-26 13:05:06 +00:00
Treehugger Robot
71a9e66d4a Merge "Deprecate android.util.Mutable*." 2018-01-26 00:28:52 +00:00
Tyler Gunn
858bfaf79c Add handover permission, fill in some missing API gaps.
Adding the ACCEPT_HANDOVER runtime permission which an app must have in
order to accept handovers (this is per design).

Adding missing onHandoverComplete method in the android.telecom.Connection
API (per design).

Finishing plumbing for android.telecom.Call#onHandoverComplete API.

Fix issue where the new handover API methods would never get called; the
legacy handover extra was being used in this case when it should not have
been.

Bug: 65415068
Test: Verified using new CTS tests
Change-Id: If1558f6a23911862c02ac5b18fb62d86911ed7e2
Merged-In: If1558f6a23911862c02ac5b18fb62d86911ed7e2
2018-01-25 16:20:03 -08:00
Ruchi Kandoi
a1f9401a22 Open Mobile API for frameworks/base
This contribution is an implementation of the GlobalPlatform
Open Mobile API for Android with some modifications to
namespaces and packages to make it suitable as a core
Android component.

This contribution is based on
0001-Open-Source-Contribution-of-Smartcard-Service-for-fr.patch
which can be found in
https://portland.source.codeaurora.org/patches/quic/la/PATCH_217881_OpenMobileAPI_20171206.tar.gz

The submitted patch was derived from
https://source.codeaurora.org/quic/la/platform/packages/apps/SmartCardService/commit/?h=LA.BF64.1.2.1&id=06ecea9abb8264049f52c7e31c0bc13330a425d5.

Test: Sample Application; open Channels and transmit APDUs

Change-Id: Iac5206bd84798ca0fcdb504c89e1da5383012a5a
Signed-off-by: Jeremy O'Donoghue <jodonogh@codeaurora.org>
2018-01-25 18:04:17 +00:00
Tobias Thierer
833501d0a0 Track removal of Os.waitpid(..., Int32Ref, ...) from API.
Test: Treehugger
Bug: 70985234

(cherry picked from commit 08005bbe9157c84f88189a7d7e9db466324af910)

Change-Id: I62229d01c13ac12e8c263e601d46ceb4f7ae7a0e
Merged-In: I62229d01c13ac12e8c263e601d46ceb4f7ae7a0e
2018-01-25 13:54:56 +00:00
Treehugger Robot
7e73c73f89 Merge "Update CellInfo API to accomodate new fields." 2018-01-25 12:50:37 +00:00
Tobias Thierer
9223fd6b6b Deprecate android.util.Mutable*.
Since http://r.android.com/565744 , these classes do not appear
in the signature of any other Android API. There are no plans to
make them part of any future API signatures.

They do not provide useful abstractions because:
 - They lack encapsulation and functionality (value is nonfinal;
   lack of equals/hashCode and toString).
 - It's trivial for apps to implement similar types for their
   internal use.

Only three of these eight classes (Mutable{Int,Long,Boolean}) are
used internally in Android; most of these usages could be written
better with named, more specific classes.

Therefore these classes do not pull their own weight on the API
surface of android.util.

This CL deprecates all eight classes in preparation for removing
them from the Android API surface at some point in the future, and
to allow the unused classes to be removed entirely.

Bug: 71546998
Test: Treehugger

(cherry picked from commit d57219411b3718da0850ef109e63d1a311a03d31)

Change-Id: Ib8736faa86d0ae5eec2c47a294f21adcf21d3dc4
Merged-In: I1cc1eb5ca9c36749bbb9a233d60036f6319bf2d3
2018-01-25 12:29:40 +00:00
Treehugger Robot
185a89caf1 Merge "Add ServiceState APIs for carrier aggregation." 2018-01-25 07:47:55 +00:00
Eric Schwarzenbach
a9d9b021be Update CellInfo API to accomodate new fields.
Adds CellConnectionStatus to top level CellInfo type. Adds cell bandwidth
to the CellIdentityLte.

Bug: 72117223
Test: runtest frameworks-telephony

Change-Id: Id5f3b5a2bd4119c099f5e739d5579974e7adc897
2018-01-25 07:25:04 +00:00
Eric Schwarzenbach
09a7773583 Add ServiceState APIs for carrier aggregation.
Adds getDuplexMode, getChannelNumber, and getCellBandwidths to
ServiceState.

Bug: 72117602
Test: runtest
Change-Id: I04be7d0a7d88693ef21b252ecc21aa974c2f89c8
2018-01-25 01:10:29 +00:00
Amit Mahajan
8a4275f09f Update comments for ACTION_CARRIER_CONFIG_CHANGED.
Test: none
Bug: 64131518
Change-Id: I7efbbb393289cc11d529898ea3d7f96b0e89f445
2018-01-24 14:30:38 -08:00
Jack Yu
d5f1de19f4 Added network service interface
The interface for mobile network service. This is the base class
for vendor or first party data service provider to implement
the network service for cellular or IWLAN network support.

Test: Manual
bug: 64132030
Change-Id: Ia358cbb18fc6d15dcc45c75f14b7c952f899e101
2018-01-24 19:13:45 +00:00
Cassie Han
eb9452a08d Merge "Move android.provider.Telephony.SECRET_CODE to Telephony.Intents." 2018-01-24 04:55:32 +00:00
Cassie
866f494dc2 Move android.provider.Telephony.SECRET_CODE to Telephony.Intents.
Bug: 69616728
Test: Basic telephony sanity
Change-Id: Ia053f9be082ceb139a284598ee2398a25daa7e08
2018-01-23 15:06:53 -08:00
Lorenzo Colitti
d5876bc438 Add getDefaultNetwork to the NetworkStats public API.
This allows an app using the public API to know whether the
traffic in a particular bucket was on the default network
(i.e., the network was selected by the system), or not (i.e.,
the network was selected by the app).

Bug: 35142602
Test: builds, boots
Test: added coverage to NetworkUsageStatsTest CTS test, still passes
Change-Id: I9f6669908fa119743b9c0aa0c31a03e5ebafa7db
Merged-In: I9f6669908fa119743b9c0aa0c31a03e5ebafa7db
2018-01-23 18:28:07 +09:00
Treehugger Robot
278dd4ab90 Merge "Add NetworkTypeBitmask into public ApnSetting." 2018-01-22 22:53:38 +00:00
Chen Xu
2f6b2726e6 Merge "address carrier id api review feedback" 2018-01-22 22:44:02 +00:00
fionaxu
ac1defabc8 address carrier id api review feedback
1. improve comments
2. change returned carrier name from String to CharSequence
3. change to AndroidCarrierId

Bug: 64131637
Bug: 71584605
Test: Manual
Change-Id: I412d53bb9d4955e1267300692e90ebfffd6818df
Merged-in: I412d53bb9d4955e1267300692e90ebfffd6818df
2018-01-22 21:05:55 +00:00
yuemingw
84323c0dce Add NetworkTypeBitmask into public ApnSetting.
Sync with aosp/556766.
Moved from ag/3477310.

Bug: 68208293
Test: manual
Change-Id: I04b901c46b7bbce4ed7d52895fcc904fb713fb69
2018-01-22 17:35:26 +00:00
Andreas Gampe
571b700fb6 Debug: Add attachJvmtiAgent with classloader
Add classloader support to android.os.Debug.attachJvmtiAgent. For
the original version without a given classloader, look up the
application's main classloader.

Bug: 65016018
Bug: 70901841
Test: m
Test: cts-tradefed run commandAndExit cts-dev
Change-Id: I649b6883e05dc2f75073fe1f978423f6a7b880df
2018-01-18 22:02:53 -08:00
Hans Boehm
242b93b760 Add reachabilityFence, remove ExemptionMechanism.finalize
ReachabilityFence is taken from Java 9.

ExemptionMechanism.finalize was never useful, and is also being removed
upstream. It is unsafe in the presence of dead reference elimination.

Bug: 63934467
Bug: 28342794
Test: Build and boot AOSP
Change-Id: I91dc4d33b91175248f44783e3c868a4f1b1d2d0d
2018-01-18 20:34:44 -08:00
Lorenzo Colitti
aacb56a7c0 Merge "Add public API methods for private DNS." 2018-01-18 01:17:17 +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
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
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
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
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
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
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
vichang
9cb0b52011 Merge "Add a new API android.icu.util.LocaleData" 2018-01-15 13:55:54 +00:00
vichang
a5fed7f526 Merge "Expose API android.icu.util.IllformedLocaleException" 2018-01-15 11:56:58 +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
f9063b378b Merge "Add public ApnSetting in android.telephony." 2018-01-11 04:01:32 +00:00
Jack Yu
5e90553bcf Merge "Added Cell identity for TD-SCDMA and a base class CellIdentity" 2018-01-10 18:39:53 +00:00
Victor Chang
3856e2db6b Add a new API android.icu.util.LocaleData
1. getDelimiter is useful to avoid quoted text in string resource
and reduce apk size
<string name="verbal_quote_string">“<xliff:g id="value"
example="Mountain">%1$s</xliff:g>”</string>

Two related methods, i.e. setNoSubstitute, getNoSubstitute, are used to
avoid using values in root locale
2. getMeasurementSystem, getPaperSize
Handful method to determine to use km or miles and paper size

Bug: 71706733
Test: android.icu.dev.test.util.LocaleDataTest
Merged-In: I86b0126f6df62ed5b6081cabdb55487e7145ade0
(cherry picked from commit 98b16b6f437d9ae5fc6b81d6dbe8de279dccfecf)

Change-Id: Ic7cf70439658430c0154459f3ac695f24c99fc5d
2018-01-10 14:25:26 +00:00
Victor Chang
d74d722fb2 Expose API android.icu.util.IllformedLocaleException
android.icu.util.IllformedLocaleException is referenced in javadoc, but
is not exposed as a public API

Test: Existing tests cover this API. cts-tradefed run cts-dev
-m CtsIcuTestCases -t android.icu.dev.test.util.ULocaleTest
Test: m
Bug:71629543

Merged-In: I2571ecc9e561294033ff13460bdd363a0ffc6c9b
(cherry picked from commit e6e9308d6ed37dd031f1589ac87f757e29cfc468)
Change-Id: I80d2619e945e415e6ad8c5966a73f44e8dc5b6de
2018-01-10 14:15:55 +00:00
Jack Yu
6cd44734b0 Added Cell identity for TD-SCDMA and a base class CellIdentity
Added CellIdentityTdscdma for TDS-CDMA cell identity. Also added
a base class for existing CellIdentityXxx so that the network
service can return specific RAT cell identity through the
network service callback API which takes generic cell identity
as the parameter.

This is the preliminary change for IWLAN refactoring since cell
identity is part of the CS/PS network registration.

bug: 64132030
Test: Unit tests
Change-Id: I3ca405d687667b6c43e782339edec26a6f6edfc9
2018-01-10 01:37:04 -08:00
Holly Jiuyu Sun
b01bd54b11 Merge "Merge EuiccProfile into EuiccProfileInfo." 2018-01-10 05:21:35 +00:00
yuemingw
9361a1394c Add public ApnSetting in android.telephony.
Bug: 68208293
Test: manual

Add public ApnSetting class in android.telephony. Move APN TYPE constants out from
PhoneConstants into public ApnTypeConstants.

Design doc: https://docs.google.com/document/d/1UEYjhRGSEwwccPLs_FzFD-IeOsVq63gxmAHNtDfnzAY/edit?pli=1#

Change-Id: I74d23644a872df0abc19730285ae196b6e3e39dd
2018-01-10 03:17:05 +00:00
Treehugger Robot
0cb936a855 Merge "Exposed CDMA SID/NID get APIs" 2018-01-10 02:19:20 +00:00
Cassie Han
72acefa6d8 Merge "Expose a new public column network_type_bitmask and deprecate bearer_bitmask gradually." 2018-01-10 00:55:32 +00:00
Treehugger Robot
ed7eead23b Merge "Add isMobileDataEnabled in TelephonyManager." 2018-01-09 23:46:55 +00:00
Holly Jiuyu Sun
e6153b9bff Merge EuiccProfile into EuiccProfileInfo.
After EuiccCard is moved to the platform, it can depend on
EuiccProfileInfo directly.

Bug: 70292228
Test: unit test
Change-Id: Ibe2c61ce9c4d2c99bac1cd9df8bb62414c46feee
2018-01-09 15:08:26 -08:00
Treehugger Robot
2f37060ee0 Merge "Add connection serivce focus api interface" 2018-01-09 22:54:42 +00:00
Jack Yu
9cd3b7b3f5 Exposed CDMA SID/NID get APIs
Made two existing hidden APIs getSystemId() and getNetworkId()
into public APIs.

Test: Telephony sanity tests
bug: 32718590
Change-Id: I436bd2699f8f805def753878d93e7dbf524e5f44
2018-01-09 12:25:52 -08:00