Commit Graph

18492 Commits

Author SHA1 Message Date
Kevin Hufnagle
da3ee63d75 Merge "docs: Remove error in requestPermissions doc" into rvc-dev am: 05efe90a8d am: 5290b8d590
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13122154

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I42ea9340c432704656ed33cdd27b5093e90fced4
2021-01-11 19:54:14 +00:00
Kevin Hufnagle
5290b8d590 Merge "docs: Remove error in requestPermissions doc" into rvc-dev am: 05efe90a8d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13122154

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I1f2497b843db9d953e225da17e16f92f93f2ad99
2021-01-11 19:53:53 +00:00
Kevin Hufnagle
05efe90a8d Merge "docs: Remove error in requestPermissions doc" into rvc-dev 2021-01-11 18:56:59 +00:00
arangelov
f5a379201d [RESTRICT AUTOMERGE] Remove DPMS#getProfileOwner in favor of getProfileOwnerAsUser am: 10f79644fc
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12977405

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I162d5c8dd07adab106ba7c4201d984d98854e111
2021-01-06 17:31:09 +00:00
TreeHugger Robot
a428448b1e Merge "[RESTRICT AUTOMERGE] Remove DPMS#getProfileOwner in favor of getProfileOwnerAsUser" into rvc-qpr-dev 2021-01-06 17:21:50 +00:00
Alex Kershaw
fb688b44d8 [RESTRICT AUTOMERGE] Make WPMS look for DOs and POs in the correct calling user am: 72704403aa
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13144052

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ia9fa890f6b0582997173c9cef54c397c679db23e
2021-01-06 16:00:40 +00:00
Alex Kershaw
72704403aa [RESTRICT AUTOMERGE] Make WPMS look for DOs and POs in the correct calling user
Currently, it will always look in user 0 since it uses the DPM from
mContext, which will always be from user 0 as WPMS is in the system
server process.

Extend DPMI to provide the necessary external helper API. This is
preferable to just using createContextAsUser before getting the DPM
instance since it avoids a second binding.

Fixes: 144048540
Fixes: 172682826
Bug: 153995973
Bug: 174642338
Test: atest com.android.cts.devicepolicy.MixedManagedProfileOwnerTest#testSetWallpaper_disallowed
Change-Id: I52b71000fac31ff6725ddded58206f69b263ae33
(cherry picked from commit 5b36ee3f1d)
2021-01-06 13:08:42 +00:00
Jeff Sharkey
67ceac6ca7 Merge "Add OWNERS file for people" am: e4401ef4c5 am: d5c6b8bb11
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1540204

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I6511ec80bdd5ab576452c00353ce01e60ea3dfc2
2021-01-05 17:16:38 +00:00
Julia Reynolds
96ca797192 Add OWNERS file for people
Change-Id: I2024258217dcff3dcc34d5dc7bc2d56010e47be1
2021-01-05 16:04:30 +00:00
Remi NGUYEN VAN
edc6b0fb67 Merge "Split NetworkUtils and NetworkUtilsInternal" am: 3ed4fd3a89 am: 635d60201d
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1513140

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I7b2eae7f9988ae8fa8c858709cafc17c1420f4b7
2020-12-23 02:07:05 +00:00
Remi NGUYEN VAN
3ed4fd3a89 Merge "Split NetworkUtils and NetworkUtilsInternal" 2020-12-23 01:19:27 +00:00
Alex Kershaw
2e6c54c293 DO NOT MERGE Correctly reset cross-profile app-op am: f764d9e98f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13236705

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Iea45f7508d51a3a2f2a7be513549b2d8d34e1bb9
2020-12-17 17:22:22 +00:00
Alex Kershaw
f764d9e98f DO NOT MERGE Correctly reset cross-profile app-op
Delegate the resetting of the INTERACT_ACROSS_PROFILES app-op to
DevicePolicyManager, which knows whether it should be pre-granted and
knows to apply it equally across all users in the profile group.

