Commit Graph

7325 Commits

Author SHA1 Message Date
Kenny Root
155d5648fd Merge "Support Resume on Reboot" 2020-01-08 01:51:17 +00:00
TreeHugger Robot
0669ee1e44 Merge "UserManager.isUserOfType" 2020-01-08 00:36:55 +00:00
TreeHugger Robot
05528bc690 Merge "Fix serialization issue of ExternalVibration" 2020-01-07 20:19:05 +00:00
Alexey Kuzmin
5051b03896 Fix serialization issue of ExternalVibration
Remove excessive serialization of Audio Attributes
Bug: 140417434
Test: atest ExternalVibrationTest#testSerialization

Change-Id: Ib7ceaed875889126a53f874eec64fab4817e48d1
2020-01-07 18:52:03 +00:00
Kenny Root
f76cfc314c Support Resume on Reboot
When an OTA is downloaded, the RecoverySystem can be triggered to store
the user's lock screen knowledge factor in a secure way using the
IRebootEscrow HAL. This will allow the credential encrypted (CE)
storage, keymaster credentials, and possibly others to be unlocked when
the device reboots after an OTA.

Bug: 63928581
Test: atest FrameworksServicesTests:RebootEscrowDataTest \
            FrameworksServicesTests:LockSettingsServiceTests \
            FrameworksServicesTests:RecoverySystemServiceTest \
            FrameworksServicesTests:RebootEscrowManagerTests
Test: use fake OTA console app to apply update
Change-Id: I59df6942b27ea2bdd11b757922f5169085a325f0
2020-01-07 08:18:02 -08:00
TreeHugger Robot
28d6bcb90e Merge "Add VibrationAttributes" 2020-01-07 15:27:38 +00:00
Adam Bookatz
351a8fb415 UserManager.isUserOfType
Replaces the UserManager.getUserType API with isUserOfType, where the
suspected type is passed in as a parameter. Also makes this API require
MANAGE_USERS.

Test: atest UserManagerServiceUserInfoTest
Test: atest UserManagerTest
Bug: 142482943
Change-Id: Icca1d5d9a36bfc1422c3f37456135ce69c3f3b38
2020-01-06 14:04:42 -08:00
Jing Ji
4b2d16d2b1 Merge "Skip meminfo item for the gone processes" 2020-01-06 21:16:42 +00:00
Alexey Kuzmin
7b2c88c0a7 Add VibrationAttributes
Added a class for attributes of vibrations, to gradually replace usage
of AudioAttributes in haptics context. Refactored VibrationService and
related classes to use VibrationAttributes, converting AudioAttributes
to VibrationAttributes and back as necessary

Test: manual. Since it's a refacroring, everything should work as before
Bug: 136810264

Change-Id: I82c04bc6f6fb723ee390e3b86a4a371564ab28d4
2020-01-06 16:16:27 +00:00
Martijn Coenen
53af5b24a6 Merge "Use new setupAppDir() API for creating app-specific directories." 2020-01-06 09:04:12 +00:00
Automerger Merge Worker
c25a9dd796 Merge "Prevent double-counting of kernel stack size in dumpsys reports" am: 9493f0ed0b am: a457a78ab7 am: 6dfd9358a3
Change-Id: Ic4ed5159c6e823167bc867e29d15dc526a3c33ea
2020-01-03 01:34:01 +00:00
Automerger Merge Worker
6dfd9358a3 Merge "Prevent double-counting of kernel stack size in dumpsys reports" am: 9493f0ed0b am: a457a78ab7
Change-Id: I5454c8a0c92bd8b25956cf96b987199fffe3a898
2020-01-03 01:15:50 +00: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
Martijn Coenen
9fd2b64981 Use new setupAppDir() API for creating app-specific directories.
Use a more targeted API to create app-specific directories; allows us to
set the UID of app-specific directories correctly on devices that don't
have sdcardfs.

