Commit Graph

6826 Commits

Author SHA1 Message Date
Kevin Hufnagle
c279bcff22 Merge "docs: Improved tick/click effect descriptions" into qt-dev am: a7496671da am: 40a40c73d7 am: 13a441d648
am: 9426bb197e

Change-Id: I0836ec3671ae306796a1f3f58b1eefd9b3537cfe
2019-08-29 19:25:03 -07:00
Kevin Hufnagle
9426bb197e Merge "docs: Improved tick/click effect descriptions" into qt-dev am: a7496671da am: 40a40c73d7
am: 13a441d648

Change-Id: I6a6521d4c67013e1f0cc5a10698105a4c55eb145
2019-08-29 19:10:49 -07:00
Kevin Hufnagle
13a441d648 Merge "docs: Improved tick/click effect descriptions" into qt-dev am: a7496671da
am: 40a40c73d7

Change-Id: I4227eebb2a74fbcecdc15dff56d26bdbbbaca027
2019-08-29 19:00:15 -07:00
Kevin Hufnagle
40a40c73d7 Merge "docs: Improved tick/click effect descriptions" into qt-dev
am: a7496671da

Change-Id: Id33aa9b90e3a62751a9fa7a4074a44737d7a95e3
2019-08-29 18:52:02 -07:00
Kevin Hufnagle
86b17d2523 docs: Improved tick/click effect descriptions
Test: make ds-docs -j32

Bug: 139888074
Change-Id: I939aaa4cf81ddab1705611222c12a60823493d38
2019-08-29 19:30:42 +00:00
Zim
42f1e9f731 Add StorageSessionController
The StorageSessionController has a StorageUserConnection to represent
the binding between the StoragemanagerService and the
ExternalStorageService for a user.

A StorageUserConnection can have multiple Sessions each representing a
mount for the user. The StorageUserConnection has an
ActiveConnection representing the active binding to the
ExternalStorageService.

If the ExternalStorageService goes down, the ActiveConnection becomes
'inactive' but the StorageManagerService will be notified to reset the
mount state of the device with the help of vold which will 're-activate'
the ActiveConnection.

This reset will among other things, kill any apps holding an open fd
on the FUSE mount and remount the FUSE mount, getting a new FUSE fd
as a result. The StorageSessionController will once again be notified
of new volume mounts and start sessions for them

Bug: 135341433
Test: adb shell setprop persist.sys.fuse && adb reboot && adb shell ls
/sdcard
Test: adb shell am crash com.android.providers.media && adb shell ls /sdcard
Change-Id: I72841a1d8012b1ca1cc88f29cb75127ea627c093
2019-08-29 00:02:52 +01:00
TreeHugger Robot
84bb274081 Merge "Improved AbstractMasterSystemService to handle supported user types." 2019-08-28 18:50:25 +00:00
Makoto Onuki
72fcdcde4c Merge "Remove IMaintenanceActivityListener (which was unused)" 2019-08-28 16:18:13 +00:00
Luke Huang
e0a0963542 Merge "Support enable/disable dns forwarding of dnsmasq when start tethering" am: 6fecb94292 am: a3ddee80fd am: f03f803aaf am: f9b00a4427
am: d838e6d186

Change-Id: Ie9850a614ab191a709e98795f8e9301db1321108
2019-08-28 06:54:02 -07:00
Luke Huang
d838e6d186 Merge "Support enable/disable dns forwarding of dnsmasq when start tethering" am: 6fecb94292 am: a3ddee80fd am: f03f803aaf
am: f9b00a4427

Change-Id: I85c715b4fe213d83e4d31140b0e39bed426226d0
2019-08-28 06:42:34 -07:00
Luke Huang
f9b00a4427 Merge "Support enable/disable dns forwarding of dnsmasq when start tethering" am: 6fecb94292 am: a3ddee80fd
am: f03f803aaf

Change-Id: I1336a04e1a7b1655354f4d3d4b93897e2db4fdbe
2019-08-28 06:30:42 -07:00
Luke Huang
f03f803aaf Merge "Support enable/disable dns forwarding of dnsmasq when start tethering" am: 6fecb94292
am: a3ddee80fd

Change-Id: If5a280508dcc95df911d1d72671857a8c58bbbd4
2019-08-28 06:18:40 -07:00
Luke Huang
a3ddee80fd Merge "Support enable/disable dns forwarding of dnsmasq when start tethering"
am: 6fecb94292

Change-Id: I8f5c67fa1e045c9fd4a5e7a753df285d1111c1d2
2019-08-28 06:06:44 -07:00
Makoto Onuki
78ebcf5b11 Remove IMaintenanceActivityListener (which was unused)
Bug: 137763703
Test: treehugger
Change-Id: I0a1839eff52b69a8711b44350523b91cecfa3d8d
2019-08-27 12:01:10 -07:00
Lucas Dupin
8968f6a9e9 IPC StrictMode
This CL introduces a way of blocking IPCs on the main thread.
This is enforced by StrictMode, and enabled on tests and eng
builds.