Further unit tests for DevicePolicyManagerInternal will be added in
b/175440570 when we have the better infra for that.

The CrossProfileAppsServiceImpl changes look more complex than they are.
They consist of the following:
- Inclusive language changes to 'allowlist'
- Static imports of permissions to improve readability
- Previously, the setInteractAcrossProfilesAppOp method would set the
app-op for every user within the profile group of the 'calling user'.
However, given that we are now exposing this as a server-side internal
API where we need to pass in a user ID (from AppOpsService), we don't
necessarily have the guarantee that the 'calling user' is in the same
profile group. So we split it up: the client-side API and AIDL API still
set the app-op for the calling profile group, whereas the internal API
sets the app-op for every user within the profile group of the provided
user. The changes simply abstract away references to the 'calling user
ID'.

Fixes: 166561076
Bug: 175440570
Test: atest services/robotests/src/com/android/server/pm/CrossProfileAppsServiceImplRoboTest.java --verbose -c
Test: manual
Change-Id: I2181fe66022aaf6c3e6d784c0569d2f41ab66537
(cherry picked from commit d004f41188)
2020-12-17 13:27:34 +00:00
Remi NGUYEN VAN
eb32604c2b Merge "Run LowpanManager on BackgroundThread" am: e9c000eee2 am: f4e6668082
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1513142

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I3c501da3c8a7b5217d1574d5e7e4e41e0535e227
2020-12-15 03:55:01 +00:00
Remi NGUYEN VAN
e9c000eee2 Merge "Run LowpanManager on BackgroundThread" 2020-12-15 03:10:36 +00:00
Treehugger Robot
c656403bed Merge "Add a path for GNSS time suggestions" am: 85ebf98dcf am: 4ef13ea0c9
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1528193

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Idcef60976ab86fb527000594cc6698ae2cd7feb3
2020-12-14 19:18:04 +00:00
Treehugger Robot
85ebf98dcf Merge "Add a path for GNSS time suggestions" 2020-12-14 18:02:50 +00:00
TreeHugger Robot
78c4844b69 Merge "Revert "DO NOT MERGE Add RECORD_AUDIO_OUTPUT app op"" into rvc-qpr-dev-plus-aosp 2020-12-14 17:52:27 +00:00
Wale Ogunwale
dfbbd0e5d7 Merge "Add more OWNERS coverages(2/n)" am: a2c85ce0ba am: 700b3d812f
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1527819

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I1d1525ba52d4365241785b4789f7363aac0d32c4
2020-12-14 17:30:00 +00:00
Neil Fuller
3f5237157e Add a path for GNSS time suggestions
Add a path for GNSS time suggestions to get to the time detector.

Bug: 157265008
Test: atest services/tests/servicestests/src/com/android/server/timedetector/TimeDetectorStrategyImplTest.java
Test: atest android.app.timedetector
Change-Id: I5cb12b5545652ed885b72a3170940050ce0628a6
Merged-In: I5cb12b5545652ed885b72a3170940050ce0628a6
2020-12-14 16:59:39 +00:00
Nate Myren
06a8530e94 Revert "DO NOT MERGE Add RECORD_AUDIO_OUTPUT app op"
This reverts commit 471f8cec33.

Reason for revert: breaking tests

