Commit Graph

20453 Commits

Author SHA1 Message Date
Chen Xu
18b925a7af Merge "expose Carrier Id related APIs" 2018-12-17 20:56:54 +00:00
Chen Xu
610673690c Merge "public API for VideoProfile.CameraCapability with zoom" 2018-12-17 18:24:15 +00:00
Treehugger Robot
1d709c965b Merge "api/current.txt: Add SOCK_CLOEXEC and SOCK_NONBLOCK" 2018-12-15 00:26:55 +00:00
chen xu
055b1de272 public API for VideoProfile.CameraCapability with zoom
Bug: 120796998
Test: Build & CTS videoprofiletest
Change-Id: I12b3d1c510065666e2fdf5186d924e657f66d039
2018-12-14 15:27:31 -08:00
Jack Yu
cd67c02f1c Renamed data/net service provider onDestroy to close
Renamed them to avoid confusion with Android services'
onDestroy().

Test: Telephony sanity tests
Bug: 73659459
Change-Id: I05f68ced65498d6bfeb9e3c9ed3fb6164643bbaa
2018-12-14 00:22:02 -08:00
Nick Kralevich
ed4522b9a0 api/current.txt: Add SOCK_CLOEXEC and SOCK_NONBLOCK
Android makes the function socketpair() publicly visible, but never made
SOCK_CLOEXEC nor SOCK_NONBLOCK visible. Java socketpair() users have no
approved flag to ensure sockets are immediately created with O_CLOEXEC,
nor set the non-blocking status on sockets.

socketpair() documentation:
https://developer.android.com/reference/android/system/Os.html#socketpair(int,%20int,%20int,%20java.io.FileDescriptor,%20java.io.FileDescriptor)

Test: compiles
Bug: 120983106
Change-Id: Id7d1c853f3b00d6766ecf6dd88141da136011d6b
2018-12-13 16:07:20 -08:00
Jesse Fuentes
b9c35c1c0c Propagation of additional Ims Call Fail Causes
-Added new ImsReasonInfo error codes
-Add the new error codes in system-current.txt

Test:Manual
Bug:115925183

Change-Id: Id10651d08de2b77f0562e3c8733be76032a9611e
2018-12-12 17:49:50 -08:00
chen xu
64c1d7649a expose Carrier Id related APIs
1. expose public API for preciseCarrierId and preciseCarrierIdName
2. expose public API for carrier id in CarrierIdentifier
3. New public broadcast for precise carrier identity changed
4. clean up

Bug: 110559381
Test: unit test & atest CtsTelephonyTestCases:TelephonyManagerTest
Change-Id: I18f8bc3252632bba699829c6c577d1041335fee9
Merged-in: I18f8bc3252632bba699829c6c577d1041335fee9
2018-12-12 14:34:09 -08:00
Jordan Liu
97c68169b8 Merge "Add API to get card ID for default eUICC" 2018-12-12 22:20:03 +00:00
Michele Berionne
ac9e1f5580 Merge "Remove @hide annotation from KEY_CARRIER_CONFIG_VERSION_STRING" 2018-12-12 18:58:28 +00:00
Adrian Roos
6115769c16 API: Clean up redundant and ineffective usages of SystemApi and TestApi
Everything that is marked SystemApi or TestApi, but not @hide is still
part of the public SDK, it is therefore not sound to have that combination.

In the future, specifing such a combination will be considered an error
to prevent inadvertently exposing SystemApi and TestApi as public API.

Bug: 115333477
Change-Id: Ibd5d6a22862fdbc1e20a1cb3925280f5a682edea
Merged-In: Ibd5d6a22862fdbc1e20a1cb3925280f5a682edea
Test: METALAVA_PREPEND_ARGS="--error UnhiddenSystemApi" m checkapi
Exempt-From-Owner-Approval: API cleanup
2018-12-12 15:02:26 +01:00
Brad Ebinger
91bd02534a Merge "Changes to IMS SS API to better fit API standards/" 2018-12-11 22:57:26 +00:00
Jordan Liu
2fe9e3748a Add API to get card ID for default eUICC
getCardIdForDefaultEuicc() returns the cardId of the default eUICC.

