432081 Commits

Author SHA1 Message Date
Artur Satayev
fc46be7dbd Add @UnsupportedAppUsage annotations for greylist.
go/cleanup-greylist-txt

These have already been greylisted, however due to bugs/omissions in the tooling have been kept in go/greylist-txt instead of being annotated in the code.

Bug: 137350495
Test: m

Change-Id: Id6c1f5e403a0e66edb1102ee45f3bf19f244fb09
Merged-In: Id6c1f5e403a0e66edb1102ee45f3bf19f244fb09
2019-11-08 16:17:13 +00:00
Artur Satayev
ee9c6e7571 Add @UnsupportedAppUsage annotations for max-p.
See go/UnsupportedAppUsage for more details.

These have already been greylisted, however due to bugs/omissions in the tooling have been kept in go/greylist-txt instead of being annotated in the code.

Bug: 137350495
Test: m
Change-Id: I5aa29a49b193db47aaee4d3a756c17f48cc9f0b1
Merged-In: I5aa29a49b193db47aaee4d3a756c17f48cc9f0b1
2019-11-08 16:17:13 +00:00
Treehugger Robot
f363f3549e Merge "Add new SystemApi methods for mainline" 2019-11-08 15:46:53 +00:00
Treehugger Robot
c03b91a7ef Merge "MediaCodec: Release lock before calling onFrameRendered()" 2019-11-08 13:34:42 +00:00
Donald Chai
6e914e8baf Merge "Fix computation of 'entry_length' in AAPT2 container format" 2019-11-08 06:13:54 +00:00
Donald Chai
39146bcc18 Merge "[aapt2] Fix infinite loop in proguard::CollectLocations" 2019-11-08 06:08:26 +00:00
Donald Chai
6f613875a1 Fix computation of 'entry_length' in AAPT2 container format
When the protobuf header (or data payload) size are a multiple of 4,
"entry_length" (called "aligned size" in the code) would have counted bytes that
are never actually written.

Bug: 139418052
Change-Id: Ia688a82a67f3807f7feb0be03670bf2827b1d6a1
(cherry picked from commit b99e50922bf8a5eb9f034c1d232646fda122e83c)
2019-11-08 05:15:38 +00:00
Donald Chai
34ebc8f435 [aapt2] Fix infinite loop in proguard::CollectLocations
std::set only works correctly when the < comparator is a strict weak
ordering, while UsageLocation::operator< was actually implementing !=.

Bug: 134190468
Change-Id: Icb9407e9c8451f9fcb4eb9b2cea310e3bcaf159e
Tested: aapt2_tests, and b/134190468#comment1
(cherry picked from commit 44fa342eb91b90df7998fa2808e21af75aafaf39)
2019-11-08 05:13:53 +00:00
Hall Liu
d2f962a6db Add new SystemApi methods for mainline
Add new SystemApi methods for Telecom to call in lieu of the old @hide
methods. Also moved CallerInfo and CallerInfoAsyncQuery to Telecom
because there are no more users in Telephony.

Bug: 141576016
Test: CTS
Change-Id: I458ba6bcfc03db72c0419b0cab2f0d0adfa971d4
Merged-In: I458ba6bcfc03db72c0419b0cab2f0d0adfa971d4
2019-11-07 17:22:28 -08:00
Lucas Lin
c000664c7c Merge "[NS01] Create NetworkScore" 2019-11-08 00:47:22 +00:00
Brad Ebinger
5a844a16a3 Merge changes from topic "cp_smsmessage"
* changes:
  Add Verstat support for incoming call number verification.
  Add new result codes
2019-11-08 00:14:37 +00:00
Pawin Vongmasa
5a07fb4e59 MediaCodec: Release lock before calling onFrameRendered()
Test: atest CtsMediaTestCases -- \
--module-arg CtsMediaTestCases:size:small

Bug: 143672592
Change-Id: I4fb55eb8a90913544a793097c977fee539e09776
2019-11-07 15:54:54 -08:00
Treehugger Robot
a5e26c955b Merge "[aapt2] Pseudolocalize <plurals> values." 2019-11-07 22:59:41 +00:00
Jordan Liu
501a618b3e Merge "Release mDrmManagerClient in PduPersister release" 2019-11-07 20:13:00 +00:00
satayev
85fe6364a7 Merge "Revert submission" 2019-11-07 20:01:08 +00:00
satayev
5f68edff7f Revert submission
Reason for revert: breaks https://ci.chromium.org/p/art/builders/ci/angler-armv7-non-gen-cc/443