Fixes: 175508982
Change-Id: Ic66ac892d857e53cd613e769f837782be125db67
2020-12-14 16:27:01 +00:00
Wale Ogunwale
a2c85ce0ba Merge "Add more OWNERS coverages(2/n)" 2020-12-14 16:25:16 +00:00
Eran Messeri
2768a0acf3 Merge "Device Policy Manager OWNERS: Add Enterprise team" am: f4555b5fe2 am: feb6b04243
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1519669

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: If1ec5ca4642e6665a18b1246300d41697313ba3f
2020-12-14 14:40:46 +00:00
Neil Fuller
7c7b231319 Merge "Modify / add OWNERS files related to time / tz" am: 5ffc4b11f5 am: 762b9e9d79
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1526742

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I3502729562057e50c847200237383f7821b8c328
2020-12-14 14:39:46 +00:00
Eran Messeri
f4555b5fe2 Merge "Device Policy Manager OWNERS: Add Enterprise team" 2020-12-14 13:51:23 +00:00
Neil Fuller
2b5f56c8c8 Modify / add OWNERS files related to time / tz
Test: None
Change-Id: Ib6fe305a1091201bbb80c14a57e04c93912e2342
2020-12-14 11:32:44 +00:00
Remi NGUYEN VAN
cad9420134 Run LowpanManager on BackgroundThread
The ConnectivityThread class is being separated into a specific
connectivity JAR; transport-specific managers like LowpanManager should
not be sharing the ConnectivityThread.

As callbacks from ILowpanManager / ILowpanManagerListener already do not
have any ordering guarantee with ConnectivityManager callbacks, the
impact of this change should be minimal.

LowpanManager is unused in AOSP, and not part of the API.

Bug: 174436414
Test: m
Change-Id: I23483ed7c4a6c5283b365430a3e503a0dd86c2cb
2020-12-14 17:46:23 +09:00
Charles Chen
2c86c2cf8a Add more OWNERS coverages(2/n)
Test: manual
Bug: 174932174
Change-Id: Id6a4c60734f24a3d8fdec27b11baead550296441
2020-12-14 15:00:22 +08:00
Nate Myren
471f8cec33 DO NOT MERGE Add RECORD_AUDIO_OUTPUT app op
To be used when recording app output via the REMOTE_SUBMIX source
Test: presubmit
Bug: 173797503

Change-Id: I5851197ae42fb431f3b89c961e46b9f9e77d3eab
2020-12-11 21:41:59 +00:00
Wale Ogunwale
926aa8da2c Merge "Add more OWNERS coverages" am: 32ff0144bf am: 60f676c7d6
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1519794

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I32e5f8566ba916c892898f3f521a5a4309646142
2020-12-11 16:58:45 +00:00
Charles Chen
09f4e85ac2 Add more OWNERS coverages
Test: manual
Bug: 174932174
Change-Id: Ia798bdbce8516a3d675c55028ab637ad7f0695cf
2020-12-11 19:16:38 +08:00
Tobias Thierer
c6d183923c BackupManagerService: Make new behavior conditional on ChangeId.
Base CL ag/12885739 introduced unconditional enforcement of the BACKUP
permission for callers of BackupManagerService.isBackupServiceActive()
in the service, but dropped the enforcement on the app process side
(BackupManager).

This CL makes the behavior change conditional on a compat ChangeId.

Bug: 158482162
Test: Manually checked that an app similar to the code sample from
      http://b/158482162#comment1 can reproduce the behavior.
      This is true both before the base CL and after this CL, when
      the app targets an old SDK version (26).
Test: Checked that both (a) before this CL, (b) after this CL where
      the change is manually enabled for the app via the below commands,
      the app runs into a SecurityException instead:
$ adb shell am compat enable 158482162 com.example.tester
$ adb shell dumpsys platform_compat | grep 158482162
ChangeId(158482162; name=IS_BACKUP_SERVICE_ACTIVE_ENFORCE_PERMISSION_IN_SERVICE; enableSinceTargetSdk=31; packageOverrides={com.example.tester=true})

Change-Id: I58e5d2a0b438296137fd76720636c8fdce740ded
Merged-In: I58e5d2a0b438296137fd76720636c8fdce740ded
(cherry picked from commit 7671f0d95c)
2020-12-11 00:53:23 +00:00
Tobias Thierer
79192da3f3 Enforce BACKUP permission on Service end.
BackupManager runs in the client process, whereas BackupManagerService
runs in the system server process. Therefore, apps permissions need should
be enforced on the service side.

Bug: 158482162
Test: Manually checked that a sample app  encounters SecurityException
      after but not before this CL, when running code similar to the
      sample in http://b/158482162#comment1 to figure out whether
      isBackupServiceActive() for its own uid.