Bug: 80097562
Test: manual, UiccControllerTest
Change-Id: Iee001ce354184dff4862a92b6bda261797c19e56
2018-12-11 13:35:08 -08:00
Michele Berionne
a04da3ede8 Remove @hide annotation from KEY_CARRIER_CONFIG_VERSION_STRING
Remove @hide annotation from KEY_CARRIER_CONFIG_VERSION_STRING, so that
it can be used by applications.

Bug: 116527591
Test: Verified compilation.
Change-Id: I6ca2c89ed68ac190dc14a39ae4d9102632ad000a
2018-12-11 10:58:05 -08:00
Hall Liu
f3935f0268 Merge changes from topic "acct-suggestion-1"
* changes:
  Add docs and more annotations
  Add PhoneAccountSuggestion class
2018-12-11 02:43:16 +00:00
Hall Liu
34d9e24008 Add docs and more annotations
Add docs to some constants in PhoneAccountSuggestion and add @TestApi
annotations to enable CTS testing for the new APIs.

Test: compiles
Bug: 111455117

Change-Id: I2b55a411ff4f0da37eefa0996f7316ea53bca41d
2018-12-10 18:41:01 -08:00
Pengquan Meng
8f9f382c9c Merge "Add 5G rat type" 2018-12-10 22:00:35 +00:00
Ivan Chiang
17f9b9bfb6 Merge "Expose Uri toSafeString api" 2018-12-10 14:32:36 +00:00
Etan Cohen
7f50b11c89 Merge "[CS] Add a generic transport-specific information API" 2018-12-09 03:53:44 +00:00
Tony Huang
72285d3eb2 Expose Uri toSafeString api
Expose toSafeString api as public and stand api.

Bug: 119153962
Test: atest UriTest
Change-Id: Id9da309193c1e175e5fc795570687735c7722689
2018-12-08 04:35:23 +00:00
Pengquan Meng
6b849c2acd Add 5G rat type
This add a new rat type for 5G.

Bug: 111453000
Test: build
Merged-In: I57366a1a9f61278cf752c25d54a1af1830bf4575
Change-Id: I57366a1a9f61278cf752c25d54a1af1830bf4575
2018-12-07 21:44:58 +00:00
Brad Ebinger
c9a6aab65d Changes to IMS SS API to better fit API standards/
Bug: 120072087
Test: Manual
Change-Id: Ibcc9b2a39f3f736cf385343aa1ab82174ea73a39
2018-12-07 13:22:01 -08:00
Etan Cohen
ca9fb56ee4 [CS] Add a generic transport-specific information API
Add a generic transport-specific information container interface and
access methods. These can be used by a network factory to pass transport
(bearer)-specific network parameters to the app.

Bug: 117605977
Test: atest frameworks/base/tests/net/java/android/net (+new unit tests)
Change-Id: Ib7c83b677e1c02a2212265719813e648b0c9cc1b
2018-12-07 17:37:48 +00:00
Hall Liu
066612a910 Add PhoneAccountSuggestion class
Add parcelable data class for the phone acct suggestion feature.

Test: TBD
Bug: 111455117
Change-Id: I6d5368133abfc076ccb2e6ddfff70de8b6a56e8f
2018-12-06 18:19:48 -08:00
Chen Xu
310b9ea8d5 Merge "address API council feedbacks for Telephony.Carriers" 2018-12-06 21:45:47 +00:00
Treehugger Robot
c3d4693f79 Merge "UpdateAvailableNetworks apis" 2018-12-05 19:16:39 +00:00
Sooraj Sasindran
a3ab858fda UpdateAvailableNetworks apis
Provide API to inform available networks

Bug: 117982838
Test: make and unit test
Merged-In: I9de1f767560551914de80031c1675d7e03b09775
Change-Id: I9de1f767560551914de80031c1675d7e03b09775
2018-12-04 23:56:04 +00:00
Hall Liu
239b0de673 Merge "Add API scaffolding for number verification" 2018-12-04 17:58:28 +00:00
Dario Freni
e8129a31bb Add MATCH_APEX flag to getInstalledPackages.
If set, PackageManager will query apexservice and ask for activated
packages.

Test: wrote a small app to test the new query.
Bug: 117589375
Merged-In: I498bd97896f3eab65c88e9684874a30713be585e
Change-Id: I498bd97896f3eab65c88e9684874a30713be585e
2018-12-03 22:29:31 +09:00
Jeff Sharkey
0da04839b7 Support for appending "standalone" WHERE chunks.
The existing appendWhere() methods aren't very friendly for
developers, since they require manual tracking of state to decide if
subsequent standalone chunks should be prefixed with "AND".

