Commit Graph

7530 Commits

Author SHA1 Message Date
Alex Buynytskyy
17d9da0523 Incremental installations in adb, DataLoader/device side.
Test: atest PackageManagerShellCommandTest PackageManagerShellCommandIncrementalTest
Test: adb install --wait --incremental ~/v4/v4-only-original.apk
Bug: b/136132412 b/133435829
Change-Id: I41b72021e3c7703b57b3e14f58d5aab6c1271f04
2020-02-13 13:03:13 -08:00
Alex Buynytskyy
8e9e6a3255 Signature streaming from local file, property to disable incremental.
+Tests

Test: atest PackageManagerShellCommandTest PackageManagerShellCommandIncrementalTest
Bug: b/136132412 b/133435829

Change-Id: I826900e120c72e7cdd0549c70da28d817982dcd3
2020-02-12 11:24:47 -08:00
TreeHugger Robot
98a201dcd9 Merge "Finalize @SystemApi annotation for StatsFrameworkInitializer (retry)" 2020-02-12 17:36:49 +00:00
Florian Mayer
fab4628666 Merge "Do not disable tracing in zygote." 2020-02-12 17:28:07 +00:00
Florian Mayer
e38797be84 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; flash; adb shell atrace dalvik | grep hprof
Bug: 137366208
Bug: 147667830

Change-Id: I50e32a19c538dd255097c035836504b4746b172b
2020-02-12 16:01:16 +00:00
Martijn Coenen
ca8106f200 Merge "Give installers/DownloadManager/MTP correct GIDs." 2020-02-12 08:14:19 +00:00
Makoto Onuki
553df30582 Finalize @SystemApi annotation for StatsFrameworkInitializer (retry)
Change-Id: I3c8bce84fbdbe4e65ec430eb5046a1a46cc6fbfb
Fix: 148225705
Test: build / treehugger
2020-02-11 16:26:18 -08:00
Alex Buynytskyy
f3b2e68fae Merge "Incremental installations in PackageManagerShellCommand." 2020-02-11 21:24:55 +00:00
Alex Buynytskyy
04f7391fc3 Incremental installations in PackageManagerShellCommand.
- onPrepareImage in native,
- allow to check installation type and choose native or managed
dataloaders,
- native data loader for Incremental,
- install-incremental shell command.

Test: atest PackageManagerShellCommandTest
Test: atest IncrementalServiceTest
Bug: b/136132412 b/133435829
Change-Id: I530a8a203fb50132c1869abd0b869036add18699
2020-02-11 13:11:31 -08:00
TreeHugger Robot
14e6a15b45 Merge "Access to Device Vibrator State" 2020-02-11 20:13:08 +00:00
Fiona Campbell
004e36da64 Merge "Add support for brightness as a float" 2020-02-11 18:51:02 +00:00
Martijn Coenen
bc3a5111d1 Give installers/DownloadManager/MTP correct GIDs.
On devices without sdcardfs, these classes of apps get the right storage
access by being a part of the correct group.

Bug: 146419093
Test: manually verify apps get the correct GID
Change-Id: I7021cbf8a2e84bda7a49519da36e84fcf3f479a8
2020-02-11 12:24:18 +01:00
Lee Shombert
ebe2a0baeb Binder cache for isUserUnlocked().
Bug: 140788621

Test: A special build that puts the PropertyInvalidatedCache in
verification mode was loaded on the device.  Then one iteration of MPTS
was executed.  No cache inconsistencies were found and no SELinux
violations (associated with the binder cache) were found.  The number of
cache misses was approximately 10% of the total binder calls.  All
binder calls went through the cache.  Added a new user and later deleted
the same user; verified that caches were invalidated as expected and no
errors were detected by the PropertyInvalidatedCache verification mode.

Passed the CtsMultiUserHostTestCases test.

Change-Id: I32e3e39768e288101c82b02e63a7eb20d5ed7f93
2020-02-11 01:58:37 +00:00
Chris Ye
473c84ff4c Access to Device Vibrator State
Add API to access vibrator state and vibrator state listener.