Bug: 140367850
Change-Id: I707dbb8a6f53d1c5e1d83596348d6eedc3186eb3
2019-11-07 19:56:39 +00:00
Steven Moreland
fb95396170 Merge "vibrator: reflect CAP_EXTERNAL_AMPLITUDE_CONTROL" 2019-11-07 19:18:08 +00:00
Treehugger Robot
c26568d8a7 Merge "Deprecate AsyncTask" 2019-11-07 18:35:05 +00:00
Donald Chai
98c6138c70 [aapt2] Pseudolocalize <plurals> values.
(.won slaer roF)

Bug: 134190774
Test: aapt2_tests
Change-Id: If307af4adfb1d556c41d7cb08590d1c25287f992
(cherry picked from commit 4c3da0f8a4e3db7ae6a0dff3888d7faab3198bb1)
2019-11-07 10:32:09 -08:00
Treehugger Robot
c29a5cf115 Merge changes from topic "apex_migration"
* changes:
  Implement ApexManager UnitTest
  Refine getPackageInfo for Apex match policy
  ApexManager: Post populateAllPackagesCacheIfNeeded to a background thread
  Move expensive code from BroadcastReceiver to background thread
2019-11-07 18:25:50 +00:00
Treehugger Robot
8ab35ca19d Merge "Refactor BluetoothAdapter APIs used by Settings" 2019-11-07 18:18:37 +00:00
Treehugger Robot
0bc7ae7069 Merge "BugFix: add synchronized protection" 2019-11-07 18:13:51 +00:00
Andrei-Valentin Onea
f72b72b126 Merge "Revert "Revert "Example for disabling changes at test time""" 2019-11-07 17:39:51 +00:00
Treehugger Robot
d4c8842a8a Merge "Remove unnecessary --hide-package options" 2019-11-07 12:07:04 +00:00
Bill Lin
423379c9d6 Implement ApexManager UnitTest
Create ApexManagerTest.java for ApexManager

Fixes: 136247730
Fixes: 142384111
Test: atest ApexManagerTest
Test: atest CtsStagedInstallHostTestCases
Change-Id: Ie4ef02cbd993d97a6e407a508ef33ee219c3fbb9
2019-11-07 11:55:06 +00:00
Bill Lin
2ad8ac375c Refine getPackageInfo for Apex match policy
The legacy match policy could confuse, for example,
the naming of MATCH_APEX do not named with "ONLY|FACTORY|ACTIVE",
it's make sense to joint both active and factory apexes.

Policy refined:
1. MATCH_FACTORY_ONLY : Return *factory* [eg. the version on the system image] APK packages only
2. MATCH_APEX : Return *active* APK or APEX packages
3. MATCH_FACTORY_ONLY | MATCH_APEX : Return *factory* APK or APEX packages
4. NONE (0) : Return *active* APK packages only

Fixes: 142365486
Bug: 142115351
Test: adb shell pm path $APEX_PKG_NAME
Test: adb shell pm path $APK_PKG_NAME
Test: adb shell pm list packages --apex-only
Test: atest ApexManagerTest
Test: atest CtsStagedInstallHostTestCases
Exempt-From-Owner-Approval: Already approved in
https://googleplex-android-review.git.corp.google.com/c/platform/frameworks/base/+/9524811/

Change-Id: I0077cc8dcabdcf7b67374e8b059b62158fa43714
Merged-In: Ifa01278201dd23672dfc1a30f67b888df9bc1bfd
2019-11-07 11:25:03 +00:00
lucaslin
c2bac51882 [NS01] Create NetworkScore
It's the first patch for refounding network selection. The new
network selection will try to compare the networks by more
factors, and will try to choose the best network after doing
the evaluation of trade-off.
Create the object that will serve to represent network quality
for more comprehensive ranking.

Bug: 143676287
Test: 1. Build pass.
      2. atest FrameworksNetTests

Change-Id: I4b6071d14365aa84d06be9802516fedf527e70f7
2019-11-07 16:47:56 +08:00
James Lin
303c5dc0fb Merge "[RCS] Create AIDL layer for RcsUceAdapter, create RCS UCE controller implementation in Telephony." 2019-11-07 03:26:08 +00:00
Bill Lin
8eacf37ef3 Merge changes from topic "apex_migration"
* changes:
  Clean up generatePackageInfoFromApex() API
  Populate error message if apexd.markStagedSessionReady fails
  Populate error message if apexd verification fails
  Make ApexManager an abstract class
  Don't use ApexInfo.packageName in StagingManager
2019-11-07 02:04:49 +00:00
Iris Chang
374a142e6e Release mDrmManagerClient in PduPersister release
In Mms test log we found StrictMode printed out DrmManagerClient was
not released, it was created in PduPersister constructor.