Change-Id: I59693819542a80a065a9c88373393b0ba0dbef65
Merged-In: I59693819542a80a065a9c88373393b0ba0dbef65
(cherry picked from commit b2ab2c414f)
2020-12-11 00:50:23 +00:00
Jeff Sharkey
845bfdd0ba Merge "Additional per-file OWNERS for shared directories." am: 8b102a5988 am: 7a9f3e10de
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1523618

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I9df0f96893728df43b3ae402ac69ec3e02079f51
2020-12-10 16:32:34 +00:00
Jeff Sharkey
e2cc3f8bec Additional per-file OWNERS for shared directories.
Iteration based on areas of tree where detailed ownership was found
to be missing during routine code reviews.

Also add more detailed examples to OWNERS.md.

Bug: 174932174
Exempt-From-Owner-Approval: refactoring with team leads buy-in
Change-Id: I46ccef33b34594181ae8dc62973d68020f827d6b
2020-12-10 08:37:23 -07:00
Eran Messeri
a6ac235ae8 Device Policy Manager OWNERS: Add Enterprise team
Add the Enterprise team to the owners of the admin/ java
directory.

Bug: 174932174
Test: N/A
Change-Id: I565cd3bdc3f00e843071863c10832c9e81cad748
2020-12-09 11:21:28 +00:00
Jeff Sharkey
358f0d4fc8 Merge changes from topic "dec5" am: c2793cf12b am: 9af6ac78b0
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1519384

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I2776a545a24f007ccb4b9ee14705978571265ef3
2020-12-08 16:43:19 +00:00
Jeff Sharkey
24d251403b Improve OWNERS coverage across frameworks/base/. am: fab0ab3c9c am: c7c4a74a78
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1519383

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I5120a3701af3564f363900b20bca75f3ad2a854c
2020-12-08 16:43:17 +00:00
Jeff Sharkey
9af6ac78b0 Merge changes from topic "dec5" am: c2793cf12b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1519384

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ifdc390f5ae046c515a30158f3f55b831be147547
2020-12-08 16:05:11 +00:00
Jeff Sharkey
c7c4a74a78 Improve OWNERS coverage across frameworks/base/. am: fab0ab3c9c
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1519383

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I0211462ecbcd9ad66f66af87e31cf12e1582fc65
2020-12-08 16:01:16 +00:00
Jeff Sharkey
52b9862f87 Improve OWNERS coverage across frameworks/base/.
As general background, OWNERS files expedite code reviews by helping
code authors quickly find relevant reviewers, and they also ensure
that stakeholders are involved in code changes in their areas.

Some teams under frameworks/base/ have been using OWNERS files
successfully for many years, and we're ready to expand them to cover
more areas.  Here's the historical coverage statistics for the last
two years of changes before these new OWNERS changes land:

-- 56% of changes are fully covered by OWNERS
-- 17% of changes are partially covered by OWNERS
-- 25% of changes have no OWNERS coverage

Working closely with team leads, we've now identified clear OWNERS on
a per-package basis, and we're using "include" directives whenever
possible to to simplify future maintenance.  With this extensive
effort, we've now improved our coverage as follows:

-- 98% of changes are fully covered by OWNERS
-- 1% of changes are partially covered by OWNERS
-- 1% of changes have no OWNERS coverage

This specific change is automatically generated by a script that
identifies relevant "include" directives.

Bug: 174932174
Test: manual
Exempt-From-Owner-Approval: refactoring with team leads buy-in
Merged-In: I3480ddf2fe7ba3dfb922b459d4da01fa17a2c813
Change-Id: I3480ddf2fe7ba3dfb922b459d4da01fa17a2c813
2020-12-08 08:36:28 -07:00
Jeff Sharkey
fab0ab3c9c Improve OWNERS coverage across frameworks/base/.
As general background, OWNERS files expedite code reviews by helping
code authors quickly find relevant reviewers, and they also ensure
that stakeholders are involved in code changes in their areas.