All current blocking IPCs were whitelisted and bugs will be
filed, in order to fix them for R.

Bug: 139360025
Test: adb logcat
Test: atest SystemUITests
Change-Id: I45af2619605ee36b6bae83ef080272c62754b654
2019-08-26 17:45:30 -07:00
Felipe Leme
987655d049 Improved AbstractMasterSystemService to handle supported user types.
Also changed AutofillManagerService and ContentCaptureManagerService to take advantage of these methods.

Test: manual verification
Test: atest CtsAutoFillServiceTestCases CtsContentCaptureServiceTestCases # on phone and Automotive

Bug: 133242016

Change-Id: I3e7f9d65a6ef1e8e6ec886a41b35733e463a6389
2019-08-26 10:51:03 -07:00
Makoto Onuki
3cad27c294 Merge "Move DeviceIdle to the JS apex" 2019-08-26 17:40:10 +00:00
Mike Ma
8a88548504 Merge "Add an API to dump incident report for dumpstate" 2019-08-24 06:16:15 +00:00
Xin Li
a770df1d2e DO NOT MERGE - Merge build QP1A.190711.019 into stage-aosp-master
Bug: 139893257
Change-Id: I94fce9c5c0b35cbb88ee27fa4cd037927964d2cd
2019-08-24 05:22:23 +00:00
Peiyong Lin
ac373cf26e Merge "Add manifest flag to enable prerelease driver." into qt-qpr1-dev am: bc80fff0a4
am: 88f982aeff

Change-Id: I9950a70596fa64f90a9371d5f208aca8a0bf9854
2019-08-23 20:02:31 -07:00
Makoto Onuki
52c24b377b Move DeviceIdle to the JS apex
Test: atest cts/tests/tests/batterysaving/src/android/os/cts/deviceidle/DeviceIdleTest.java
Bug: 137763703
Change-Id: I836350c09f45f95afbf90b562ab1ceed75526498
2019-08-23 16:03:30 -07:00
Peiyong Lin
88f982aeff Merge "Add manifest flag to enable prerelease driver." into qt-qpr1-dev
am: bc80fff0a4

Change-Id: Ice63c7b63ddacac58cb1e2ab51df387cf820783c
2019-08-22 16:17:40 -07:00
Mike Ma
5a57d7989a Add an API to dump incident report for dumpstate
Instead of just relying on the regular iteration through the system
services inside dumpstate, add another API to IIncidentManager
dedicated for dumpstate.

- It is only callable by dumpstate() (check the calling uid)
- It has the same behavior as the current call inside dump()

Advantages:
- More explicit function name, right next to takeIncidentReport will
  make it easier to keep them in sync.
- Nobody else can call it, make security easier.
- If dumpstate calls it explicitly, it can skip the 10 second timeout
- The regular dump() call should provide debugging data about
  incidentd itself, for example timestamps for the most recent N
  incident reports taken and the current state of the work directory,
  allowing us to debug incidentd itself.

Bug: 137493082
Test: Manually trigger a bug report, and verify
      /proto/incident_log.proto in the zip file.

Change-Id: I19139c765b53ede63d3beb3ea3ac40ada1aba42d
2019-08-22 14:43:27 -07:00
Jeff Sharkey
ec19e9b107 Public APIs for ID-specific Uris, misc items.
We have getContentUri() for entire collections of items, but we
only have ID-specific overloads for some of the MediaStore classes;
let's get them all added for consistency.

Remove primary/secondary directory logic, which was replaced by
new RELATIVE_PATH column before Q launched.

Bug: 137890034
Test: atest --test-mapping packages/providers/MediaProvider
Exempt-From-Owner-Approval: trivial API refactoring
Change-Id: Iae4e7fe57adff071c35af459e31223a1fd05fef2
2019-08-22 14:43:24 -06:00
Peiyong Lin
7797b4de46 Add manifest flag to enable prerelease driver.
Add manifest flag to prevent applications from using prerelease driver
accidentally. In this patch we also allow any debuggable device build to load
prerelease driver for all non-system and non-privileged applications.