To fix this problem, call mDrmManagerClient.release in PduPersister.
release.

Bug: 143230740
Test: Edit and send MMS, not print this log again.
Change-Id: If3318c8e77d6272b9d83af57d910951055356d99
2019-11-07 09:08:30 +08:00
Steven Moreland
e29882bdfa Merge "vibrator: handle aidl HAL dying" 2019-11-07 00:24:57 +00:00
Steven Moreland
3c5a3af3de vibrator: reflect CAP_EXTERNAL_AMPLITUDE_CONTROL
For HIDL, vibrator may change the value of supportsAmplitudeControl
based on context. Since the interface is being redone in AIDL, we're
avoiding this changing value and providing capabilities for amplitudes
we expect to be available in different states.

Bug: 141828236
Test: boot
Change-Id: If1e38cffa3fd93f2a658c476637db2dd7ce9f91d
2019-11-07 00:10:26 +00:00
Steven Moreland
ee3a589204 vibrator: handle aidl HAL dying
Vibrator just tries to reconnect when commands fail, but because of the
HIDL->AIDL shim's handling of errors, we were dropping binder-level
errors, and the client code wasn't properly handling them. Now, we
convert dead object and other errors appropriately so that the client
code is given the errors it is expecting.

Bug: 141828236
Test: kill aidl vibrator HAL repeatedly, and ensure that it reconnects
    and starts handling vibrator commands.

Change-Id: I9719ec030f514905f1c5e57a1bdf455956d88e76
2019-11-06 15:41:07 -08:00
Treehugger Robot
d5ef2d61d1 Merge "API Lint: remove obsolete python linter" 2019-11-06 21:37:44 +00:00
Charles Munger
0a96c3b965 Deprecate AsyncTask
Change-Id: Ie142c281c48bda35f5c8fb01ec8a001e0229fd2e
BUG=144042891
2019-11-06 21:11:37 +00:00
Treehugger Robot
d3d5d5a962 Merge "Fix APN build" 2019-11-06 19:24:58 +00:00
Tyler Gunn
c2257b6d6f Add Verstat support for incoming call number verification.
Update ImsCallProfile to indicate the verstat for incoming calls.

Test: Run new GTS tests.
Bug: 135929421
Merged-In: I712a42836382e8929e40b887fd01c450a4096bab
Change-Id: I712a42836382e8929e40b887fd01c450a4096bab
2019-11-06 19:19:31 +00:00
Tom Taylor
4471d28a9f Add new result codes
Test: manually tested sending and receiving sms

Bug: 135755360

Merged-In: I711e86eb5a31902ba5b2e1b6df444b009aef2727
Change-Id: I711e86eb5a31902ba5b2e1b6df444b009aef2727
2019-11-06 10:33:33 -08:00
Brad Ebinger
bfc11892e1 Merge "Fix new registration APIs as per API council guidelines" 2019-11-06 18:28:44 +00:00
Andrei-Valentin Onea
95360cbd28 Revert "Revert "Example for disabling changes at test time""
This reverts commit 64d5222a95413f9872d2e4845771e2765353c08a.

Reason for revert: Fixed issues in https://r.android.com/1155184
Test: atest Gating
Change-Id: Iaca121b95fe498be0f1b269dd45d880351ff6526
2019-11-06 17:56:39 +00:00
Jordan Liu
f0e75a656c Merge "Add CDMA SCP message handling to CellBroadcast module" 2019-11-06 17:13:51 +00:00
Nikita Ioffe
9a2ded7ec2 ApexManager: Post populateAllPackagesCacheIfNeeded to a background thread
populateAllPackagesCacheIfNeeded is rather expensive method and
shouldn't be run in broadcast handler thread (it was my mistake to
suggest this in ag/9204784).

It's fine to use background thread to execute
populateAllPackagesCacheIfNeeded because components that need
to match APEX are not doing it on user critical path.

Bug: 138460874
Test: adb shell pm list packages --apex-only --show-versioncode
Change-Id: I738e932d94e86e897cee2b82f658d0e89328c6d3
Merged-In: Ib17fadb978f112c26c113e3bc42b9edaeeefca8a
2019-11-06 23:19:58 +08:00
Mohammad Samiul Islam
86e5311955 Move expensive code from BroadcastReceiver to background thread
Bug: 138460874
Test: atest apexservice_test
Test: atest CtsStagedInstallHostTestCases
Test: atest RollbackTest
Change-Id: I32fdd0fdadf14bc66b5587d03ccf5e82d0d56d52
Merged-In: I1cd7daa066f32832814c28423c5c30e39c230600
2019-11-06 23:19:53 +08:00
Oli Lan
1138012b54 Clean up generatePackageInfoFromApex() API
This changes the API for generatePackageInfoFromApex in PackageParser
in response to review suggestions made in ag/6701090.

