Commit Graph

8712 Commits

Author SHA1 Message Date
Patrick Baumann
6a6b8d43bb Merge "Add support for pathSuffix" 2021-01-14 16:28:15 +00:00
TreeHugger Robot
0eb9c29224 Merge "Pass caller information in cancelBugreport." 2021-01-14 14:28:11 +00:00
Hunter Knepshield
4a1b9e949d Pass caller information in cancelBugreport.
In preparation for a broader set of apps using BugreportManager, we
enforce that only the app which started a bugreport is allowed to cancel
it.

Bug: 161393541
Test: atest BugreportManagerTestCases
Test: manual with two apps triggering/cancelling BRs
Change-Id: I430d856014a226ef345bd2349f0601062dcaa8c7
2021-01-13 16:57:58 -08:00
Adam Bookatz
2dd6b2b344 Merge "UserManager restricted profile SystemApis" 2021-01-13 22:47:26 +00:00
Adam Bookatz
20ba13f5bc UserManager restricted profile SystemApis
Makes two new SystemApis:
getRestrictedProfileParent()
canHaveRestrictedProfile()

Temporarily disables VPN Tests that rely on the old APIs until those
tests are updated (b/175883995).

Bug: 171529940
Test: atest FrameworksNetTests:com.android.server.connectivity.VpnTest
Test: Tests for UserManager SystemApis are TODO awaiting completion of new user test infrastructure (b/163890431)
Change-Id: I28e39400039631e7d391dc7b0d003e8a38d1f06a
2021-01-13 11:53:33 -08:00
Yo Chiang
d09c22c4e8 Merge "Fix DynamicSystemClient.start() exceptions" am: f2bf58fb9b am: 318dd035a6 am: 3755738a7d
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1541268

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I2afbce697848641fe7fda09f63601829107bac58
2021-01-13 04:01:31 +00:00
Yo Chiang
3755738a7d Merge "Fix DynamicSystemClient.start() exceptions" am: f2bf58fb9b am: 318dd035a6
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1541268

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I29f91caa3f49d5961f736cee9a809c687e00d47b
2021-01-13 03:58:27 +00:00
Yo Chiang
f2bf58fb9b Merge "Fix DynamicSystemClient.start() exceptions" 2021-01-13 02:35:28 +00:00
Jeff Sharkey
e069ac2c91 Merge "Interface to dynamically generate DropBox data." 2021-01-13 01:28:33 +00:00
Patrick Baumann
8cbf2e5a8f Add support for pathSuffix
This change adds support for a simple pathSuffix attribute in an app's
intent filter that can be applied to the path or ssp to match the end of
either. This enables filters that match based on file extensions as a
common use case.

This change additionally finally exposes the pathAdvancedPattern
attribute to enable more complex matching logic. This feature was added
back in API 26, but never exposed as a supported attribute in app
manifests, essentially making it useless to the average developer.

Test: atest IntentFilterTest
Bug: 139934742
Bug: 35193418

Change-Id: Ib58d5fb5419e621497e402b16a3a31c0c73f77cd
2021-01-12 16:15:52 -08:00
Marco Ballesio
9b2cce77ed Merge "ActivityManager: don't freeze processes holding file locks" 2021-01-12 23:34:20 +00:00
Adam Bookatz
185089663b Merge "Add User* OWNERS file (part 2)" am: da79da08f0 am: b9b73d26db am: 9ac98ffa59
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1543926

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I3fc005c69350f13002ceea055c7b97b8486eb484
2021-01-12 21:04:55 +00:00
Adam Bookatz
9ac98ffa59 Merge "Add User* OWNERS file (part 2)" am: da79da08f0 am: b9b73d26db
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1543926

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I87bc14c52e4aa4ed42f73496e104f0f3182c613b
2021-01-12 20:55:13 +00:00
Jeff Sharkey
8eebdbe4b5 Interface to dynamically generate DropBox data.
The existing DropBoxManager APIs require that data be entirely
pre-cooked before it can be added.  This adds significant overhead
to Log.wtf() style messages which collect logcat data, since we
need to copy that log data through a pipe to an in-memory buffer.