Bug: 135949568
Change-Id: I96636b432d581cea03a9fc9fecba4c08045f5006
2020-02-11 00:02:37 +00:00
Fiona Campbell
d4eb295196 Add support for brightness as a float
Change the framework to handle brightness as a float rather than an int.

Test: AutomaticBrightnessControllerTest
BrightnessConfigurationTest
BrightnessMappingStrategyTest
BrightnessUtilsTest
DevicePolicyManagerTest
DisplayManagerServiceTest
DisplayTest
DozeScreenBrightnessTest
PowerManagerTest
PowerManagerVrTest
SettingsProviderTest

Exempt-From-Owner-Approval: Changing param from int to float

Change-Id: I413641cd987c5ec8f82753c0388a33f85a9682de
2020-02-10 23:44:40 +00:00
Alex Buynytskyy
cd4d3875e2 Incremental install via adb.
- passing V4 signature to IncFS,
- cleanup and use InstallationFile everywhere,
- pass params to DataLoader creation,
- minor refactor for PackageManagerShellCommandDataLoader to prepare for
Incremental data loading.

Test: atest PackageManagerShellCommandTest
Bug: b/136132412 b/133435829
Change-Id: Iacc3e4c51c0fa3410b076147ce153a1303246189
2020-02-10 07:06:34 -08:00
TreeHugger Robot
0dff4461ac Merge changes from topic "statsd_libbinder_ndk"
* changes:
  Use StatsDimensionsValueParcel within statsd apex
  Use cpp aidl_interface within statsd
2020-02-08 03:33:25 +00:00
TreeHugger Robot
0bfb664126 Merge "Refactor GraphicsStatsService for updateability" 2020-02-08 00:00:36 +00:00
Ruchir Rastogi
56da4c3862 Use StatsDimensionsValueParcel within statsd apex
Because statsd now uses StatsDimensionsValueParcel instead of
StatsDimensionsValue.h/c, statsd no longer has to depend on libservices.

Test: m -j
Test: atest StatsdHostTestCases#testBroadcastSubscriber
Bug: 148604617
Change-Id: I6d65383ccec99f4672d6575232981c0f6cc40fcf
2020-02-07 15:55:11 -08:00
Songchun Fan
4889c7a823 Merge "Incremental native lib extraction" 2020-02-07 23:32:00 +00:00
Anna Trostanetski
35bbc9d4ba Merge "Introduce TRACE_TAG_APEX_MANAGER and add timing to getActiveApexInfos" 2020-02-07 19:56:02 +00:00
Songchun Fan
0f8b6fe950 Incremental native lib extraction
Basically we configure all the lib files inside Incremental Service,
e.g., create lib dirs, make lib files, extract original
lib file data from zip and then write data to the lib files on incfs.

Test: manual with incremental installation
BUG: b/136132412 b/133435829
Change-Id: I7544d2e78bcf3bdd76ce4c0766ec31ff13fd2011
2020-02-07 11:35:48 -08:00
Adam Bookatz
688689eb58 Merge "Make UM.hasBaseUserRestriction @TestApi" 2020-02-07 18:04:51 +00:00
Stan Iliev
c90438175f Refactor GraphicsStatsService for updateability
Move GraphicsStatsService to android.graphics package.
Move GraphicsStatsService JNI from libservices.core to
libandroid_runtime.
Declare GraphicsStatsService ctor as the only @SystemApi.
Remove MemoryFile usage from GraphicsStatsService, but use
SharedMemory and other SDK APIs instead. This is done to
avoid using unstable API MemoryFile.getFileDescriptor.
Propose new SharedMemory.getFdDup API for next release, which
is hidden for now.
Refactor statsd puller to avoid proto serialization by moving
data directly into AStatsEventList.
"libprotoutil" is added as a static dependancy to libhwui, which
should be fine because its implementation does not link anything.

Bug: 146353313
Test: Ran "adb shell cmd stats pull-source 10068"
Test: Passed unit tests and GraphicsStatsValidationTest CTS
Change-Id: If16c5addbd519cba33e03bd84ac312595032e0e1
2020-02-07 12:27:07 -05:00
atrost
3f8b733354 Introduce TRACE_TAG_APEX_MANAGER and add timing to getActiveApexInfos
Timing for initialize cache path only. Currently ~3ms.
This will hopefully help catch regressions.

