Commit Graph

8248 Commits

Author SHA1 Message Date
Marco Ballesio
64459e591b ActivityManager: don't freeze processes holding file locks am: 80a05232a0
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13376527

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I393a094a76fe2ffff831a1f34f0c5b39725cd137
2021-01-21 03:07:26 +00:00
Marco Ballesio
80a05232a0 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
Merged-In: Ib7e1715effb63c1b304ce22a9451294fd9f7b10d
2021-01-20 22:33:20 +00:00
Treehugger Robot
37f4ebb9e1 Merge "Make BugreportManager a public API that respects carrier privileges." am: 0dcf4de7df am: 6d6c5ec5cd
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1552883

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ib26fe91f828ca6d39f19f7893f2f3c76da6e9738
2021-01-19 01:34:32 +00:00
Treehugger Robot
0dcf4de7df Merge "Make BugreportManager a public API that respects carrier privileges." 2021-01-19 00:21:25 +00:00
Treehugger Robot
05af40c490 Merge "New sm command to unmount app data and obb app visibility mount" am: 3299d00b87 am: 40c7e3d17d
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1552534

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Id5a591310ed72bf625e04ff16c08825b6fa94af6
2021-01-18 17:05:40 +00:00
Treehugger Robot
8187197857 Merge "Add MOUNT_FLAG_VISIBLE to visible stub volumes" am: d8e3e07264 am: eba787f7a5
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1536320

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I21d5560f0d061cae9c8959cb658a75fd14e7ed76
2021-01-18 16:25:48 +00:00
Treehugger Robot
3299d00b87 Merge "New sm command to unmount app data and obb app visibility mount" 2021-01-18 16:20:41 +00:00
Treehugger Robot
d8e3e07264 Merge "Add MOUNT_FLAG_VISIBLE to visible stub volumes" 2021-01-18 14:54:27 +00:00
Youkichi Hosoi
d2905dd086 Add MOUNT_FLAG_VISIBLE to visible stub volumes
The visibility setting of a removable device shared with Chrome OS is
passed via Disk flags. When a device (stub volume) is marked as visible,
we should set the MOUNT_FLAG_VISIBLE flag to it.

Bug: 123377807
Bug: 142684891
Bug: 132796154
Test: Toggle the visibility setting of a removable device in the Chrome
Test: OS Settings app > Confirm that the device is visible to Android
Test: apps only when it is marked as visible.
Test: Tested in R

Change-Id: I19289596345690b1802738122fe274eeb41f9361
2021-01-18 12:09:52 +00:00
Treehugger Robot
444e91786a Merge "Pass caller information in cancelBugreport." am: 21d36ec4f5 am: 61b2a3c228
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1552882

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I53469e3b7f38270b95bdb2f926470216676f87b7
2021-01-18 11:25:17 +00:00
Hunter Knepshield
30e7b64d9c Make BugreportManager a public API that respects carrier privileges.
This permission model is only allowed for BUGREPORT_MODE_TELEPHONY to
let carrier apps (even from the Play Store / not pre-loaded) access
BugreportManager to trigger connectivity bugreports.

This also requires SELinux policy changes to allow non-system apps to
get an instance through Context#getSystemService, and then dumpstate
also needs permissions to write public apps' files.

Minor documentation and formatting fixes as well.

BYPASS_INCLUSIVE_LANGUAGE_REASON=leaving variable name derived from
"bugreport-whitelisted" sysconfig alone for now

Bug: 161393541
Test: atest CtsCarrierApiTestCases:BugreportManagerTest
Change-Id: I5a38e7a040fa23146fa6c1e785db102b066ad167
Merged-In: I5a38e7a040fa23146fa6c1e785db102b066ad167
(cherry picked from commit 57fd3440be)
2021-01-15 17:35:45 -08:00
Hunter Knepshield
fffec02113 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
Merged-In: I430d856014a226ef345bd2349f0601062dcaa8c7
(cherry picked from commit 4a1b9e949d)
2021-01-15 17:29:03 -08:00
Ricky Wai
e81ebc69c3 New sm command to unmount app data and obb app visibility mount
This command will be used in tests so tests won't mount data and obb
dirs anymore so won't be killed by system when volume is unmounted.

Bug: 148049767
Test: Enable storage app visibility flag, then run "sm unmount-app-data-dirs  PKG PID USER_ID", data and obb are not mounted in /proc/$PID anymore.
Change-Id: Ie5ddf55471f59c61e1906664b87a9bf889702536
2021-01-15 14:06:29 +00:00
Lorenzo Colitti
869987f60a Merge changes I28e39400,Ibada8b42 am: c5f2057d02 am: 98802d08bf
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1548870

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I8a086ef5602d1823ca582894f8fddd138ce6080c
2021-01-14 11:34:15 +00:00
Lorenzo Colitti
c5f2057d02 Merge changes I28e39400,Ibada8b42
* changes:
  UserManager restricted profile SystemApis
  Improve testing of CONNECTIVITY_ACTION broadcasts.