To avoid that overhead, this change introduces an EntrySource
interface which can either be pre-cooked data or dynamically
generated data written directly to an open FD on disk.  Future
changes will adjust the Log.wtf() logic to use this new interface
to have logcat write directly into an FD.

In addition, this interface paves the way for leveraging a newer
F2FS feature which transparently compresses and decompresses data in
the kernel, instead of forcing us to use DEFLATE in userspace.

This change drops periodic quota checking while recording new
entries, and instead adjusts to pre-flight the quota checks before
writing starts.  It also drops the expensive fsync(), since these
logs are collected on a best-effort basis.

Bug: 176843501
Test: atest CtsDropBoxManagerTestCases
Test: atest FrameworksServicesTests:com.android.server.DropBoxTest
Change-Id: Ic78e99a32cfaf4edac066a73a6864c9c9e9fdeef
2021-01-12 13:51:28 -07:00
Alex Buynytskyy
daea39f8a2 Merge "Per package read timeouts." 2021-01-12 16:53:11 +00:00
Zimuzo Ezeozue
e2cdacf427 Merge "Fix StorageVolume Parcel parsing" 2021-01-12 09:31:16 +00:00
Vince Leung
7b2e3fe338 Merge "Add PRIMITIVE_LOW_TICK VibrationEffect" 2021-01-12 07:17:54 +00:00
Alex Buynytskyy
aa8e95ea33 Per package read timeouts.
Bug: 162345970
Test: atest PackageManagerShellCommandTest PackageManagerShellCommandIncrementalTest IncrementalServiceTest PackageManagerServiceTest

Change-Id: I2599db1ed8827fff16387c11254a5d607f27ea46
2021-01-12 05:19:38 +00:00
Dmitri Plotnikov
3ac6cdc2f8 Convert several PowerCalculators to use BatteryUsageStats
Bug: 175644968
Test: atest FrameworksCoreTests:com.android.internal.os.BatteryStatsTests

Change-Id: If2c554ef3d186b108a7c0440be2ae2db548cf408
2021-01-11 20:01:43 -08:00
Adam Bookatz
6cd4cd01fb Add User* OWNERS file (part 2)
Part 1 was aosp/1546301.
Two parts are required due to b/175318571.

Test: N/A
Change-Id: I1a89f7d26da70dce36d1e891a8e8ebc4042dc56c
2021-01-12 01:03:39 +00:00
Zim
9f8795018e Fix StorageVolume Parcel parsing
We write String8 so should readString8 and not readString which
defaults to readString16

Bug: 170481432
Test: Manual
Change-Id: Id4b3802fd8669403f78a355fcb2c0fedfb239e72
2021-01-11 19:47:10 +00:00
Vince Leung
9eb7e9fe2d Add PRIMITIVE_LOW_TICK VibrationEffect
Bug: 174561580
Change-Id: I553a06b6dfb9d4a743d6aa1a6b0b728d90dbeee1
2021-01-10 22:55:15 +00:00
Zim
6306478234 Use accept_original_media_format constant
Bug: 158465539
Test: m
Change-Id: I82b9f3b740d295cfa927987783e5fe1bab562070
2021-01-08 15:33:51 +00:00
Marco Ballesio
770df97bef ActivityManager: don't freeze processes holding file locks
As a temporary measure waiting for the more robust b/176927978 to be
implemented, query the file lock status of processes prior freezing
them, and skip freeze if any locks are held.

Test: verified form the logs that processes holding file locks are not
frozen
Bug: 176928302