While it's tempting to offer direct argument binding on the builder
class, we can't really deliver on that API in a secure way, so instead
add separate bindSelection() method which explicitly burns arguments
into a standalone selection string, which can then be appended to
the builder.

This was the last piece of new functionality being used by
SQLiteStatementBuilder, so we can delete that class and migrate
users back to SQLiteQueryBuilder.

Bug: 111268862
Test: atest frameworks/base/core/tests/coretests/src/android/database/DatabaseUtilsTest.java
Test: atest frameworks/base/core/tests/utiltests/src/com/android/internal/util/ArrayUtilsTest.java
Test: atest cts/tests/tests/provider/src/android/provider/cts/MediaStore*
Test: atest cts/tests/tests/database/src/android/database/sqlite/cts/SQLiteQueryBuilderTest.java
Merged-In: I418f24338c90bae8a9dad473fa76329cea00a8c5
Change-Id: I418f24338c90bae8a9dad473fa76329cea00a8c5
2018-12-01 17:23:05 -07:00
Jeff Sharkey
8a634372b3 Bind update() args as Object[] for performance.
It's wasteful to convert them to String when SQLite already knows
how to bind specific data types, including funky types like byte[].

Also promote to public API, since they're generally useful.

Bug: 111085900
Test: atest packages/providers/DownloadProvider/tests/
Test: atest cts/tests/app/src/android/app/cts/DownloadManagerTest.java
Test: atest cts/tests/tests/database/src/android/database/sqlite/cts/SQLiteQueryBuilderTest.java
Merged-In: I5b418bca1204773fd2795156a2f47906ca1e1a6b
Change-Id: I5b418bca1204773fd2795156a2f47906ca1e1a6b
2018-12-01 17:23:05 -07:00
Jeff Sharkey
6c90f1ded2 Revert SQLiteQueryBuilder for now.
We've encountered subtle bugs in how apps are using this public
API, so revert it back to exactly what shipped in the last
release, and move functionality to new SQLiteStatementBuilder
class, since we already have several customers using it.

Test: atest cts/tests/tests/provider/src/android/provider/cts/MediaStore*
Test: atest cts/tests/tests/database/src/android/database/sqlite/cts/SQLiteQueryBuilderTest.java
Bug: 111486645
Merged-In: Ief059e987f2421e19f6f57a94320c313946a26d7
Change-Id: Ief059e987f2421e19f6f57a94320c313946a26d7
2018-12-01 17:23:04 -07:00
Jeff Sharkey
55777e52df Add support for appending standalone phrases.
When users are building queries, they often need to append several
standalone SQL clauses, and it's tedious to track their first clause
so they can manually append " AND " to each subsequent clause.

So add new appendWherePhrase() API which appends a standalone phrase
which is AND'ed together with any existing WHERE query.

Also fix bug in update() which would turn null values into the
string literal "null" instead of passing them through as SQL NULL.

Test: atest cts/tests/tests/database/src/android/database/sqlite/cts/SQLiteQueryBuilderTest.java
Bug: 111085900
Merged-In: Ia280dd864895654239503e080eaef925f5620d37
Change-Id: Ia280dd864895654239503e080eaef925f5620d37
2018-12-01 17:23:04 -07:00
Jeff Sharkey
3e26b7db55 Extend SQLiteQueryBuilder for update and delete.
Developers often accept selection clauses from untrusted code, and
SQLiteQueryBuilder already supports a "strict" mode to help catch
SQL injection attacks.  This change extends the builder to support
update() and delete() calls, so that we can help secure those
selection clauses too.

Extend it to support selection arguments being provided when
appending appendWhere() clauses, meaning developers no longer need
to manually track their local selection arguments along with
remote arguments.

Extend it to support newer ContentProvider.query() variant that
accepts "Bundle queryArgs", and have all query() callers flow
through that common code path.  (This paves the way for a future
CL that will offer to gracefully extract non-WHERE clauses that
callers have tried smashing into their selections.)

Updates ContentValues to internally use more efficient ArrayMap.