Bug: 148959827
Test: m, flash, boot, inspect logcat.
Change-Id: Ief83b8e1a6f0e58bca509527656c67b3465a4d19
2020-02-07 14:54:08 +00:00
Alex Buynytskyy
d8b25b838f Incremental Delivery: Add device feature.
Feature is present if ro.incremental.enable set to true.

Test: builds
Bug: b/136132412 b/133435829

Change-Id: I99ad307cbd3428e0b3964a369930658ee1c8ac0f
2020-02-06 14:05:55 -08:00
Alex Buynytskyy
030536c8b8 Merge "Set incremental apk directories" 2020-02-06 15:38:15 +00:00
Narayan Kamath
85e2378965 Merge "Reland: Rework platform version to hide codenames." 2020-02-06 10:51:15 +00:00
Dianne Hackborn
db0074542c Reland: Rework platform version to hide codenames.
The public platform version no longer can be a codename, it is
always the most recently released platform.  A new build property
and API provides either the offical version or the current codename
as appropriate.  This will avoid breaking apps that look at the
platform version while development is under a codename.

Bug:  143175463
Test: manual
Exempt-From-Owner-Approval: Relanding change with zero delta in this project.
Change-Id: I4407df40151d884293fa9d301a401b65bedb5527
2020-02-06 10:50:43 +00:00
Hung-ying Tyan
2f6b69c5e7 Merge "Resolve media directories to the real paths" 2020-02-06 09:32:21 +00:00
Songchun Fan
476bcf76ac Set incremental apk directories
Set up incremental storages such that it works with the new app code
path layout.

Ensures that package names do not show up in /proc/mounts

$ cat /proc/self/mountinfo
2806 90 0:79 / /data/incremental/data_incremental_tmp_1042476774/mount rw,nosuid,nodev,noatime shared:34 - incremental-fs incfs.img rw,read_timeout_ms=10000,readahead=0,rlog_pages=2,rlog_wakeup_cnt=10
6946 90 0:79 /st2 /data/app/~~WE4d9B-MZg0iZckOxIhPGQ== rw,nosuid,nodev,noatime shared:34 - incremental-fs incfs.img rw,read_timeout_ms=10000,readahead=0,rlog_pages=2,rlog_wakeup_cnt=10
7014 2806 0:79 /st2 /data/incremental/data_incremental_tmp_1042476774/mount/st2 rw,nosuid,nodev,noatime shared:34 - incremental-fs incfs.img rw,read_timeout_ms=10000,readahead=0,rlog_pages=2,rlog_wakeup_cnt=10
7013 6946 0:79 /st2 /data/app/~~WE4d9B-MZg0iZckOxIhPGQ== rw,nosuid,nodev,noatime shared:34 - incremental-fs incfs.img rw,read_timeout_ms=10000,readahead=0,rlog_pages=2,rlog_wakeup_cnt=10

BUG: b/147371381 b/148237378
Test: manual
Change-Id: I149903ae63ee27da5957e41c16f21f3435f9e636
2020-02-06 05:26:16 +00:00
Neil Fuller
1b883e2118 Merge "Remove System APIs not required for R" 2020-02-05 11:47:13 +00:00
Hung-ying Tyan
774d89ef64 Resolve media directories to the real paths
as /product may be a symlink to /system/product.

Bug: 147688127
Bug: 147701212
Test: pass android.telecom.cts.BackgroundCallAudioTest on GSI

Change-Id: Ie3588edece1e19ad12bdbf5825b9ff7dfc31cecd
2020-02-05 17:07:31 +08:00
Alex Buynytskyy
716588dec9 Minor renaming: IIncrementalManagerNative -> IIncrementalService.
Manager(client)->Service(server) seems to be easier to understand.

