Commit Graph

7235 Commits

Author SHA1 Message Date
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
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
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
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
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
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
Jeffrey Huang
cb78285b81 Rename writeToProto to be dumpDebug
We want to eventually migrate some of these APIs to be @SystemApi for mainline modules.
The #dumpDebug name is more appropriate than #writeToProto.

Bug: 142279786
Test: Manual
Change-Id: I60793e91cedf6b720d4ecef6a8484f4fed4ff30f
2019-12-05 11:28:11 -08:00
Songchun Fan
4e758697eb [incremental/installation] new API to add file to session
A new method called addInstallationFile() to add files to an installation session.

Test: builds
Change-Id: Iaf086f5cfbc131428668e37d83e7677f5d5bf586
2019-12-04 18:05:41 -08:00
Tej Singh
b780251111 Binder API for native pulled atoms
Native pullers dont go through statscompanion, so statsd has to get the
calling uid.

Test: make
Change-Id: I21e12fd94a66e700b11dfadcb8b122738873e44c
2019-12-04 17:57:04 -08:00
David Su
a0bead651f Merge changes from topics "android-os-connectivity-wifiactivityenergyinfo", "requestactivityinfo"
* changes:
  Move WifiActivityEnergyInfo to android.os.connectivity
  BatteryStats: Move WifiActivityEnergyInfo to android.os.connectivity
  Statsd: Move WifiActivityEnergyInfo to android.os.connectivity
  Formalize WifiManager#requestActivityInfo as @SystemApi
  BatteryStats: Formalize WifiManager#requestActivityInfo
  Statsd: Formalize WifiManager#requestActivityInfo
2019-12-05 01:19:27 +00:00
Anthony Hugh
4d4e91db5e Merge "Expose findCurrentGuestUser() to system apps" 2019-12-04 22:54:07 +00:00
Songchun Fan
6dd47b58c5 [incremental] data loader manager interface
Checking in the interface for data loader manager and installation
files in android.content.pm.

Copied from branch master-instamatic. TODO to update the code with
latest API design.

Test: builds
Change-Id: Ie87dd8b45dc18f538ddabf87e2899e958133ff04
2019-12-04 11:00:23 -08:00
Paul Chang
5c179c5627 Merge "Add requestBugreport system API in BugreportManager." 2019-12-04 08:46:22 +00:00
Makoto Onuki
f8f55027b3 Add SystemApi to handle "adb shell cmd"
This will be used by mainline system services.

TODO: Maybe add more APIs to register subcommands

Bug: 142751512
Test: adb shell cmd jobscheduler help
Change-Id: Ie6d4b9aa4df426d64270d114d694f042b2600cce
2019-12-03 15:53:19 -08:00
Jeffrey Huang
3c75f06378 Merge "Add UserManager#getUserHandles() as SystemApi" 2019-12-03 23:19:42 +00:00
David Su
6f0e41683a Move WifiActivityEnergyInfo to android.os.connectivity
Move WifiActivityEnergyInfo out of the Wifi Mainline
module so that it can use @hide PowerProfile.

Bug: 145244073
Test: atest FrameworksWifiApiTests
Change-Id: I168c3e187f391ac31660034e7873c8438c1096b3
2019-12-03 12:21:31 -08:00
Jeffrey Huang
91027f8588 Add UserManager#getUserHandles() as SystemApi
Bug: 144953136
Test: atest UserManagerTest
Change-Id: I32965b9dc090c5686adb7e499fff022c7193c504
2019-12-03 11:30:55 -08:00
Peter Wang
a69b9fa4b0 Merge "[Telephony Mainline] Expose hidden APIs and consts" 2019-12-03 18:49:11 +00:00
Nick Cook
5f6bfb89ca Merge "docs: Delete duplicate word." into qt-dev am: 54a4bdccc4 am: 9480139340 am: eb179fa342
am: 3e2651cc8a

Change-Id: I8af84201394edd0df408d86cf6ff53814eecd9c1
2019-12-02 15:29:34 -08:00
Nick Cook
3e2651cc8a Merge "docs: Delete duplicate word." into qt-dev am: 54a4bdccc4 am: 9480139340
am: eb179fa342

Change-Id: I835207741811d71e8e5b89405226922f4759c90c
2019-12-02 15:24:38 -08:00
Automerger Merge Worker
eb179fa342 Merge "docs: Delete duplicate word." into qt-dev am: 54a4bdccc4 am: 9480139340
Change-Id: I1027bb9b9a2dd830cbdf99f03369e08a464a3279
2019-12-02 23:13:37 +00:00
Automerger Merge Worker
9480139340 Merge "docs: Delete duplicate word." into qt-dev am: 54a4bdccc4
Change-Id: I8a2aa5bc892412471324f3ec5edfa2aa6d39d62c
2019-12-02 23:03:04 +00:00
TreeHugger Robot
f1b6e8e1a7 Merge "Update UserManager docs for DISALLOW_CONFIG_LOCATION" 2019-12-02 22:20:23 +00:00
Soonil Nagarkar
dc08e3aecf Update UserManager docs for DISALLOW_CONFIG_LOCATION
Test: n/a
Change-Id: Idc2296a83b4468e7cae3817d9e3ab17699fd3c7f
2019-12-02 12:31:45 -08:00
Steven Moreland
9696244ab2 Merge "Binder: add markVintfStability" am: 4bdfc3c05c am: c8d045a384
am: 6090a98164

Change-Id: I87d07e53c8ed9bbc7e4216b186c79077c5d318bc
2019-12-02 09:00:31 -08:00
Steven Moreland
6090a98164 Merge "Binder: add markVintfStability" am: 4bdfc3c05c
am: c8d045a384

Change-Id: If93712ec83f04f50b7815c2179f08c3f52abeb7f
2019-12-02 08:55:26 -08:00
Steven Moreland
c8d045a384 Merge "Binder: add markVintfStability"
am: 4bdfc3c05c

Change-Id: I232f3db9979d47caaef0d5d75c263c8cfb7119c7
2019-12-02 08:50:57 -08:00
Steven Moreland
4bdfc3c05c Merge "Binder: add markVintfStability" 2019-12-02 16:46:17 +00:00
Paul Chang
9082c3907a Add requestBugreport system API in BugreportManager.
BUG:138220936
Test: Build pass
Change-Id: Iaca6ac7d926429771a7c6fd7d5d7a3e332f76c49
2019-12-03 00:17:48 +08:00
Mark Chien
d2958bb368 Merge changes from topic "tether_migrate" am: e8401aff92
am: 4bb02709c5

Change-Id: Ice864e02b2ef9da73f5a69e0668b6856e718988f
2019-11-30 04:31:35 -08:00
markchien
146e4976bf [Tether07] Migrate Tethering into module am: 0df2ebc43d
am: 6b828d2915

Change-Id: I6e71b418b7303d37144532ab056c21ccbefcb554
2019-11-30 04:31:28 -08:00
Mark Chien
4bb02709c5 Merge changes from topic "tether_migrate"
am: e8401aff92

Change-Id: I03e43b7a112f91637941e5193bd21b3e714f5dac
2019-11-30 04:26:07 -08:00