Bug: 146419093
Test: atest FuseDaemonHostTest
Test: boot device without FUSE, verify app dirs are created.
Change-Id: I40d9f95a0bf2e53cc6f80d46d46ef71fb39315be
2020-01-02 12:49:17 +01:00
Jing Ji
91b9e231fa Skip meminfo item for the gone processes
Fix race conditions that processes could get killed during meminfo
dump.

Also fixed various other issues with meminfo dump

Bug: 144503238
Test: Insert the below code before retrieving process meminfo,
      and then set a pid, run dumpsys meminfo, check the output.

    if (SystemProperties.getBoolean("sys.fake-kill." + pid, false)) {
        Process.killProcess(pid);
        Thread.sleep(1000);
    }

Change-Id: I96436800ce218309cc5fd8a21c35ad29584faf6f
2019-12-23 19:19:54 -08:00
Automerger Merge Worker
8a9e2a5ea6 Merge "ServiceManagerProxy: New method implementations" am: b2d8eb58a2 am: b88261b982 am: 3990bf8ba0
Change-Id: I876a25019dc9245671e1ffe53b7e3627877693ff
2019-12-23 20:43:01 +00:00
Automerger Merge Worker
3990bf8ba0 Merge "ServiceManagerProxy: New method implementations" am: b2d8eb58a2 am: b88261b982
Change-Id: Ieef272563ab13c9bad7b7f062f2778bb2a7062d1
2019-12-23 20:22:53 +00:00
Jon Spivack
b2d8eb58a2 Merge "ServiceManagerProxy: New method implementations" 2019-12-23 20:04:33 +00:00
Alex Buynytskyy
1ecfcece45 Migrating Incremental* APIs to PackageManager APIs.
Step 2, merging Data Loader params.

Test: builds and flashes
Bug: b/136132412

Change-Id: I2102554316dadcdcb49790c133ece110c43c29b3
2019-12-20 06:55:32 -08:00
Automerger Merge Worker
afc127664e Log watchdog-initiated rollback reason am: 254b0d5a7f
Change-Id: I2487bca4fd0579c2f66de15da727ada54a26cfe1
2019-12-20 08:18:37 +00:00
Automerger Merge Worker
6af4789825 Merge "Add an API to tell whenever device supports userspace reboot" am: 670352e807 am: d1c0e074c0 am: 0b11673991
Change-Id: I797923d568645425aca0659d02cd8dc0364a25ff
2019-12-20 02:27:51 +00:00
Automerger Merge Worker
91bc7be712 Merge "Use sysprop library for telephony props" am: afb16fa9d4 am: dc4de88fec
Change-Id: Iae5ca6c30dd3a72d5da921cf45d9c282bcff2703
2019-12-20 02:22:19 +00:00
Treehugger Robot
afb16fa9d4 Merge "Use sysprop library for telephony props" 2019-12-20 02:00:38 +00:00
Automerger Merge Worker
0b11673991 Merge "Add an API to tell whenever device supports userspace reboot" am: 670352e807 am: d1c0e074c0
Change-Id: I5e51be225c3063e250facec51cf4976c3004acc4
2019-12-20 00:26:24 +00:00
Nikita Ioffe
670352e807 Merge "Add an API to tell whenever device supports userspace reboot" 2019-12-19 23:44:06 +00:00
Automerger Merge Worker
cc628869ff Merge changes from topic "ion memory accounting" am: 5ded8c130c am: 3c4624dcc2
Change-Id: I6620e200357ddcc46557f149e17fcad25e7c57c4
2019-12-19 21:51:13 +00:00
Songchun Fan
3185221204 Merge "[incremental] native implementation of Incremental Service" 2019-12-19 21:15:17 +00:00
Adam Bookatz
7fc60391c5 Merge "UM.isUserNameSet is SystemApi" 2019-12-19 21:12:11 +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
Automerger Merge Worker
88159cccc1 Merge "Delete VINTF compatibility checks during OTA." am: bdc465991f am: 8ca8a6d00d am: b4e26195e3
Change-Id: I9e2ffa25d77cb18dbd82515d6814064878f262c1
2019-12-19 19:34:15 +00:00
Songchun Fan
3c82a306cd [incremental] native implementation of Incremental Service
The implementation of IIncrementalManager.aidl. TODO to refactor this.

