Commit Graph

6900 Commits

Author SHA1 Message Date
Treehugger Robot
42ab50d14b Merge "Improve BaseBundle#kindofEquals" 2020-02-18 23:56:30 +00:00
Yo Chiang
d25e639b4e Add getAvbPublicKey to IDynamicSystemService
Wrapper for IGsiService::getAvbPublicKey()

Bug: 146418878
Test: Build pass
Change-Id: I67030bf0587297dc20e791c856c7373d473ae027
2020-02-18 18:32:44 +08:00
Suprabh Shukla
3b413dd57e Improve BaseBundle#kindofEquals
If both BaseBundles are empty, we can infer that without needing to
unparcel any of them.

Test: atest FrameworksCoreTests:android.os.BundleTest

Bug: 146037505
Change-Id: I04c28cdd1293227d9887b0c17e178f61328c1959
Merged-In: I04c28cdd1293227d9887b0c17e178f61328c1959
2020-02-14 14:05:00 -08:00
Florian Mayer
5845bdf66e Do not disable tracing in zygote.
We now use the sequence number of the atrace tag rather than a Binder
transaction, so zygote can observe changes to the tags.

Test: m
Bug: 137366208
Bug: 147667830

This is a cherry-pick of e38797be84.

Change-Id: I50e32a19c538dd255097c035836504b4746b172b
Merged-In: I50e32a19c538dd255097c035836504b4746b172b
2020-02-12 17:35:15 +00:00
Neil Fuller
f5f137b9d3 Merge "Remove System APIs not required for R" 2020-02-05 11:56:20 +00:00
Yo Chiang
935dfd2ce9 Merge "Add getExtension to android.os.IBinder interface" 2020-02-04 22:17:24 +00:00
Treehugger Robot
715e754115 Merge "Allow credstore to call into KeyAttestationApplicationIdProviderService" 2020-02-04 21:31:31 +00:00
Neil Fuller
4222b7bec8 Remove System APIs not required for R
Test: treehugger
Bug: 148842434
Merged-In: If022a726a058a90cb5446d220628c76800da8e96
Change-Id: If022a726a058a90cb5446d220628c76800da8e96
2020-02-04 21:21:34 +00:00
David Zeuthen
117fcb6c33 Allow credstore to call into KeyAttestationApplicationIdProviderService
This was previously reserved for keystore only but since credstore
also needs to do attestations, this is needed.

Bug: 111446262
Test: atest android.security.identity.cts
Test: Manually verifying the AttestationApplicationId from credstore
Change-Id: Ie44f9e4c8f2e1bd916ccbe7c7e5537dc498d8154
2020-02-04 10:18:33 -05:00
Treehugger Robot
75b7e58c47 Merge changes Ib7daba9c,Ib692bff0
* changes:
  UpdateEngine: add WorkerThread annotation.
  UpdateEngine.AllocateSpaceResult: rename functions
2020-02-03 19:55:48 +00:00
Yo Chiang
b031685032 Add getExtension to android.os.IBinder interface
Provide a mechanism to extend and customize a binder interface without
having to modify the original (base) interface.
See the full motivation here: aosp/1099664

Bug: 147834064
Test: atest FrameworksCoreTests:BinderTest FrameworksCoreTests:BinderProxyTest
Change-Id: Idd3595b1302cf7ac0590d064e795ba0b75811af6
2020-02-03 16:07:35 +08:00
Yifan Hong
f64f31e7be UpdateEngine: add WorkerThread annotation.
Add @WorkerThread to allocateSpace and cleanupAppliedPayload
because they take a non-trivial amount of time.

Bug: 148486809
Test: builds
Change-Id: Ib7daba9c662b9e141430df71401d069577221b8a
2020-01-29 17:44:49 -08:00
Yifan Hong
e8380c9876 UpdateEngine.AllocateSpaceResult: rename functions
Rename functions from X() to getX().

Also update docs.

Bug: 148486809
Test: builds