BUG: 138132808
Test: Verified with prerelease driver.
Change-Id: If0abc89f709c8e34bd83a5c09c3c2047300b5ef2
2019-08-22 10:38:41 -07:00
Luke Huang
b0d52464f1 Support enable/disable dns forwarding of dnsmasq when start tethering
Bug: 128782815
Test: built, flashed, booted
Change-Id: Ic6ee985b42cbe77e8f2208fba62108604fc7bbcf
2019-08-20 20:42:13 +08:00
PO HUNG CHEN
35fa063e89 Merge "Use Ashmem to reduce buffer copies" 2019-08-20 08:18:58 +00:00
Howard Chen
7bb18effb2 Use Ashmem to reduce buffer copies
Use android.os.MemoryFile to allocate Ashmem and use gsid.setAshmem and
gsid.commitGsiChunkFromAshmem to submit data.

Bug: 138976291
Test: adb shell am start-activity \
    -n com.android.dynsystem/com.android.dynsystem.VerificationActivity \
    -a android.os.image.action.START_INSTALL \
    -d file:///storage/emulated/0/Download/system.raw.gz \
    --el KEY_SYSTEM_SIZE $(du -b system.raw|cut -f1) \
    --el KEY_USERDATA_SIZE 8589934592

Change-Id: I6df718a8cc3f4e5835c9d20d0bf5bf8bb0daee22
2019-08-19 17:35:02 +08:00
Xin Li
1702a9da19 DO NOT MERGE - Merge pie-platform-release (PPRL.190801.002) into master
Bug: 139369544
Change-Id: I835905a51836e7218f0be8c25335b9548ae6b2d3
2019-08-13 16:36:37 -07:00
Felipe Leme
e5434c301b Initial implementation of system service optimizations for different type of users.
On R, we want to optimize boot time by not starting system services for some types of users,
like a headless system user (which is the case for Automotive)

As a "guinea pig", it optimizes VoiceInteractionService for headless system user, so the 3rd-party app
service is not bound for user 0 (and hence its process is not launched).

This change improves boot time on Automotive in about 100ms.

Test: atest CtsVoiceInteractionTestCases CtsAssistTestCases # on walleye and Automotive
Test: manual verification on logcat

Bug: 133242016
Fixes: 137878080

Change-Id: Ib0a902855e32691a1d00bfa77ee82c8e2430977c
2019-08-13 10:10:53 -07:00
Jing Ji
a736da8213 Add RSS to dumpsys meminfo
Include the RSS info into the meminfo output of dumpsys and
incident_report.

Bug: 117880513
Test: adb shell dumpsys meminfo
Test: cts-tradefed run cts-dev --module \
      CtsIncidentHostTestCases --test \
      com.android.server.cts.MemInfoIncidentTest
Change-Id: Id1058e279b7ca6925b59a6a523e0f0d14d830761
2019-08-09 22:57:50 +00:00
Makoto Onuki
7c730311ea Merge "Remove build time dependency from BatteryStats to JobParameters" 2019-08-09 20:38:34 +00:00
Jeff Sharkey
7c2a8686c6 Merge changes from topic "callz"
* changes:
  Expand ContentProviderOperation to support call().
  Add nullability annotations for current behavior.
2019-08-09 16:01:23 +00:00
Makoto Onuki
9111d1dcec Remove build time dependency from BatteryStats to JobParameters
In preparation of moving the jobscheduler framework code to its
own jar.

Bug: 138793378
Test: dumpsys batterystats  -c | grep jbc and make sure the line looks correct

Change-Id: I9938c99e37bd44e522e5f8d8e95772e69d5be492
2019-08-08 15:33:37 -07:00
Jeff Sharkey
7d6fd4b82a Expand ContentProviderOperation to support call().
ContentProviderOperation has long supported basic operations like
insert(), update(), and delete(), but it was never extended to
support the general-purpose call() method.

This change adds support for call(), including configuration of the
extras Bundle using back-references to other operations.  In
addition, the output Bundle from call() can be used for
back-references from other operations.

Clean up how back-references are handled internally; we now store
either a literal value in each slot, or an explicit BackReference
instance which we can "instanceof" check to resolve when needed.

Also add withExceptionAllowed() capability, which can be used to
catch and report the failure of a single operation while allowing
any subsequent operations to proceed.  Adds various nullability
annotations to reflect the behavior of all existing logic.

Bug: 131598520
Test: atest android.content.cts.ContentProviderOperationTest
Test: atest android.content.cts.ContentProviderResultTest
Change-Id: I1744bf8fc1ad048aa96460d487c2867c4c81d7b3
2019-08-08 14:40:29 -06:00
Nicolas Geoffray
a98e4142f6 Merge "Notify the ART runtime when boot is complete." am: f83748ae28 am: 6b9ab57b2d am: ed22d5f05c am: 8f93d19459
am: 6e16874401

Change-Id: Icc2ec9b98c8b507f2431ef60a4cd7bbe11bab430
2019-08-08 06:02:32 -07:00
Nicolas Geoffray
8f93d19459 Merge "Notify the ART runtime when boot is complete." am: f83748ae28 am: 6b9ab57b2d
am: ed22d5f05c

