Commit Graph

7270 Commits

Author SHA1 Message Date
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
TreeHugger Robot
3de47e4a86 Merge "BatteryStatsManager: Move constants from @hide BatteryStats" 2019-12-13 04:14:53 +00:00
Bookatz
d15b2f7279 Allow setting User Restrictions per user type
FULL and PROFILE user types now have their default restrictions
delineated in UserTypeFactory. The restrictions for these user types can
be customized in config_user_types, along with the other user type
customization.

Note: even though FULL user types can now be customized, the only
supported customization is user restrictions. Moreover, new FULL user
types cannot be defined.

This cl also has the following repercussions:
-When a user is created (but not yet started), the applied restrictions
are not propagated as an update (prior to this, the restrictions for new
users - other than guest - were set via setUserRestriction, which did
more than just store the data). When the user is started, the
restrictions will still be propagated.

-When a user is created via adb, its default restrictions are applied.
Previously this was not the case except for guest users.

-When an Admin user is created/set, it is now the callers responsibility to
adjust its restrictions. UserManager will no longer automatically remove
the DISALLOW_SMS/DISALLOW_OUTGOING_CALLS restrictions for Admins.

Also note that Restricted Users have additional hardcoded restrictions,
indepent of this cl.

Test: atest UserManagerServiceUserTypeTest
Test: atest UserManagerTest
Bug: 142482943
Bug: 143491938

Change-Id: Idfec610da871aea2bc7109d11d1eb9a957e080a4
2019-12-12 19:33:28 -08:00
Roshan Pius
9e1e0fc381 BatteryStatsManager: Move constants from @hide BatteryStats
Exposed the @hide constants from BatteryStats used in
BatteryStatsManager as @SystemApi.

Bug: 146009681
Test: Compiles
Change-Id: If1c798181b4c160453c7775bd6bb779b9e81a6ee
2019-12-12 14:47:12 -08:00
Peter Wang
7319176298 Merge "[Telephony Mainline] Expose MAX_NETWORK_TYPE constant" 2019-12-12 21:03:13 +00:00
Dmitri Plotnikov
51e51feb3c Log outgoing blocking binder calls in system server as WTF
Test: boot the system, see log entries like this:
4030 E Binder  : Outgoing transactions from this process must be FLAG_ONEWAY

Change-Id: Ie1b3c76ec08aecc706a5edc5a6d2b4b946895ed9
2019-12-12 12:59:31 -08:00
Automerger Merge Worker
b988967879 Merge "Pipe disabled compat changes to runtime through zygote." am: f33c3a8c9d am: c06f69d2b4
Change-Id: I189518f7abee2013a57c8b76c69e02145ef4238a
2019-12-12 14:22:35 +00:00
Harpreet \"Eli\" Sangha
45d53eee54 vibrator: Support Always-On Effects
Bug: 138909021
Test: Verify always-on haptics are configured on boot and settings
      change.
Change-Id: I2c9458a55cb878b94dde88988ffa73d4b8cb7ac0
Signed-off-by: Harpreet \"Eli\" Sangha <eliptus@google.com>
2019-12-12 11:12:44 +09:00
Peter Wang
15e3ae071a [Telephony Mainline] Expose MAX_NETWORK_TYPE constant
Test: Build
Bug: 140908357
Change-Id: I40cbcdfb8e77b3e01968d008f4359790c4264539
2019-12-11 14:10:35 -08:00
atrost
e44e134776 Pipe disabled compat changes to runtime through zygote.
Test: Java in process API still work correctly - tested locally with test app + adb overrides.
Test: atest com.android.internal.os
Test: atest com.android.server.am
Bug: 145743810
Change-Id: I6645a7ec767400cd579207f0eed1e6e7136c8a6f
Merged-In: I6645a7ec767400cd579207f0eed1e6e7136c8a6f
2019-12-11 18:44:20 +00:00
atrost
5ae996f892 Pipe disabled compat changes to runtime through zygote.
Test: Java in process API still work correctly - tested locally with test app + adb overrides.
Test: atest com.android.internal.os
Test: atest com.android.server.am
Bug: 145743810
Change-Id: I6645a7ec767400cd579207f0eed1e6e7136c8a6f
2019-12-11 18:41:35 +00:00
Martijn Coenen
d9de49d0e6 Merge changes from topic "fuse_bindmount"
* changes:
  Deal with MediaProvider process dying.
  Don't delay starting sessions.
  Tell StorageSessionController when a user is stopping.
2019-12-11 07:51:37 +00:00
Automerger Merge Worker
08135b313a Merge "Do not cache enabled tags in Java." am: e280c89075 am: 2dcd338a46
Change-Id: I631b07420837c5271e2162c98d6f2c5150a8528e
2019-12-10 22:56:23 +00:00
Treehugger Robot
e280c89075 Merge "Do not cache enabled tags in Java." 2019-12-10 22:26:16 +00:00
Florian Mayer
dd025de034 Do not cache enabled tags in Java.
As we are elimating the Binder notifications for the sysprop update for
atrace, we no longer have a callback that can be used to read the new
value of the enabled tags.