Change-Id: Ib7e1715effb63c1b304ce22a9451294fd9f7b10d
2021-01-07 12:51:21 -08:00
Treehugger Robot
022bcda29f Merge "Change log tag of DynamicSystemClient to match class name" am: 916dfddfd0 am: 198e4b4c4b am: b704222433
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1537885

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I218799056e3b1c85505a6201b9275234648bc07c
2021-01-06 11:51:05 +00:00
Treehugger Robot
b704222433 Merge "Change log tag of DynamicSystemClient to match class name" am: 916dfddfd0 am: 198e4b4c4b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1537885

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I36612768f8f876e93c624ed59d7c92bed7ae8b2d
2021-01-06 11:24:01 +00:00
Treehugger Robot
916dfddfd0 Merge "Change log tag of DynamicSystemClient to match class name" 2021-01-06 11:11:58 +00:00
Yo Chiang
1f5c6134d9 Merge "DynamicSystemInstallationService: Support remount for DSU guest system" am: 4896c7f2ac am: b64a3f5871 am: ddff5bca30
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1537222

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ib984c05213a1974fcdc59a59ed0ff47d260720a8
2021-01-06 10:06:52 +00:00
Yo Chiang
ddff5bca30 Merge "DynamicSystemInstallationService: Support remount for DSU guest system" am: 4896c7f2ac am: b64a3f5871
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1537222

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ic2468f5f90cc7ae789ab0a1b5eaa4262e279c429
2021-01-06 09:45:56 +00:00
TreeHugger Robot
9df7512c55 Merge "Demonstrate per Uid screen energy measurement in BatteryStatsViewer" 2021-01-06 09:07:05 +00:00
Yo Chiang
4896c7f2ac Merge "DynamicSystemInstallationService: Support remount for DSU guest system" 2021-01-06 08:37:43 +00:00
Yo Chiang
cd65cd4e04 Change log tag of DynamicSystemClient to match class name
Expand the "DynSystem" abbreviation to "DynamicSystem".
For simpler log grepping.

Bug: 165471299
Test: No
Change-Id: Ibec692ae45539dacd55e13ffaa903b58f3bf0417
2021-01-06 08:24:16 +00:00
Yo Chiang
a5c6f7fd6f Fix DynamicSystemClient.start() exceptions
* Remove calls to featureFlagEnabled() as they are causing avc denials,
  plus the feature flag is already deprecated.
* Add Intent flag FLAG_ACTIVITY_NEW_TASK to fix the
  AndroidRuntimeException, as the Context object used to startActivity()
  may not be an Activity object instance.
* Check the nullness of mListener before using it to fix the
  NullPointerException.

Bug: 176795908
Test: atest \
  cts/tests/tests/os/src/android/os/image/cts/DynamicSystemClientTest.java
Change-Id: I265d9912e76c39406e0adeacd2490b62873c94e4
2021-01-06 15:59:37 +08:00
Michael Wachenschwanz
4546304f47 Demonstrate per Uid screen energy measurement in BatteryStatsViewer
Bug: 172361024
Test: mp :BatteryStatsViewer && adb shell am start -n com.android.frameworks.core.batterystatsviewer/.BatteryStatsViewerActivity
Change-Id: I1da2b5f23a216b45915921bd43ea5d5e14ddd23a
2021-01-05 16:46:19 -08:00
Steven Moreland
655f6cdce6 Merge "TransactionTooLargeException: doc clarification" am: e51328b36c am: db1696ee21 am: 9209ce0c19
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1537983

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Id6a91b53a5c720298fcba165e81c12685d4f654e
2021-01-05 20:12:54 +00:00
Steven Moreland
9209ce0c19 Merge "TransactionTooLargeException: doc clarification" am: e51328b36c am: db1696ee21
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1537983

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I5128044c589118624c216cd640bc19e68c19a17c
2021-01-05 19:33:20 +00:00
Steven Moreland
e51328b36c Merge "TransactionTooLargeException: doc clarification" 2021-01-05 18:32:33 +00:00
Yo Chiang
848bcdc42a DynamicSystemInstallationService: Support remount for DSU guest system
DSU service would try to install a DSU scratch partition if host system
is debuggable.
If the scratch partition failed to install, then skip installing
scratch, as remount support should be optional.
Otherwise if the guest system is non-debuggable, then the scratch
partition would be ignored by guest, which is harmless.
Otherwise the guest system is debuggable, which means the guest system
would be able to do adb remount.