Test: builds
Bug: b/136132412 b/133435829
Change-Id: I3bc447fbf7a7aac917df7b4632def75e0da3f1a0
2020-02-05 01:35:06 +00:00
Automerger Merge Worker
e0c14895d6 Merge "Add getExtension to android.os.IBinder interface" am: 935dfd2ce9 am: 84642d37d5 am: fcc3a08dd4
Change-Id: I3e36d8ab9a629377529afbb1c0276c79d3414a00
2020-02-04 22:58:57 +00:00
Automerger Merge Worker
fcc3a08dd4 Merge "Add getExtension to android.os.IBinder interface" am: 935dfd2ce9 am: 84642d37d5
Change-Id: I7e67000c0434f9f8b72af643d4fd23892fcbbb6c
2020-02-04 22:43:51 +00:00
Automerger Merge Worker
84642d37d5 Merge "Add getExtension to android.os.IBinder interface" am: 935dfd2ce9
Change-Id: I0379693d0c87e77eaed7dd133edb00c410d2dfd5
2020-02-04 22:28:29 +00:00
Automerger Merge Worker
cc8a66cb12 Merge "Allow credstore to call into KeyAttestationApplicationIdProviderService" am: 715e754115 am: 11e5071fbb am: 406f067b69
Change-Id: I1e7159c7110dfd157f25d36bcfe75c56de8e026c
2020-02-04 22:22:38 +00:00
Yo Chiang
935dfd2ce9 Merge "Add getExtension to android.os.IBinder interface" 2020-02-04 22:17:24 +00:00
Automerger Merge Worker
406f067b69 Merge "Allow credstore to call into KeyAttestationApplicationIdProviderService" am: 715e754115 am: 11e5071fbb
Change-Id: I63f2cdcd2240b842614093761390bad866ef091b
2020-02-04 22:08:52 +00:00
Automerger Merge Worker
11e5071fbb Merge "Allow credstore to call into KeyAttestationApplicationIdProviderService" am: 715e754115
Change-Id: I0d0c1be195ec894570c1fcbebca3f8b3298b1b34
2020-02-04 21:49:42 +00:00
Treehugger Robot
715e754115 Merge "Allow credstore to call into KeyAttestationApplicationIdProviderService" 2020-02-04 21:31:31 +00:00
Neil Fuller
567a91279f Remove System APIs not required for R
Test: treehugger
Bug: 148842434
Change-Id: If022a726a058a90cb5446d220628c76800da8e96
2020-02-04 18:59:23 +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
Howard Ro
756e44741e Merge "Move StatsDimensionsValue.java to statsd apex" 2020-02-04 06:38:37 +00:00
Alex Buynytskyy
c5682f5b68 Unifying non-incremental and incremental.
Step 1 moving all Incremental code into prepareDataLoaderLocked - where
non-incremental DataLoader calls reside.

Test: atest PackageManagerShellCommandTest
Bug: b/136132412 b/133435829 b/136132412
Change-Id: Icf670de6d4802bf52cd4a93fa4475629d9ac9bc0
2020-02-03 20:28:09 -08:00
Tej Singh
8ffe1eae8b Move StatsDimensionsValue.java to statsd apex
Test: builds, boots
Bug: 146578788
Change-Id: Iaeb9eaf8c412964ccf57debca1445063e9120ef9
2020-02-03 19:03:44 -08:00
Adam Bookatz
8e08977646 Make UM.hasBaseUserRestriction @TestApi
The devicepolicy CTS test now needs to know when a restrictions is due
to devicepolicy or whether it is a 'base' restriction enacted by
UserManager. Therefore UM.hasBaseUserRestriction is opened up for the
CTS test.

Bug: 147111703
Test: atest com.android.cts.devicepolicy.UserRestrictionsTest
Change-Id: I0dd5256d36249a8dfe23ae10acf344d9de5fb2ca
2020-02-03 14:36:55 -08:00
Automerger Merge Worker
3f10146fe6 Merge changes Ib7daba9c,Ib692bff0 am: 75b7e58c47 am: 72dcf0a781 am: 3503f24fe4
Change-Id: I77cc4ef70bcad85d921496a8e307997973de43b4
2020-02-03 20:28:53 +00:00
Automerger Merge Worker
3503f24fe4 Merge changes Ib7daba9c,Ib692bff0 am: 75b7e58c47 am: 72dcf0a781
Change-Id: I881ade99a6dde6566b12974b058efa4a5ef13073
2020-02-03 20:17:49 +00:00