Commit Graph

20507 Commits

Author SHA1 Message Date
Hall Liu
634fd70147 DO NOT MERGE Fix build breakage
Remove the lines in system-current.txt that were mistakenly added during
conflict resolution.

Bug: 119675160
Test: compiles
Change-Id: I414ccc755e70675261c35fcdc38b98d310bb8f91
2018-12-04 14:07:05 -08:00
Hall Liu
78128395e7 resolve merge conflicts of 57a6375a99 to pi-dev-plus-aosp
Bug: 119675160
Test: None
Change-Id: Ib01e4549beca4fc237b7ea95aa9043536e1e1139
2018-12-04 18:55:18 +00:00
Hall Liu
239b0de673 Merge "Add API scaffolding for number verification" 2018-12-04 17:58:28 +00:00
Dario Freni
110abbf49a Merge changes from topic "apex_adb" am: f64909587b
am: 2d03586435

Change-Id: I217e06b2e131e6eb3f21c6f25207699f9b15b28f
2018-12-04 05:05:42 -08: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
74c52585f4 Merge changes from topic "sqlitez" am: a920b9c85e
am: fd5131bba5

Change-Id: Id9ca077e14373ad19b2ac98ce65a89ea3fc2873e
2018-12-02 11:56:50 -08:00
Jeff Sharkey
fd5131bba5 Merge changes from topic "sqlitez"
am: a920b9c85e

Change-Id: If22eef6e248b9e3bd1f5e22cd5081608494ad733
2018-12-02 11:32:48 -08: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
Shuo Qian
1054427c0c Merge "Remove static for getSubscriptionIds" am: 9a9dbf05e0
am: 0be2ef9746

Change-Id: I05f6d006c949cce7a4604390ec2a4cb170b5ffa5
2018-11-30 12:47:20 -08:00
Shuo Qian
9a9dbf05e0 Merge "Remove static for getSubscriptionIds" 2018-11-30 20:21:45 +00:00
Adrian Roos
739fbee3cb Merge "API: Make implicit APIs from type usage explicit" am: 6fc3189e37
am: 1f12c3112d

Change-Id: I9a9b76423c4ad531013b4a7c6f7c98c7b47b0a63
2018-11-30 08:56:53 -08:00
Adrian Roos
6fc3189e37 Merge "API: Make implicit APIs from type usage explicit" 2018-11-30 16:25:06 +00:00
Sooraj Sasindran
ab64d28254 Merge "API to switch preferred data" am: 98b78236d0
am: 5d128c3e26

Change-Id: Ie419367d7bbbde1ff69e6c28aa500ae8b8f2a198
2018-11-30 00:33:19 -08: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
03d0a6a289 Merge "Support set/get carrier id from ApnSetting" am: 72973de352
am: 3b195c1ef6

Change-Id: Ie11c7e05f72f6838565451aa9814fa6ffcd51e1b
2018-11-27 19:09:26 -08:00
Josh Hou
72973de352 Merge "Support set/get carrier id from ApnSetting" 2018-11-28 02:42:23 +00:00
Xiangyu/Malcolm Chen
a5c0f26e51 Merge "Clean up SubMgr#getOpportunisticSubscriptions." am: 103d515c80
am: b4750ecffa

Change-Id: Iab70b91e4a39c2c77d834977cdc4734875ae947b
2018-11-27 10:22:41 -08: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
b8ac0d31a9 Merge "Make MBMS group call API changes" am: 50cc796c28
am: 000e80e747

Change-Id: Ia9f198cb0b66cc7690ba9ff11f677b27714dd31d
2018-11-26 18:12:59 -08:00
Xiangyu/Malcolm Chen
f1a39cde78 Merge "Remove parentSubId and define API to set groupSubId" am: d413b5c713
am: e1015e70c4

Change-Id: I4ed0c97ac3961da37397ba1bd0ea24535a6764b8
2018-11-26 17:27:21 -08: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
5333436303 Merge "Expose ApnService as a SystemApi and use subId arg" am: 0e706db965
am: 6a0161a184

Change-Id: Ia1abe2d229a034ba0a77ac3dd7034ff3c13dde55
2018-11-26 15:40:03 -08: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
038ee2644b Merge "Add CarrierConfig to hide Preset APN setting details" am: 4d73d87d83
am: e7e0dcdabe