Some teams under frameworks/base/ have been using OWNERS files
successfully for many years, and we're ready to expand them to cover
more areas.  Here's the historical coverage statistics for the last
two years of changes before these new OWNERS changes land:

-- 56% of changes are fully covered by OWNERS
-- 17% of changes are partially covered by OWNERS
-- 25% of changes have no OWNERS coverage

Working closely with team leads, we've now identified clear OWNERS on
a per-package basis, and we're using "include" directives whenever
possible to to simplify future maintenance.  With this extensive
effort, we've now improved our coverage as follows:

-- 98% of changes are fully covered by OWNERS
-- 1% of changes are partially covered by OWNERS
-- 1% of changes have no OWNERS coverage

This specific change is automatically generated by a script from
detailed ownership information confirmed by team leads.

Bug: 174932174
Test: manual
Exempt-From-Owner-Approval: refactoring with team leads buy-in
Merged-In: I9789c97c1de8e5d962b48c29c57d82fe83729eba
Change-Id: I9789c97c1de8e5d962b48c29c57d82fe83729eba
2020-12-08 08:36:27 -07:00
Remi NGUYEN VAN
684a7409e6 Split NetworkUtils and NetworkUtilsInternal
NetworkUtils is planned to move to a dedicated JAR for connectivity
classes, while NetworkUtilsInternal would stay in the
frameworks-minus-apex JAR, in the com.android.internal.net package.

Bug: 171540887
Test: m, boots, wifi working
      atest FrameworksNetTests
Change-Id: I3d38d72ad23a4bf84af823c7baeb6fed25c0665f
2020-12-07 19:41:49 +09:00
Xin Li
8836e88707 DO NOT MERGE - Merge RQ1A.201205.011
Bug: 172690556
Merged-In: I26bed08456197721d07f2fab563be0c54e43efd2
Change-Id: Ic1ac100efa50687ccfcbb87ee91a57703105afad
2020-12-07 00:39:42 -08:00
Brian Stack
c57e2123d4 Expose UwbManager through Context.getSystemService am: 3163bf0d35 am: 2557747c4d
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1504101

Change-Id: I5213f04b2bf1f0db39a872ab7dd7f0d45fd60103
2020-12-04 18:00:40 +00:00
Brian Stack
2557747c4d Expose UwbManager through Context.getSystemService am: 3163bf0d35
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1504101

Change-Id: I14aa423224f37447024ddb4cc67cabe06d60a30a
2020-12-04 17:39:49 +00:00
TreeHugger Robot
12f1567f76 Merge "Update link for Permissions samples in Javadoc" into rvc-dev am: 82a1ff7a94 am: 4224da2b2b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13159866

Change-Id: I2dda484cb7780e15153442d29bc180045604aadb
2020-12-03 18:43:31 +00:00
Tiem Song
a9565b2cb0 Update link for Permissions samples in Javadoc
Bug: 158042826
Change-Id: I71ab17b21b31ff6584facd023e4c4818b0ab1b55
Merged-In: I71ab17b21b31ff6584facd023e4c4818b0ab1b55
Test: N/A
2020-12-02 20:50:04 -08:00
Brian Stack
3163bf0d35 Expose UwbManager through Context.getSystemService
Bug: 170323306
Test: atest UwbManagerTests
Change-Id: I04c1263a191fcfeee5824be5d6d1944354819d02
Merged-In: I04c1263a191fcfeee5824be5d6d1944354819d02
2020-12-02 13:58:28 -08:00
Xin Li
d31ee38811 Merge rvc-qpr-dev-plus-aosp-without-vendor@6881855
Bug: 172690556
Merged-In: I78222391b83a4add8e964340ec08bb8a1306e1c6
Change-Id: I28bbf40820674675ccf765c912aa8140d3f74ab2
2020-12-02 00:38:58 -08:00