Commit Graph

7300 Commits

Author SHA1 Message Date
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
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
Felka Chang
71e3efed54 Add query functionalities to query all of crates
Once the application called Context.getCrateDir(), the crates root
directory is also created. The application can mkdir directory under the
crates root. Each child directory in crates root is one crate.

Each crate information is descibed by CrateInfo. CrateInfo contains
the following information.
* Label:
    It is used to display text to the users.
    Default is the folder name.
* Expiration:
    When the system needs more space. The system will clean the files
    in the crates according to the expired or not.
    Default is 0.

Test: atest \
    CtsOsTestCases:android.os.storage.cts.CrateInfoTest \
    CtsOsTestCases:android.os.storage.cts.StorageCrateTest \
    CtsOsTestCases:android.os.storage.cts.StorageStatsManagerTest

Bug: 141660526

Change-Id: Icdc8123c481ef7c5b4fd68ffcfd334ffbfc9d655
2019-12-18 23:04:15 +08:00
Ricky Wai
32e4875f6b Merge changes from topic "mount_isolate_apps_data"
* changes:
  App data directory isolation
  Pass app visible packages data directory info to zygote
2019-12-18 13:07:02 +00:00
Automerger Merge Worker
0b4fab63e6 Merge "vibrator: Support Always-On Effects" am: 65303aa385 am: 5d97061d0b am: 197079ffdb
Change-Id: I125494e9dcb936f786b8975c9030adf13ef037fa
2019-12-18 06:52:22 +00:00
Automerger Merge Worker
197079ffdb Merge "vibrator: Support Always-On Effects" am: 65303aa385 am: 5d97061d0b
Change-Id: I1a83e4190a404b94653da68762c2c8acfa8078b9
2019-12-18 06:35:31 +00:00
Treehugger Robot
65303aa385 Merge "vibrator: Support Always-On Effects" 2019-12-18 06:10:18 +00:00
Jeff Sharkey
04b4ba1e15 Shuffling to prepare for MediaProvider APEX.
An upcoming change will move MediaStore to be within the recently
created MediaProvider APEX.  This means that MediaStore will need to
be fully built against @SystemApi, and so this CL adjusts APIs to
support a clean transition:

-- Listing of "recent" storage volumes and scan paths for "internal"
storage is now handled by StorageManager directly, so that partners
retain control over what is deemed recent.
-- StorageVolume now returns the MediaStore volume name and the
filesystem directory where its contents are presented to apps.
-- Conversion of legacy thumbnail "kind" values to dimensions now
happens directly inside MediaStore.
-- PendingParams and PendingSession are completely removed.
-- Contributed media APIs are completely removed.
-- Media for demo users is now surfaced as a unique StorageVolume.
-- Migrate most MediaStore APIs to accept ContentResolver, which
supports easy usage of ContentResolver.wrap().

Bug: 144247087, 137890034
Test: atest --test-mapping packages/providers/MediaProvider
Exempt-From-Owner-Approval: in-place refactoring
Change-Id: I445528b2779bb37b9f2558e67a3cfc9f60412092
2019-12-18 01:35:46 +00:00
Automerger Merge Worker
bd9f7a6169 docs: Removing most of the intro to PowerManager API am: 3fea8d1042 am: f92878e651 am: c06564375b am: b82174bc3a
Change-Id: I6a392d78c6d510e575758cb9feae680f20b7b19a
2019-12-17 20:46:43 +00:00
Automerger Merge Worker
b82174bc3a docs: Removing most of the intro to PowerManager API am: 3fea8d1042 am: f92878e651 am: c06564375b
Change-Id: I9605f308953aabb49868763dbf5bfd66ac955bee
2019-12-17 20:32:46 +00:00
Automerger Merge Worker
c06564375b docs: Removing most of the intro to PowerManager API am: 3fea8d1042 am: f92878e651
Change-Id: I07ea69318879ad5c70c99880c6cc6c57a348d76a
2019-12-17 20:18:50 +00:00
Automerger Merge Worker
f92878e651 docs: Removing most of the intro to PowerManager API am: 3fea8d1042
Change-Id: I25c41e4998197ef1df2c95fb1f2360360970389f
2019-12-17 19:58:53 +00:00
Automerger Merge Worker
f47a64b59d Merge "[Telephony Mainline] Expose MAX_NETWORK_TYPE constant" am: 23019528ec am: a4c3162339
Change-Id: I263fbd69be70ccf48b0e16d00985e716060f6bfa
2019-12-17 19:20:16 +00:00
Ricky Wai
5a8fe7a028 Pass app visible packages data directory info to zygote
These information are needed to isolate apps data directory.