Change-Id: Ib692bff06bcf0018826e78b28f0a9b2ed0431060
2020-01-29 17:44:47 -08:00
Nikita Ioffe
169fbf6d5c Add @RequiresPermission annotation to reboot APIs
Test: builds
Bug: 148286076
Fixes: 148286076
Change-Id: If58234a2197655c51b8aa43d6966097046f5030a
2020-01-27 10:58:30 +00:00
Barani Muthukumaran
add57fcc09 Provide secret to vold to remove credential
vold requires the secret to retrieve the CE key
to re-wrap without auth when the user removes
the credential.

Test: Set credential, remove credential, swipe to none
and vice-versa.
Unit tests under locksettings

Bug: 26948053
Merged-In: I14503404ddd330cced2f2ff0e8f500cbe3f96e28
Change-Id: I14503404ddd330cced2f2ff0e8f500cbe3f96e28
2020-01-24 00:43:57 +00:00
Lev Rumyantsev
5f30976b8c Merge changes from topic "native_bridge_for_app_zygote"
* changes:
  Zygote: support native-bridge for app-zygote
  AppZygote: start with the correct instruction set
2020-01-21 23:09:34 +00:00
Treehugger Robot
301beddcdb Merge "Vibrator: Have Always-On Check DND/LowPower Modes" 2020-01-17 01:39:04 +00:00
Treehugger Robot
03e365f649 Merge "Improve DSU log and notification message" 2020-01-16 12:15:26 +00:00
Po-Chien Hsueh
bcf2adb424 Improve DSU log and notification message
Improve DSU installation service's status log message. And, use
Notification.BigTextStyle for DSU notification message.

Bug: 132924741
Test: Run DSU installation
Change-Id: I9e821edfeff88a1f4084a005de3e0f4264338996
2020-01-16 13:52:57 +08:00
Howard Chen
69d181aecc Merge "Support multiple DSU installations" 2020-01-16 05:33:10 +00:00
Harpreet \"Eli\" Sangha
9adedac3b9 Vibrator: Have Always-On Check DND/LowPower Modes
Bug: 145961380
Test: Verify always-on settings changes via dumpsys.
Change-Id: I201f04ef1c2bdf7f10961e8c3d9b47cb7a815f11
Merged-In: I201f04ef1c2bdf7f10961e8c3d9b47cb7a815f11
Signed-off-by: Harpreet \"Eli\" Sangha <eliptus@google.com>
2020-01-16 02:11:20 +00:00
Lev Rumyantsev
041f016971 AppZygote: start with the correct instruction set
This allows triggering native-bridge initialization if needed.

Test: CtsExternalServiceTestCases
android.externalservice.cts.ExternalServiceTest
testBindExternalServiceWithZygote
for Q.sdk_gphone_x86_arm.armeabi-v7a
Bug: 143143718

Change-Id: If105c4283879407c4fcee33fa6086772d43609a3
2020-01-14 17:03:06 -08:00
Neil Fuller
efe063e5dc Expose time / time zone system apis for telephony
Expose system apis / permissions needed by the telephony module to
communicate with the system server for time and time zone detection.

There are also small improvements for @Nullable.

Bug: 147012511
Test: build only
Merged-In: I27e5aa4c594d5fbad0b6f043afb9e910dcba4349
Change-Id: I27e5aa4c594d5fbad0b6f043afb9e910dcba4349
(cherry picked from commit 2be7ac4531)
2020-01-14 19:30:40 +00:00
Howard Chen
c6f64c44eb Support multiple DSU installations
Bug: 144247097
Test: adb shell am start-activity \
        -n com.android.dynsystem/com.android.dynsystem.VerificationActivity \
        -a android.os.image.action.START_INSTALL \
        -d file:///storage/emulated/0/Download/system.raw.gz \
        --el KEY_SYSTEM_SIZE $(du -b system.raw|cut -f1) \
        --el KEY_USERDATA_SIZE 8589934592
Change-Id: Ib2f86039c4c0c1dae2bc94a702721572567bcbf2
2020-01-14 02:20:47 +00:00
Artur Satayev
bc3d8b9071 Use new UnsupportedAppUsage annotation.
Existing annotations in libcore/ and frameworks/ will deleted after the migration. This also means that any java library that compiles @UnsupportedAppUsage requires a direct dependency on "unsupportedappusage" java_library.