Change-Id: I88c5ab8807446464854d59f95ffc2877fa6aa963
2019-08-08 05:43:38 -07:00
Nicolas Geoffray
ed22d5f05c Merge "Notify the ART runtime when boot is complete." am: f83748ae28
am: 6b9ab57b2d

Change-Id: I5466b6f73087c6dea67c9b7cfaa3bf55bacb8a23
2019-08-08 05:32:55 -07:00
Nicolas Geoffray
6b9ab57b2d Merge "Notify the ART runtime when boot is complete."
am: f83748ae28

Change-Id: Iea67d64570657173832ee0d61288dc97af11496b
2019-08-08 05:11:55 -07:00
Nicolas Geoffray
f83748ae28 Merge "Notify the ART runtime when boot is complete." 2019-08-08 11:58:06 +00:00
David Srbecky
6d0d7066cf Notify the ART runtime when boot is complete.
Needed for jit-zygote performance improvements.

Test: device boots
Bug: 119800099
Change-Id: I1e46f49d94440384473430d8afebe29fbee9c68e
2019-08-08 07:57:35 +00:00
PO HUNG CHEN
a3c58bf44b Merge "Clean up usage on deprecated GSID methods" 2019-08-08 06:32:53 +00:00
Nandana Dutt
d24128264f Merge "Remove obsolete methods from DumpstateListener implementations" am: cbdb10f982 am: b745860a3e
am: 82446aa5b6

Change-Id: Idbf64e9fb70f39ae547ab3283ca6eb03b95db32d
2019-08-07 07:39:17 -07:00
Nandana Dutt
82446aa5b6 Merge "Remove obsolete methods from DumpstateListener implementations" am: cbdb10f982
am: b745860a3e

Change-Id: Idd72ca09a0256c3e1283fd0c9d73a29939de4778
2019-08-07 07:28:15 -07:00
Nandana Dutt
b745860a3e Merge "Remove obsolete methods from DumpstateListener implementations"
am: cbdb10f982

Change-Id: Ia746b0cdadd0c4d652c373763f7a12266b080e3b
2019-08-07 07:08:27 -07:00
Nandana Dutt
47c5ecc50a Remove obsolete methods from DumpstateListener implementations
Note that with the new Bugreporting API, SystemServer is the only
expected DumpstateListener implementation. Once we fully migrate Shell
app, we can remove the implementation in BugreportService as well.

BUG: 128980174
Test: bugreport from power menu, observe progress bar

Change-Id: I40d654a70bd9ceb3a29f8a0113b85616100f4ee9
Merged-In: I40d654a70bd9ceb3a29f8a0113b85616100f4ee9
2019-08-06 17:43:11 +00:00
Nandana Dutt
ecc40227b6 Merge "Remove obsolete methods from DumpstateListener implementations" 2019-08-06 16:21:34 +00:00
Howard Chen
295d74964f Clean up usage on deprecated GSID methods
change: Add a oneShot argument to setEnable

remove: commit() and replace it with enableGsi

rename: removeGsiInstall -> removeGsi
rename: disableGsiInstall -> disableGsi

Bug: 138969329
Test: adb shell am start-activity \
    -n com.android.dynsystem/com.android.dynsystem.VerificationActivity \
    -a android.os.image.action.START_INSTALL \
    -d file:///storage/emulated/0/Download/system.raw.gz \
    --el KEY_SYSTEM_SIZE $(du -b system.raw|cut -f1) \
    --el KEY_USERDATA_SIZE 8589934592

Change-Id: I680013c8b1181599f0b858222bd92e31c5f085fd
2019-08-06 11:39:20 +08:00
Noah Zimmt
4e878506d7 Merge "Avoid calling installd where not needed" 2019-08-05 19:06:08 +00:00
Noah Zimmt
b255807189 Avoid calling installd where not needed
The method StorageStatsManager#getCacheBytes is called several times
during package installation. It calls
InstalldNativeService::getUserSize via a binder call.

The runtime of getUserSize is variable; I have traces where it takes
50ms and traces where it takes 500ms.

The return value of getUserSize used to take into account freeable cache
space when determining available space on a given volume. In most cases,
it is possible to first do a pessimistic check of the space available on
the volume - forgoing the installd call - and only consider cache space
if the pessimistic check fails.

This avoids a binder call + the time spend in getUserSize for most
installs.

Bug: None
Test: atest frameworks/base/core/tests/coretests/src/android/content/pm/PackageHelperTests.java
cts/tests/tests/os/src/android/os/storage/cts/StorageManagerTest.java
Change-Id: Icaecee732ef330fee1b409d2dd76723822c25959
2019-08-05 11:25:22 -07:00