Only normal app zygote forks require these info, as
- system process - Does not need data isolation
- app zygote - It's for generating isolated process, so don't need
access apps data.
webview zygote - Similar to isolated process, don't need to access
apps data.

Bug: 143937733
Test: Able to see the package name, volume uuid, and inode nuber
for each visible package in zygote
Change-Id: I281e113d2a13d103c8967b37a06b639c5a5a8ff8
2019-12-17 14:24:40 +00:00
David Su
87e22207bf Expose @hide APIs needed by ParceledListSlice
Expose @hide APIs referenced by ParceledListSlice/
BaseParceledListSlice as public APIs.

ParceledListSlice will not be made a stable API
in Android R. Thus, allow it to be copied into
modules that need it by ensuring it does not use
any @hide APIs.

Bug: 145317012
Test: compiles
Change-Id: Ife85b66005ba22b03c09bf9446661368dea31945
2019-12-16 16:26:18 -08:00
Andrew Solovay
3fea8d1042 docs: Removing most of the intro to PowerManager API
The intro text says PowerManager is discouraged, and almost
all the available wakelock options have long been deprecated.
Given that, I think it makes sense to remove most of that
intro and just point devs to FLAG_KEEP_SCREEN_ON instead.

Staged to:
go/dac-stage/reference/android/os/PowerManager

Test: make ds-docs
Bug: 145699347
Change-Id: I517366903f3d9743166d7edaddc08471af0803d9
2019-12-16 22:05:12 +00:00
Alex Buynytskyy
247901bb4f Merge "[incremental] Java service and shell command handler" 2019-12-16 06:44:49 +00:00
Peter Wang
2dae34155e [Telephony Mainline] Expose MAX_NETWORK_TYPE constant
Test: Build
Bug: 140908357
Change-Id: I40cbcdfb8e77b3e01968d008f4359790c4264539
Merged-In: I40cbcdfb8e77b3e01968d008f4359790c4264539
2019-12-13 15:36:17 -08:00
Makoto Onuki
b03866ee72 Merge "System APIs for telephony to expose/obtain binder services" 2019-12-13 20:02:36 +00:00
Songchun Fan
f5c894f7ce [incremental] Java service and shell command handler
Renaming:

IIncrementalManager.aidl -> IIncrementalManagerNative.aidl
IIncrementalServiceProxy.aidl -> IIncrementalManager.aidl

Adding implementation of IIncrementalManager.aidl. Also adding
implementation of the shell command handler.

Test: $adb abb incremental help

Change-Id: Ia18fde097f6170f4774552428a2927186ede8389
2019-12-13 09:38:07 -08:00
TreeHugger Robot
19df6fdad1 Merge changes Idfec610d,I68011fd3
* changes:
  Allow setting User Restrictions per user type
  Support custom user types (profiles)
2019-12-13 17:38:06 +00:00
Dmitri Plotnikov
15d8e474d6 Merge "Log outgoing blocking binder calls in system server as WTF" 2019-12-13 17:29:10 +00:00
Abhijeet Kaur
0e4bf80f05 Merge "Remove PROP_FUSE_SNAPSHOT as it is no longer required" 2019-12-13 14:03:25 +00:00
Abhijeet Kaur
a4f4056ff6 Remove PROP_FUSE_SNAPSHOT as it is no longer required
With the newly added flag for Settings developer options, which is now
used to change the state of FUSE, PROP_FUSE now acts as the snapshot
feature flag for the current boot.

Also, on a reboot PROP_FUSE_SNAPSHOT was always set to PROP_FUSE or
the default value (false) if PROP_FUSE is not set.

Since PROP_FUSE now replaces PROP_FUSE_SNAPSHOT, it always needs to be
set to some value after a reboot. PROP_FUSE is initialised to the default
value (false) only once, after that it takes value from the latest
changed flag.

Bug: 145391093
Test: Manual (adb shell ls /sdcard works)
Test: atest AdoptableHostTest
Change-Id: I3abb8690a50f542b2567c495ef9942a643be457d
2019-12-13 11:21:37 +00:00