Change-Id: I8952ee0f6287f7a64075a2d633b8adf29d857f01
2018-11-26 13:51:16 -08:00
Youming Ye
4d73d87d83 Merge "Add CarrierConfig to hide Preset APN setting details" 2018-11-26 21:14:14 +00:00
Adrian Roos
27432dba6b API: Make implicit APIs from type usage explicit
API stubs generation implicitly made any types used by an API also part
of that API. This has caused DeviceIdAttestationException and
ImsFeature.Capabilities to become implicit APIs, so they are added to
the API files.

After this, using non-API types in APIs will become an error to prevent
implicit APIs occuring in the future.

Bug: 119556446
Test: METALAVA_PREPEND_ARGS="--error ReferencesHidden" make
Exempt-From-Owner-Approval: Identical CL has been approved on other branch
Change-Id: I5fe4f20502b8d4e287b28e9f07139456d4191e22
Merged-In: I5fe4f20502b8d4e287b28e9f07139456d4191e22
(cherry picked from commit 8f91e5fde8)
2018-11-22 15:22:09 +00:00
David Brazdil
7149b1e88c Merge "Create AppComponentFactory.instantiateClassLoader API" am: 67c6ab38ba
am: 060ec73ff2

Change-Id: I7c9f5fa3a9b1992b79cb26f77d03fddbf1ec6ff2
2018-11-22 03:50:07 -08:00
David Brazdil
67c6ab38ba Merge "Create AppComponentFactory.instantiateClassLoader API" 2018-11-22 11:09:15 +00:00
David Brazdil
e3ec08d1ae Merge "Update public API after libcore InMemoryDexClassLoader change" am: a21de6f376
am: e8fdc7a52a

Change-Id: I68034e435ce47caf2dd5bbf1f57af0b889b4fd55
2018-11-22 02:42:23 -08:00
David Brazdil
a21de6f376 Merge "Update public API after libcore InMemoryDexClassLoader change" 2018-11-22 10:09:19 +00:00
taiki tsutsumi
2ee968289e Add CarrierConfig to hide Preset APN setting details
Add new key to hide Preset APN setting details. When the key is set to
true, Preset APN is still shown and selectable in APN list, however,
user cannot enter APN editor view. It means details of Preset APN will
be hidden from user.

Test: manual - check Preset APN setting details are hidden
Bug: 115453290
Change-Id: I8a5c6f92f876d349b304acf89b4ffab86ff3f24b
2018-11-21 15:41:49 -08:00
Brad Ebinger
c61177a53e Merge "Expose ImsMmTelManager APIs as SystemApi" am: 8a3518cc90
am: 674804fcff

Change-Id: Ib2d83d265a977834bf6ed2fc843be61d9d6993a4
2018-11-21 11:21:58 -08:00
Brad Ebinger
8a3518cc90 Merge "Expose ImsMmTelManager APIs as SystemApi" 2018-11-21 18:59:33 +00:00
Neil Fuller
f35dd4fa6c Merge "API for retrieving time zone IDs by country" am: 4492ec573a
am: b5ab9c2e1f

Change-Id: I69b477e36d760e5d06c232fc7fd0891d98dd52b6
2018-11-21 07:55:55 -08:00
Neil Fuller
4492ec573a Merge "API for retrieving time zone IDs by country" 2018-11-21 15:18:27 +00:00
David Brazdil
12a95bafe7 Update public API after libcore InMemoryDexClassLoader change
Bug: 35458580
Test: compiles
Change-Id: I7debcedac0a6e8b2cfaa8b2dca5f88aebdd32910
2018-11-21 11:17:38 +00:00
Jack Yu
af2218bde6 Merge "Move hidden APIs into system APIs" am: 860d8d0d80
am: c3375240ba

Change-Id: Ibe6fa27d99791e57b1253a9dc990de0706b52fb6
2018-11-20 19:04:24 -08:00
Jack Yu
860d8d0d80 Merge "Move hidden APIs into system APIs" 2018-11-21 02:40:30 +00:00
Brad Ebinger
fd88080d22 Expose ImsMmTelManager APIs as SystemApi
Bug: 116493310
Bug: 112538960
Bug: 112866475
Test: Telephony unit tests
Change-Id: I698d9ab6000dc2e2e9be8d614e94d59b3a8e3028
2018-11-20 13:59:37 -08:00