@CritivalNative calls are very fast (25 ns) so the overhead of always
going to native code to read the tags is negligible.

Test: flash & boot
Test: adb shell su root atrace -t 10 ss
Test: adb shell su root atrace -t 10 wm

Bug: 137366208

This is a cherry-pick of 9fd210224a

Change-Id: I1a07fefd751ee28ca9a632a3d78a2925e8827b9c
Merged-In: I1a07fefd751ee28ca9a632a3d78a2925e8827b9c
2019-12-10 13:17:23 +00:00
Martijn Coenen
7391820c23 Deal with MediaProvider process dying.
There is no way to recover the FUSE filesystem once the MediaProvider
process has died; the kernel and userspace are out of sync at that
point, and libfuse will return -EIO on all requests.

Now when the process dies, tell StoragemanagerService that it needs to
reset all volumes for a user. Since we currently don't have a way to do
this for one user, just call through to H_RESET. This can be optimized
later. This also means we no longer need to keep a hold of the FUSE fd
in system_server; just pass it along directly when we start a session.

Bug: 137890172
Test: atest AdoptableHostTest
Change-Id: I2e6952ccece6bf2945b4ed81c70330b278554d13
2019-12-10 13:10:51 +01:00
Florian Mayer
9fd210224a Do not cache enabled tags in Java.
As we are elimating the Binder notifications for the sysprop update for
atrace, we no longer have a callback that can be used to read the new
value of the enabled tags.

@CritivalNative calls are very fast (25 ns) so the overhead of always
going to native code to read the tags is negligible.

Test: flash & boot
Test: adb shell su root atrace -t 10 ss
Test: adb shell su root atrace -t 10 wm

Bug: 137366208
Change-Id: I1a07fefd751ee28ca9a632a3d78a2925e8827b9c
2019-12-10 11:30:13 +00:00
Makoto Onuki
6b0a7b86dc System APIs for telephony to expose/obtain binder services
Bug: 142255256
Bug: 112725883
Test: Boot
Change-Id: Ia02384689b6b5ecb19db27d91d03f06ae2543b91
2019-12-09 16:44:45 -08:00
Roshan Pius
3f9ba67fa7 Merge changes from topics "suggestion_no_uid_package", "wifi_key_value_list_parser", "wifi_power_profile", "wifi_service_manager_getService", "wifi_westworld"
* changes:
  statsd: Allow wifi mainline module to log its metrics
  wifi-services-srcs: Stop using KeyValueListParser from android.internal
  WifiNetworkSuggestion: Don't store packageName/uid
  WifiAwareManager: Add requestMacAddresses @hide API
  UserManager: Add StringDef for all restrictionKey values
  WifiActivityEnergyInfo: Use time values for energy calculation
2019-12-09 17:08:30 +00:00
Ruchir Rastogi
b6cfb833ec Merge "StatsEventParcel impl.; move AIDL files" 2019-12-07 00:58:25 +00:00
Roshan Pius
3eac0b9158 UserManager: Add StringDef for all restrictionKey values
Based on API council feedback for the recently added
hasUserRestrictionForUser API.

Bug: 144924593
Test: Compiles
Change-Id: Ib78c334d48a57c2e97f8f1b29d7d663d3eb2f1c1
2019-12-06 15:34:26 -08:00
Makoto Onuki
63dbf254b5 Merge "Add SystemApi to handle "adb shell cmd"" 2019-12-06 23:07:56 +00:00
Ruchir Rastogi
cd9dd94fb1 StatsEventParcel impl.; move AIDL files
This implementation continue to uses libbinder, as opposed to
libbinder_ndk.

We also move many (but not all) statsd aidl files from
frameworks/base/core into the apex.

Test: m -j128 && bit statsd_test:*
Change-Id: I95f06e937e50c1e2a638163b13587682402956a7
2019-12-06 14:08:27 -08:00
Jeffrey Huang
77db950964 Merge "Rename writeToProto to be dumpDebug" 2019-12-06 18:53:15 +00:00
TreeHugger Robot
addd10c6d2 Merge "Binder API for native pulled atoms" 2019-12-06 18:30:36 +00:00
Roshan Pius
26ef68260a WifiActivityEnergyInfo: Use time values for energy calculation
This removes PowerProfile @hide usage in wifi service.

Bug: 145533104
Test: Compiles
Change-Id: I56d366d557f5afe379f4ea0cbbff2c3b72440d99
2019-12-06 08:07:02 -08:00
Songchun Fan
e63063585c Merge "[incremental] parcelable for incfs file descriptors" am: c8b066091e
am: c93841a265

Change-Id: Ie9469f0e7b380ceafb2773d124d5c4d42c942d89
2019-12-05 15:10:17 -08:00
Songchun Fan
c8b066091e Merge "[incremental] parcelable for incfs file descriptors" 2019-12-05 22:02:49 +00:00
Songchun Fan
4e19d8fda3 Merge "[incremental/installation] new API to add file to session" 2019-12-05 20:56:03 +00:00
Songchun Fan
b7c6d8d861 Merge "[incremental] data loader manager interface" 2019-12-05 20:55:50 +00:00