Bug: 145132366
Test: m && diff unsupportedappusage_index.csv
Change-Id: I534e3fd1305e2f4af076986770033478448a665c
Merged-In: I534e3fd1305e2f4af076986770033478448a665c
2020-01-13 12:39:59 +00:00
Treehugger Robot
fd1985993c Merge "Refine documentation for Process.setThreadPriority" 2020-01-10 09:48:44 +00:00
Treehugger Robot
c8f699d327 Merge "Update system api for applyPayload" 2020-01-10 08:31:59 +00:00
Neil Fuller
641fa6730a Merge "Rename android.util.TimestampedValue to android.os" 2020-01-10 08:11:14 +00:00
Rick Yiu
c3648a82f1 Refine documentation for Process.setThreadPriority
Add more description for the tid parameter.

Bug: 139521784
Test: compile
Change-Id: I5ccfef865d49207172df301520cf38e942e03e21
2020-01-10 07:51:31 +00:00
Neil Fuller
35cc296228 Rename android.util.TimestampedValue to android.os
Rename android.util.TimestampedValue to android.os to avoid dependency
from android.util onto android.os, which is disallowed by lint.

Bug: 147012511
Test: boot
Merged-In: I4b84db03c8ad24bbef63e45d6d15fb306a10364e
Change-Id: I4b84db03c8ad24bbef63e45d6d15fb306a10364e
(cherry picked from commit d159015e54)
2020-01-09 15:34:43 +00:00
Treehugger Robot
0104ce5293 Merge "(Backport) Pipe through featureId from caller to permission checks in telephony code" 2020-01-09 02:48:14 +00:00
Meng Wang
0204e4a08e Merge "PersistableBundle: writeToStream/readFromStream" 2020-01-08 23:47:40 +00:00
Philip P. Moltmann
06b07e9e25 (Backport) Pipe through featureId from caller to permission checks in telephony
code

Test: atest FrameworksTelephonyTests CtsAppOpsTestCases
Bug: 136595429
Fixes: 146350559
Change-Id: Ie58007cf2a4e4a39cdfd72822150efce71dfbe84
Merged-In: I7ef41e8961e48d40e5685c4a521e83cb20953e48
2020-01-08 14:16:54 -08:00
Meng Wang
2536134b12 PersistableBundle: writeToStream/readFromStream
Bug: 143911192
Test: manual sanity test
Change-Id: I208487d572c8148f28fac3307873dfdc90996ae1
2020-01-08 13:44:15 -08:00
Yifan Hong
d0c62b9dab Merge changes from topics "vab_allocate", "vab_wait"
* changes:
  Use @ErrorCode for UpdateEngineCallback
  Add @ErrorCode annotation to UpdateEngine APIs
  Add UpdateEngine.cleanupSuccessfulUpdate
  Add UpdateEngine.allocateSpace
2020-01-08 18:37:16 +00:00
Yifan Hong
f585f651ad Use @ErrorCode for UpdateEngineCallback
Test: TH

Change-Id: I26297984e40b66ff08e0c291bc1aa0e556fe6bcc
2020-01-03 13:08:46 -08:00
Yifan Hong
8e48e6d986 Add @ErrorCode annotation to UpdateEngine APIs
Test: TH

Change-Id: I3016132454ea38d2eaf69b907c726f46b2608509
2020-01-03 13:08:46 -08:00
Yifan Hong
2ce03276e7 Add UpdateEngine.cleanupSuccessfulUpdate
This API cleans up the merge and free up space after the
device has boot successfully into the new build for a
Virtual A/B update.

Bug: 138808328
Test: pass
Change-Id: Id4543906b06e6a8487f91955af85024d8a50a464
2020-01-03 11:18:04 -08:00
Yifan Hong
16d4554abc Add UpdateEngine.allocateSpace
This API preallocates space for a Virtual A/B update.