Relax partition allocation status polling rate from 10ms -> 100ms,
because there's no point polling faster than the screen framerate.

Bug: 165925766
Test: TH
Test: Install a DSU system on a debuggable host, reboot into the guest
  system, and guest system can remount.
Change-Id: I9a8255483cc963ebcf7a2909e68ac69371cb369f
2021-01-05 15:38:42 +08:00
Yo Chiang
34487c2d69 Merge "Update OWNERS file for DynamicSystemInstallationService related files" am: d15cbc37d5 am: da54c495b6 am: df076f3e17
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1537268

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I3af03c3c874595f8e0e2006bff0012ada23e3631
2021-01-05 05:07:27 +00:00
Yo Chiang
df076f3e17 Merge "Update OWNERS file for DynamicSystemInstallationService related files" am: d15cbc37d5 am: da54c495b6
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1537268

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I88527e0b97e6a3705935bde0e89760435e0bb46b
2021-01-05 04:42:37 +00:00
Yo Chiang
d15cbc37d5 Merge "Update OWNERS file for DynamicSystemInstallationService related files" 2021-01-05 03:34:39 +00:00
Yo Chiang
70aa429243 Update OWNERS file for DynamicSystemInstallationService related files
Also sort OWNERS by alphabetical order.

Bug: 165925766
Test: No
Change-Id: Ib272ba802d0f7281aa2d1bbc8b74dc5954dbe13c
2020-12-31 14:10:36 +08:00
Steven Moreland
58311dcc70 TransactionTooLargeException: doc clarification
- buffer is in bytes, not bits (1MB vs 1Mb)
- this exception is actually a heuristic currently, pending b/28321379

Fixes: 149869862
Test: N/A
Change-Id: Id409a1ce7348666ec9ad6437acf67382be0a0a1f
2020-12-30 19:46:57 +00:00
Suren Baghdasaryan
4ab1e52df4 Merge "Add total GPU usage report into dumpsys meminfo output" am: 50a824abf7 am: 0eed51c4fd
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1472569

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ib3aa0cf7b052dad50273e1370218bbb4e4ecb375
2020-12-30 18:26:52 +00:00
Suren Baghdasaryan
aee45ee0bc Add total GPU usage report into dumpsys meminfo output
With latest kernel changes, total GPU memory usage is reported and can
be obtained via a BPF program. Create JNI interface to query it and
report inside dumpsys meminfo output.

Bug: 171261987
Test: dumpsys meminfo
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Merged-In: I949a13836d5b5bc87fc43f60871b4fbf2add6480
Change-Id: I949a13836d5b5bc87fc43f60871b4fbf2add6480
2020-12-30 17:32:10 +00:00
Steven Moreland
7459f6eba0 Merge "OWNERS - for binders" am: 55fe3d16a4 am: 8461e26292 am: 3965021b86
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1532277

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I5fee8f9fe076024eedfb8c60008dbe0dc6edbaa3
2020-12-29 20:20:12 +00:00
Steven Moreland
3965021b86 Merge "OWNERS - for binders" am: 55fe3d16a4 am: 8461e26292
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1532277

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I1fa886ccd48215983d6669ef09d80f528e1c73e8
2020-12-29 19:42:21 +00:00
Steven Moreland
55fe3d16a4 Merge "OWNERS - for binders" 2020-12-29 18:43:29 +00:00
Treehugger Robot
0c423bee8f Merge "Add some comments about thread-safety" am: d0c6e0fa08 am: 8b1745b2eb am: 964778feb8
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1503391

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: If64310c84837082a2172a4d9b30c2068370bd6fb
2020-12-29 17:29:22 +00:00
Treehugger Robot
964778feb8 Merge "Add some comments about thread-safety" am: d0c6e0fa08 am: 8b1745b2eb
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1503391

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: If74f558d5dd3dc64902ea55f8effa626532d4b86
2020-12-29 17:05:33 +00:00