Bug: 111268862
Test: atest frameworks/base/core/tests/utiltests/src/com/android/internal/util/ArrayUtilsTest.java
Test: atest cts/tests/tests/database/src/android/database/sqlite/cts/SQLiteQueryBuilderTest.java
Merged-In: I60b6f69045766bb28d2f21a32c120ec8c383b917
Change-Id: I60b6f69045766bb28d2f21a32c120ec8c383b917
2018-12-01 17:23:04 -07:00
chen xu
7ebcd78e90 address API council feedbacks for Telephony.Carriers
Bug: 118296421
Test: telephony unit test
Change-Id: Ib26db49e5fa6891c2176124681172c271e6cc423
Merged-in: Ib26db49e5fa6891c2176124681172c271e6cc423
2018-11-30 13:29:55 -08:00
Shuo Qian
9a9dbf05e0 Merge "Remove static for getSubscriptionIds" 2018-11-30 20:21:45 +00:00
Adrian Roos
6fc3189e37 Merge "API: Make implicit APIs from type usage explicit" 2018-11-30 16:25:06 +00:00
Treehugger Robot
98b78236d0 Merge "API to switch preferred data" 2018-11-30 01:29:39 +00:00
Hall Liu
5314036bb1 Add API scaffolding for number verification
Add the PhoneNumberRange and NumberVerificationCallback classes. Add a
method in TelephonyManager to activate the API, but it does nothing for
now.

Bug: 119675160
Test: todo
Change-Id: I3ccd62b47f02a3aa324b675fdb16c8e7a1e9feec
2018-11-29 17:20:02 -08:00
sqian
d8c30b9a80 Remove static for getSubscriptionIds
Bug: 118675557
Test: compile
Change-Id: Id2ba95331f87115daf6c0c074faccf812a1661c9
Merged-In: Id2ba95331f87115daf6c0c074faccf812a1661c9
(cherry picked from commit 705dec5255)
2018-11-28 12:11:52 -08:00
Josh Hou
72973de352 Merge "Support set/get carrier id from ApnSetting" 2018-11-28 02:42:23 +00:00
Xiangyu/Malcolm Chen
103d515c80 Merge "Clean up SubMgr#getOpportunisticSubscriptions." 2018-11-27 18:01:58 +00:00
Josh Hou
73ada28be9 Support set/get carrier id from ApnSetting
To align with using carrier id instead of mccmnc and mvno for APN
settings, add new public api setCarrierId and getCarrierId

Bug: 115709816
Test: run telephony unit test
Change-Id: Ia716a02dfa88996cb0539e34b411aab371ef8aa7
Merged-in: Ia716a02dfa88996cb0539e34b411aab371ef8aa7
2018-11-27 08:48:08 +00:00
Hall Liu
50cc796c28 Merge "Make MBMS group call API changes" 2018-11-27 01:06:55 +00:00
Xiangyu/Malcolm Chen
d413b5c713 Merge "Remove parentSubId and define API to set groupSubId" 2018-11-27 00:24:00 +00:00
Jordan Liu
0e706db965 Merge "Expose ApnService as a SystemApi and use subId arg" 2018-11-26 22:47:52 +00:00
Hall Liu
c81cba4e2b Make MBMS group call API changes
Change the API to respond to API council comments
See bug for details

Bug: 117145859
Test: CTS
Change-Id: I4342e6e95da57fbcd550c571357ff7bc1923b70a
2018-11-26 14:37:56 -08:00
Malcolm Chen
aea9b02a22 Remove parentSubId and define API to set groupSubId
Bug: 118349116
Test: unittest
Change-Id: I539a67df8f30c2f58d87a3417f78fef8b43ff56d
Merged-In: I539a67df8f30c2f58d87a3417f78fef8b43ff56d
2018-11-26 14:13:10 -08:00
Sooraj Sasindran
3535f43518 API to switch preferred data
Provide API to switch preferred data between default subscription
and opportunistic subscription.

Bug: 118491136
Test: make and called the APIs using setting app
Merged-In: Ic4f7a0aac6f7e1234c30aaee2fed177dbd5e53cd
Change-Id: Ic4f7a0aac6f7e1234c30aaee2fed177dbd5e53cd
2018-11-26 22:08:18 +00:00
Youming Ye
4d73d87d83 Merge "Add CarrierConfig to hide Preset APN setting details" 2018-11-26 21:14:14 +00:00