Test: pass
Bug: 138808058
Change-Id: I34e34fbf6ac63bd189abda4a45cdac84b0e109d0
2020-01-03 11:18:04 -08:00
Suren Baghdasaryan
2018bf03f9 Prevent double-counting of kernel stack size in dumpsys reports
When kernel is configured with CONFIG_VMAP_STACK=y kernel stacks are mapped
into process space and therefore already accounted as part of the value
returned by ReadVmallocInfo and reported under MEMINFO_VM_ALLOC_USED
category. Introduce isVmapStack function to check if kernel is configured
with that option and if so do not exclude kernel stack size in the
calculation of memory used by kernel.

Bug: 146088882
Test: dumpsys meminfo with CONFIG_VMAP_STACK enabled and disabled
Change-Id: I9230bbf0ab05524cf52ded35171fd9ec3da16fa0
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
2020-01-02 13:36:34 -08:00
Jon Spivack
b2d8eb58a2 Merge "ServiceManagerProxy: New method implementations" 2019-12-23 20:04:33 +00:00
Treehugger Robot
afb16fa9d4 Merge "Use sysprop library for telephony props" 2019-12-20 02:00:38 +00:00
Nikita Ioffe
670352e807 Merge "Add an API to tell whenever device supports userspace reboot" 2019-12-19 23:44:06 +00:00
Suren Baghdasaryan
5911b9ef0a Add JNI API to query sizes of ION heaps, pools and mapped part of the heaps
Provide means for system_server to query ION memory usage. The new API
allows to get total size of ION heaps, pools and part of ION heaps that
is mapped into user space.

Bug: 138148041
Test: dumpsys meminfo
Change-Id: I6d76d534bbab5ee1646e8e3e3fe5210dcf76bc23
Merged-In: I6d76d534bbab5ee1646e8e3e3fe5210dcf76bc23
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
2019-12-19 19:48:42 +00:00
Yifan Hong
bdc465991f Merge "Delete VINTF compatibility checks during OTA." 2019-12-19 18:56:13 +00:00
Nikita Ioffe
717dbbf1a4 Add an API to tell whenever device supports userspace reboot
If device doesn't support userspace reboot then call to
PowerManager.reboot("userspace") will throw an
UnsupportedOperationException.

For the case of upgrading devices, Treble enforces that previous vendor
image should work with the new system image. Since userspace reboot
requires services to be stopped and restarted cleanly, which upgrading
devices might not be able to comply with, we need to have an API to
distinguish between devices that support userspace reboot and the ones
that do not.

Test: atest PowerManagerTest
Test: atest CtsUserspaceRebootHostSideTestCases
Bug: 138605273
Bug: 135984674
Change-Id: I8303f43ab29499eb2995f0256854c787055d9560
2019-12-19 17:26:19 +00:00
Yifan Hong
12ebf362b4 Delete VINTF compatibility checks during OTA.
Such checks uses old libvintf to parse new VINTF metadata, which is not
supported. The check is now moved to OTA package build time, so there is
no need to check it on the device.

Test: builds
Bug: 139300422
Change-Id: Ifaec06b5298f698958e5727316bf661d1960d0aa
2019-12-18 16:30:07 -08:00
Suren Baghdasaryan
5f8e17b3ef Include KReclaimable meminfo field into getMemInfo results
With new KReclaimable stat available in /proc/meminfo include it in
getMemInfo results so that it can be accounted in dumpsys meminfo reports.

Bug: 138148041
Test: dumpsys meminfo
Change-Id: Id475fcc0a63c6fc12ea64e08cec5cd24c83848a5
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
2019-12-18 14:55:41 -08:00
Treehugger Robot
65303aa385 Merge "vibrator: Support Always-On Effects" 2019-12-18 06:10:18 +00:00
Tianjie Xu
69301416c8 Update system api for applyPayload
As requested, the system API needs to use AssetFileDescriptor instead of
ParcelFileDescriptor. No need to change the AIDL.

This API was added by sony, and we are not using it right now.

Bug: 142426712
Test: build
Change-Id: I95c347f01fe50cc0973c2a90497a6f05ce38204b
2019-12-17 14:47:00 -08:00