Test: atest service.incremental_test
Change-Id: Ib8c8a9c0e7f0289b4bcd8961fa39746ed12b4310
2019-12-19 11:27:42 -08:00
Automerger Merge Worker
b4e26195e3 Merge "Delete VINTF compatibility checks during OTA." am: bdc465991f am: 8ca8a6d00d
Change-Id: I9d0a3698b096ec66604403f405d73c4f112f689e
2019-12-19 19:16:28 +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
Suren Baghdasaryan
6c9b1f8f85 Merge "Add JNI API to query sizes of ION heaps, pools and mapped part of the heaps" 2019-12-19 17:09:18 +00:00
Artur Satayev
c20b82a466 Merge "Use new UnsupportedAppUsage annotation." 2019-12-19 16:55:30 +00:00
Suren Baghdasaryan
5bf4706ed1 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
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
2019-12-19 15:27:05 +00:00
Felka Chang
ca1231035c Fix build fail in java 8
Java 8 doesn't accept '<>' with anonymous inner classes
is not supported in -source 8

Test: manual build
Fix: 146539712

Change-Id: I8fa4bf80366e202a30b7108932abec0d76548ca9
2019-12-19 17:22:36 +08:00
TreeHugger Robot
85d68cd334 Merge "Remove default Device Owner restrictions" 2019-12-19 08:42:30 +00:00
TreeHugger Robot
87bb84da38 Merge "Add query functionalities to query all of crates" 2019-12-19 07:16:37 +00:00
Automerger Merge Worker
1f5d183def Merge "Include KReclaimable meminfo field into getMemInfo results" am: f61d2347c0 am: 215e1d5e27 am: d23e6f7b09
Change-Id: I3d0f27c2ca0471af8058b86a7d1510cd246fda87
2019-12-19 06:38:58 +00:00
Automerger Merge Worker
d23e6f7b09 Merge "Include KReclaimable meminfo field into getMemInfo results" am: f61d2347c0 am: 215e1d5e27
Change-Id: I7a5b775b93ce3c345d376b4c2e9dfa6ebde31848
2019-12-19 06:22:00 +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
Songchun Fan
8d76b33e85 Merge "[incremental] change temp dir" 2019-12-18 21:56:47 +00:00
TreeHugger Robot
d8492dbfb2 Merge "Migrating Incremental* APIs to PackageManager APIs." 2019-12-18 21:38:46 +00:00
Artur Satayev
afdb23ab6f 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
2019-12-18 20:44:45 +00:00
Alex Buynytskyy
ea14d19106 Migrating Incremental* APIs to PackageManager APIs.
This is the first step, migrating java parts.
CleanSpec.mk added as a workaround for b/146502407

Test: builds and flashes
Bug: b/136132412

Change-Id: Id0a26aa011b555ea457b5aafe7f5789c36d25bcc
2019-12-18 19:13:39 +00:00
Songchun Fan
720a7816d0 [incremental] change temp dir
Due to permission constraints, use a new temp dir for holding temporary
Incremental files/dirs.

Test: manual
Change-Id: I46b9d608225ed7ae3ccc552c6c43157d6505a66c
2019-12-18 10:36:58 -08:00
Eran Messeri
ce273df377 Remove default Device Owner restrictions
As part of the work to deprecate Corporate-Owned Managed Profile (COMP)
mode, remove the restrictions that are set by default when a Device
Owner is set on the device.

The Device Owner used to be able to add/remove the restrictions for
adding/removing a managed profile.

In the new mode, this restriction will be set by default, by the system,
and not removeable by the device owner.

Test: atest FrameworksServicesTests:DevicePolicyManagerTest
Test: atest CtsDevicePolicyManagerTestCases:com.android.cts.devicepolicy.DeviceOwnerPlusProfileOwnerTest
Bug: 143517714
Bug: 138709492
Change-Id: Ice5f8b678327b2c901623cc8f4dd6d60271b361b
2019-12-18 15:38:39 +00:00