The method is renamed to generatePackageInfo with a PackageParser.Package
parameter (as well as an ApexInfo and flags). The implementation is combined
with the main generatePackageInfo method. Callers are changed to perform
the parsing themselves, including the collection of certificates if
necessary.

Note: the method signature and implementation had already changed since
ag/6701090, so the suggestions from that CL may not apply directly.

Bug: 129261524
Test: atest PackageParserTest
Test: atest CtsStagedInstallHostTestCases

Change-Id: Iee213e025583c2201ff9d65c447e4278b925a2f0
Merged-In: I495539679812110f89d5e3d93f2622ba2dab36c0
(cherry picked from commit c2c7a22333b828cd3a630fe9efb1b18b0e6af289)
2019-11-06 23:15:21 +08:00
Nikita Ioffe
0d167a0750 Populate error message if apexd.markStagedSessionReady fails
Test: atest CtsStagedInstallHostTestCases
Bug: 136548037
Bug: 122952270

Change-Id: Ia7823c4334f77b3cd3f66f1c6a9f3cc32250b805
Merged-In: I6fde70418990ee27c1966619badc437c9bffb697
(cherry picked from commit ab4d7354ea374fed6261e107be90bb349ea48c49)
2019-11-06 23:15:15 +08:00
Nikita Ioffe
529f3d2ff4 Populate error message if apexd verification fails
Test: atest CtsStagedInstallHostTestCases
Test: adb install --wait system/apex/shim/com.android.apex.cts.shim.v2_wrong_sha.apex
Bug: 136548037
Bug: 122952270

Change-Id: I5ceb6a6c37d1222358de9c6f3261da64f8010658
Merged-In: I5ea596ea6417825845c16bbb6e26e9c13845139b
(cherry picked from commit 4e7d24a71a8ad25dc9b49c6da922702fb5ef11ff)
2019-11-06 23:15:07 +08:00
Nikita Ioffe
ca8f1c060e Make ApexManager an abstract class
And a two implementations:
* ApexManagerImpl - in case device supports updatable APEX.
* ApexManagerNoOp - in case device does not.

This is a more future-proof way of handling both new flow that supports
APEX and legacy one that does not.

Test: atest CtsStagedInstallHostTestCases
Bug: 131697251
Exempt-From-Owner-Approval: already approved in
https://googleplex-android-review.git.corp.google.com/c/platform/frameworks/base/+/8483219/

Change-Id: Ieeeb2c7f52ff63ebf9c7e913e95e7cf62d8c7441
Merged-In: If27fcdb95d4ec60834bd5334b68f53d4235a5d61
(cherry picked from commit 278af8f43c72a67dd9c471b159e5e184fb3e5f0d)
2019-11-06 23:15:01 +08:00
Nikita Ioffe
bf93ca7f35 Don't use ApexInfo.packageName in StagingManager
* ApexInfo.packageName has a misleading name since it represents name
  of apex module (e.g. com.android.tzdata), not the packageName from
  AndroidManifest.xml of an apex (e.g. com.google.android.tzdata). Later
  should be used in PackageManager-world while former is apexd-internal
  name.
* Restructured code a little bit to make the pre-reboot verification
  flow easier follow.

Test: atest CtsStagedInstallHostTestCases
Test: adb shell pull /system/apex/com.android.resolv.apex /tmp/resolv.apex &&
      adb install /tmp/resolv.apex &&
      adb reboot &&
      <verify staged session was applied>
Bug: 132324953

Change-Id: Ifd88b5e5df84ba7a6aebd70dced7b9ab48ed0159
Merged-In: Iedfe87f6e70a2e1d2792487ac7b2891693ceb72a
(cherry picked from commit e0dbc98f954be1661676436b18885bc2e7d29119)
2019-11-06 23:14:50 +08:00
Paul Duffin
7fb76966a4 Remove unnecessary --hide-package options
The com.android.okhttp and com.android.org.conscrypt packages are no
longer present in the input source so do not need hiding.

Bug: 142113521
Test: m checkbuild
Change-Id: I303b054ec114450b5fce3482eddf3cc3749d3814
2019-11-06 14:18:38 +00:00
satayev
eb6be3bd48 Merge "Plumb @TestApi enforcement policy to runtime." 2019-11-06 13:16:53 +00:00