2021-01-14 10:39:48 +00:00
Adam Bookatz
81762facae 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)
(cherry picked from commit 20ba13f5bc)
Change-Id: I28e39400039631e7d391dc7b0d003e8a38d1f06a
2021-01-14 17:39:13 +09: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
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
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
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
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
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
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
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
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
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
Treehugger Robot
d0c6e0fa08 Merge "Add some comments about thread-safety" 2020-12-29 16:03:08 +00:00
Sudheer Shanka
0b39593d11 Merge "Update usage of allowlist/denylist in some method names/comments." am: 771aa062b9 am: b4c68c4216
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1402789

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I97e8af4a71f23438e830b1a44834719b7c488d67
2020-12-24 09:36:33 +00:00
Sudheer Shanka
771aa062b9 Merge "Update usage of allowlist/denylist in some method names/comments." 2020-12-24 08:16:51 +00:00
Sudheer Shanka
ab00eadcc0 Update usage of allowlist/denylist in some method names/comments.
In a previous change (https://r.android.com/1394342), we did a mass update of whitelist->allowlist
and blacklist->denylist in network policy related code. Updating
some usages of those (like allowlisted to allowed) to make them
sound natural.

Test: atest services/tests/servicestests/src/com/android/server/net/NetworkPolicyManagerServiceTest.java
Test: atest services/tests/servicestests/src/com/android/server/NetworkManagementInternalTest.java
Test: atest hostsidetests/net/src/com/android/cts/net/HostsideRestrictBackgroundNetworkTests.java
Change-Id: I6d34b0bd3cdb64d5872874fd9378bfc962a24f8d
2020-12-24 04:03:33 +00:00
Steven Moreland
0306f8c174 OWNERS - for binders
Forward ownership of libbinder and libhwbinder related things to
respective libbinder and libhwbinder OWNERS sets, to support future
developments.

Bug: 149869862
Test: N/A
Change-Id: If14bfdd89719c7cb1e39594aecdb089d4d5c96e3
2020-12-24 01:16:52 +00:00
Chiachang Wang
df9fc2853d Merge "[IT02] Expose system api to report radio power state" am: b1de9a09bd am: 15cc8f0f71
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1517498

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I379193edf34a6371e9e2febe372fa238420a0caa
2020-12-23 06:48:53 +00:00
Chiachang Wang
b1de9a09bd Merge "[IT02] Expose system api to report radio power state" 2020-12-23 05:19:51 +00:00
Chiachang Wang
3f01a7a8c1 [IT02] Expose system api to report radio power state
In order to support ConnectivityService mainline, the dependency
with NMS should be removed. The idle timer control API should be
replaced with calling INetd interface instead of using NMS hidden
API.

The state reporting will be triggered from updating idle timer
and netd unsolicited interface activity changed events.
BatteryStatsService should be able to get the netd event by
registering the listener directly. This commit exposes two system
APIs to report the radio power state for wifi and mobile for
supporting update idle timer from CS directly to INetd.

Bug: 170598012
Test: make update-api ; m
Change-Id: I286d6aa237ecb2653e1464e26a3581b8eeeb9e63
2020-12-22 08:39:22 +08:00
Tianjie Xu
2aa7d539d3 Merge "Deprecate the old rebootAndApply API" am: cabef01cb3 am: 7a81aade1d
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1533087

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ie0418e182285ee86aefcafb8edba7002229dbc5e
2020-12-21 19:20:28 +00:00
Tianjie Xu
cabef01cb3 Merge "Deprecate the old rebootAndApply API" 2020-12-21 18:53:20 +00:00
Todd Kennedy
e01d70114c Merge "Add OWNERS for incremental" am: b8ff8f238e am: 25d1667e00
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1533458

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I5df3b15db2ef7cc56583d00a7d6f2e588b87c8a3
2020-12-17 23:17:45 +00:00
Tianjie
4343e3ebca Deprecate the old rebootAndApply API
This API isn't aware of slot switch, and shouldn't be used by
phonesky. So we prefer to deprecate it in case new callers use
it accidentally. Also don't allow callers with REBOOT permission
to call it.

Bug: 170664917
Test: build
Change-Id: I540b87fad461cb2c900f3e9d177bb5147abc1a22
2020-12-17 13:05:36 -08:00